mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
fix Spot Bugs warning
Possible null pointer dereference in com.nextcloud.talk.utils.PushUtils.updatePushStateForUser(Map, User) due to return value of called method Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
da8148a134
commit
eff4b912bd
@ -338,6 +338,7 @@ public class PushUtils {
|
|||||||
pushConfigurationState.setUserPublicKey(proxyMap.get("userPublicKey"));
|
pushConfigurationState.setUserPublicKey(proxyMap.get("userPublicKey"));
|
||||||
pushConfigurationState.setUsesRegularPass(Boolean.FALSE);
|
pushConfigurationState.setUsesRegularPass(Boolean.FALSE);
|
||||||
|
|
||||||
|
if (user.getId() != null) {
|
||||||
userManager.updatePushState(user.getId(), pushConfigurationState).subscribe(new SingleObserver<Integer>() {
|
userManager.updatePushState(user.getId(), pushConfigurationState).subscribe(new SingleObserver<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@ -358,6 +359,10 @@ public class PushUtils {
|
|||||||
false));
|
false));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, "failed to update updatePushStateForUser. user.getId() was null");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Key readKeyFromString(boolean readPublicKey, String keyString) {
|
private Key readKeyFromString(boolean readPublicKey, String keyString) {
|
||||||
|
Loading…
Reference in New Issue
Block a user