mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
Check nullability of accountName in FileDisplayActivity.java
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
4dd6a6d277
commit
04f0a00d65
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
package com.owncloud.android.ui.activity;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AuthenticatorException;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
|
@ -1354,7 +1355,8 @@ public class FileDisplayActivity extends FileActivity
|
|||
public void onReceive(Context context, Intent intent) {
|
||||
String uploadedRemotePath = intent.getStringExtra(FileUploadWorker.EXTRA_REMOTE_PATH);
|
||||
String accountName = intent.getStringExtra(FileUploadWorker.ACCOUNT_NAME);
|
||||
boolean sameAccount = getAccount() != null && accountName.equals(getAccount().name);
|
||||
Account account = getAccount();
|
||||
boolean sameAccount = accountName != null && account != null && accountName.equals(account.name);
|
||||
OCFile currentDir = getCurrentDir();
|
||||
boolean isDescendant = currentDir != null && uploadedRemotePath != null && uploadedRemotePath.startsWith(currentDir.getRemotePath());
|
||||
|
||||
|
|
Loading…
Reference in a new issue