-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: dropbox: Cleanup nullable analyzer warnings
- Loading branch information
1 parent
4c14e82
commit 8699463
Showing
2 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (©) 2017 Jeff Harris <[email protected]> | ||
* Copyright (©) 2017-2024 Jeff Harris <[email protected]> | ||
* All rights reserved. Use of the code is allowed under the | ||
* Artistic License 2.0 terms, as specified in the LICENSE file | ||
* distributed with this code, or available from | ||
|
@@ -9,6 +9,9 @@ | |
|
||
import android.content.Context; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import com.dropbox.core.DbxException; | ||
import com.dropbox.core.v2.DbxClientV2; | ||
import com.dropbox.core.v2.files.FileMetadata; | ||
|
@@ -47,7 +50,8 @@ public DropboxCoreSyncer(DbxClientV2 client, | |
} | ||
|
||
/** Create a remote identifier from the local name of a file */ | ||
public static String createRemoteIdFromLocal(DbFile dbfile) | ||
@NonNull | ||
public static String createRemoteIdFromLocal(@NonNull DbFile dbfile) | ||
{ | ||
return ProviderRemoteFile.PATH_SEPARATOR + | ||
dbfile.itsLocalTitle.toLowerCase(); | ||
|
@@ -56,15 +60,17 @@ public static String createRemoteIdFromLocal(DbFile dbfile) | |
/** | ||
* Get the account display name | ||
*/ | ||
public static String getDisplayName(DbxClientV2 client) throws DbxException | ||
@NonNull | ||
public static String getDisplayName(@NonNull DbxClientV2 client) | ||
throws DbxException | ||
{ | ||
FullAccount acct = client.users().getCurrentAccount(); | ||
return acct.getName().getDisplayName(); | ||
} | ||
|
||
|
||
@Override | ||
protected SyncRemoteFiles getSyncRemoteFiles(List<DbFile> dbfiles) | ||
protected SyncRemoteFiles getSyncRemoteFiles(@NonNull List<DbFile> dbfiles) | ||
throws DbxException | ||
{ | ||
SyncRemoteFiles files = new SyncRemoteFiles(); | ||
|
@@ -134,6 +140,7 @@ protected SyncRemoteFiles getSyncRemoteFiles(List<DbFile> dbfiles) | |
* @return The file's FileMetadata if found; null or DeletedMetadata if | ||
* not found | ||
*/ | ||
@Nullable | ||
private Metadata getRemoteFile(String remoteId) | ||
throws DbxException | ||
{ | ||
|