Skip to content

Commit bcdc581

Browse files
committed
fix warnings
Signed-off-by: alperozturk <[email protected]>
1 parent 74a2621 commit bcdc581

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ public OCFileListAdapter(
174174
mStorageManager = new FileDataStorageManager(user, activity.getContentResolver());
175175
}
176176

177+
//noinspection deprecation
177178
userId = AccountManager
178179
.get(activity)
179180
.getUserData(this.user.toPlatformAccount(),
@@ -197,6 +198,7 @@ public OCFileListAdapter(
197198
setHasStableIds(true);
198199

199200
// initialise thumbnails cache on background thread
201+
//noinspection deprecation
200202
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
201203
}
202204

@@ -991,6 +993,7 @@ private void parseVirtuals(List<Object> objects, SearchType searchType) {
991993

992994
OCFile parentFolder = mStorageManager.getFileById(ocFile.getParentId());
993995
if (parentFolder != null && (ocFile.isEncrypted() || parentFolder.isEncrypted())) {
996+
//noinspection deprecation
994997
Object object = RefreshFolderOperation.getDecryptedFolderMetadata(
995998
true,
996999
parentFolder,
@@ -1028,6 +1031,7 @@ private void parseVirtuals(List<Object> objects, SearchType searchType) {
10281031
mStorageManager,
10291032
user,
10301033
activity);
1034+
//noinspection deprecation
10311035
refreshFolderOperation.execute(user, activity);
10321036
}
10331037
}
@@ -1067,7 +1071,7 @@ private void updateList(List<OCFile> newList) {
10671071
diff.dispatchUpdatesTo(this);
10681072
}
10691073

1070-
public void setSortOrder(@Nullable OCFile folder, FileSortOrder sortOrder) {
1074+
public void setSortOrder(@Nullable OCFile folder, @NonNull FileSortOrder sortOrder) {
10711075
preferences.setSortOrder(folder, sortOrder);
10721076

10731077
final var newList = sortOrder.sortCloudFiles(mFiles);
@@ -1076,6 +1080,7 @@ public void setSortOrder(@Nullable OCFile folder, FileSortOrder sortOrder) {
10761080
this.sortOrder = sortOrder;
10771081
}
10781082

1083+
@NonNull
10791084
public Set<OCFile> getCheckedItems() {
10801085
return ocFileListDelegate.getCheckedItems();
10811086
}
@@ -1110,6 +1115,10 @@ public void resetLastTimestamp() {
11101115
lastTimestamp = -1;
11111116
}
11121117

1118+
public long getLastTimestamp() {
1119+
return lastTimestamp;
1120+
}
1121+
11131122
@Override
11141123
public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) {
11151124
super.onViewRecycled(holder);
@@ -1199,7 +1208,7 @@ public void setShowMetadata(boolean bool) {
11991208

12001209
@NonNull
12011210
@Override
1202-
public String getPopupText(View view, int position) {
1211+
public String getPopupText(@NonNull View view, int position) {
12031212
OCFile file = getItem(position);
12041213

12051214
if (file == null || sortOrder == null) {

0 commit comments

Comments
 (0)