mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01: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
@ -459,7 +459,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
|||||||
.subscribe(new SingleObserver<ReadFilesystemOperation>() {
|
.subscribe(new SingleObserver<ReadFilesystemOperation>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -479,6 +479,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
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 {
|
companion object {
|
||||||
@JvmField
|
@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>() {
|
.subscribe(new Observer<UserProfileFieldsOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -198,7 +199,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -243,6 +244,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<GenericOverall>() {
|
.subscribe(new Observer<GenericOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -260,7 +262,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -273,6 +275,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<UserProfileOverall>() {
|
.subscribe(new Observer<UserProfileOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -291,7 +294,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -349,6 +352,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<UserProfileFieldsOverall>() {
|
.subscribe(new Observer<UserProfileFieldsOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -366,7 +370,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -452,6 +456,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<GenericOverall>() {
|
.subscribe(new Observer<GenericOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -477,7 +482,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -533,7 +538,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
|
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",
|
file = File.createTempFile("avatar", "png",
|
||||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM));
|
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM));
|
||||||
|
|
||||||
|
|
||||||
try (FileOutputStream out = new FileOutputStream(file)) {
|
try (FileOutputStream out = new FileOutputStream(file)) {
|
||||||
bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
|
bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -602,6 +606,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<GenericOverall>() {
|
.subscribe(new Observer<GenericOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -612,11 +617,12 @@ public class ProfileController extends BaseController {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
||||||
Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG).show();
|
||||||
|
Log.e(TAG, "Error uploading avatar", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -634,6 +640,7 @@ public class ProfileController extends BaseController {
|
|||||||
.subscribe(new Observer<GenericOverall>() {
|
.subscribe(new Observer<GenericOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -649,7 +656,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -771,7 +778,7 @@ public class ProfileController extends BaseController {
|
|||||||
holder.text.addTextChangedListener(new TextWatcher() {
|
holder.text.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -785,7 +792,7 @@ public class ProfileController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -256,7 +256,6 @@ public class PushUtils {
|
|||||||
if (((TextUtils.isEmpty(providerValue) || accountPushData == null) && !userEntity.getScheduledForDeletion()) ||
|
if (((TextUtils.isEmpty(providerValue) || accountPushData == null) && !userEntity.getScheduledForDeletion()) ||
|
||||||
(accountPushData != null && !accountPushData.getPushToken().equals(token) && !userEntity.getScheduledForDeletion())) {
|
(accountPushData != null && !accountPushData.getPushToken().equals(token) && !userEntity.getScheduledForDeletion())) {
|
||||||
|
|
||||||
|
|
||||||
Map<String, String> queryMap = new HashMap<>();
|
Map<String, String> queryMap = new HashMap<>();
|
||||||
queryMap.put("format", "json");
|
queryMap.put("format", "json");
|
||||||
queryMap.put("pushTokenHash", pushTokenHash);
|
queryMap.put("pushTokenHash", pushTokenHash);
|
||||||
@ -271,7 +270,7 @@ public class PushUtils {
|
|||||||
.subscribe(new Observer<PushRegistrationOverall>() {
|
.subscribe(new Observer<PushRegistrationOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -285,14 +284,13 @@ public class PushUtils {
|
|||||||
proxyMap.put("userPublicKey", pushRegistrationOverall.getOcs()
|
proxyMap.put("userPublicKey", pushRegistrationOverall.getOcs()
|
||||||
.getData().getPublicKey());
|
.getData().getPublicKey());
|
||||||
|
|
||||||
|
|
||||||
ncApi.registerDeviceForNotificationsWithProxy(
|
ncApi.registerDeviceForNotificationsWithProxy(
|
||||||
ApiUtils.getUrlPushProxy(), proxyMap)
|
ApiUtils.getUrlPushProxy(), proxyMap)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe(new Observer<Void>() {
|
.subscribe(new Observer<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -319,17 +317,17 @@ public class PushUtils {
|
|||||||
null, userEntity.getId(), null, null, null)
|
null, userEntity.getId(), null, null, null)
|
||||||
.subscribe(new Observer<UserEntity>() {
|
.subscribe(new Observer<UserEntity>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(UserEntity userEntity) {
|
public void onNext(@NonNull UserEntity userEntity) {
|
||||||
eventBus.post(new EventStatus(userEntity.getId(), EventStatus.EventType.PUSH_REGISTRATION, true));
|
eventBus.post(new EventStatus(userEntity.getId(), EventStatus.EventType.PUSH_REGISTRATION, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
eventBus.post(new EventStatus
|
eventBus.post(new EventStatus
|
||||||
(userEntity.getId(),
|
(userEntity.getId(),
|
||||||
EventStatus.EventType
|
EventStatus.EventType
|
||||||
@ -338,14 +336,12 @@ public class PushUtils {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(TAG, "IOException while updating user");
|
Log.e(TAG, "IOException while updating user", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -356,7 +352,7 @@ public class PushUtils {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -365,11 +361,11 @@ public class PushUtils {
|
|||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
eventBus.post(new EventStatus(userEntity.getId(),
|
eventBus.post(new EventStatus(userEntity.getId(),
|
||||||
EventStatus.EventType.PUSH_REGISTRATION, false));
|
EventStatus.EventType.PUSH_REGISTRATION, false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
// unused atm
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -400,9 +396,9 @@ public class PushUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} 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) {
|
} 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;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user