mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
improve logging, empty method documentation and new codacy issues
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
7bd6076795
commit
f540aa9305
4 changed files with 33 additions and 29 deletions
|
@ -459,7 +459,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
|||
.subscribe(new SingleObserver<ReadFilesystemOperation>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -479,6 +479,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
|||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e(TAG, "Error reading file information", e);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@ class OCSize private constructor(var ocSize: Long) : Property {
|
|||
|
||||
companion object {
|
||||
@JvmField
|
||||
val NAME:Property. Name = Property.Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_NAME_SIZE)
|
||||
val NAME: Property.Name = Property.Name(DavUtils.OC_NAMESPACE, DavUtils.EXTENDED_PROPERTY_NAME_SIZE)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<UserProfileFieldsOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -198,7 +199,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -243,6 +244,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<GenericOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -260,7 +262,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -273,6 +275,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<UserProfileOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -291,7 +294,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -349,6 +352,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<UserProfileFieldsOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -366,7 +370,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -452,6 +456,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<GenericOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -477,7 +482,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -533,7 +538,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -545,7 +550,6 @@ public class ProfileController extends BaseController {
|
|||
file = File.createTempFile("avatar", "png",
|
||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM));
|
||||
|
||||
|
||||
try (FileOutputStream out = new FileOutputStream(file)) {
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
|
||||
} catch (IOException e) {
|
||||
|
@ -602,6 +606,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<GenericOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -612,11 +617,12 @@ public class ProfileController extends BaseController {
|
|||
@Override
|
||||
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
||||
Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG).show();
|
||||
Log.e(TAG, "Error uploading avatar", e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -634,6 +640,7 @@ public class ProfileController extends BaseController {
|
|||
.subscribe(new Observer<GenericOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -649,7 +656,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -771,7 +778,7 @@ public class ProfileController extends BaseController {
|
|||
holder.text.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -785,7 +792,7 @@ public class ProfileController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -256,7 +256,6 @@ public class PushUtils {
|
|||
if (((TextUtils.isEmpty(providerValue) || accountPushData == null) && !userEntity.getScheduledForDeletion()) ||
|
||||
(accountPushData != null && !accountPushData.getPushToken().equals(token) && !userEntity.getScheduledForDeletion())) {
|
||||
|
||||
|
||||
Map<String, String> queryMap = new HashMap<>();
|
||||
queryMap.put("format", "json");
|
||||
queryMap.put("pushTokenHash", pushTokenHash);
|
||||
|
@ -271,7 +270,7 @@ public class PushUtils {
|
|||
.subscribe(new Observer<PushRegistrationOverall>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -285,14 +284,13 @@ public class PushUtils {
|
|||
proxyMap.put("userPublicKey", pushRegistrationOverall.getOcs()
|
||||
.getData().getPublicKey());
|
||||
|
||||
|
||||
ncApi.registerDeviceForNotificationsWithProxy(
|
||||
ApiUtils.getUrlPushProxy(), proxyMap)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Observer<Void>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -319,17 +317,17 @@ public class PushUtils {
|
|||
null, userEntity.getId(), null, null, null)
|
||||
.subscribe(new Observer<UserEntity>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(UserEntity userEntity) {
|
||||
public void onNext(@NonNull UserEntity userEntity) {
|
||||
eventBus.post(new EventStatus(userEntity.getId(), EventStatus.EventType.PUSH_REGISTRATION, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
public void onError(@NonNull Throwable e) {
|
||||
eventBus.post(new EventStatus
|
||||
(userEntity.getId(),
|
||||
EventStatus.EventType
|
||||
|
@ -338,14 +336,12 @@ public class PushUtils {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "IOException while updating user");
|
||||
Log.e(TAG, "IOException while updating user", e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -356,7 +352,7 @@ public class PushUtils {
|
|||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -365,11 +361,11 @@ public class PushUtils {
|
|||
public void onError(@NonNull Throwable e) {
|
||||
eventBus.post(new EventStatus(userEntity.getId(),
|
||||
EventStatus.EventType.PUSH_REGISTRATION, false));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
// unused atm
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -400,9 +396,9 @@ public class PushUtils {
|
|||
}
|
||||
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
Log.d("TAG", "No such algorithm while reading key from string");
|
||||
Log.d(TAG, "No such algorithm while reading key from string");
|
||||
} catch (InvalidKeySpecException e) {
|
||||
Log.d("TAG", "Invalid key spec while reading key from string");
|
||||
Log.d(TAG, "Invalid key spec while reading key from string");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue