mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
getCapability marked with @NonNull and associated npe check removed.
Signed-off-by: ardevd <edvard.holst@gmail.com>
This commit is contained in:
parent
b96414d794
commit
f1f3d74ce6
2 changed files with 4 additions and 4 deletions
|
@ -62,6 +62,7 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
@ -2023,6 +2024,7 @@ public class FileDataStorageManager {
|
|||
return c;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public OCCapability getCapability(String accountName) {
|
||||
OCCapability capability;
|
||||
Cursor c = getCapabilityCursorForAccount(accountName);
|
||||
|
|
|
@ -165,7 +165,7 @@ public class FileMenuFilter {
|
|||
private void filter(List<Integer> toShow, List<Integer> toHide, boolean inSingleFileFragment) {
|
||||
boolean synchronizing = anyFileSynchronizing();
|
||||
OCCapability capability = mComponentsGetter.getStorageManager().getCapability(mAccount.name);
|
||||
boolean endToEndEncryptionEnabled = capability != null && capability.getEndToEndEncryption().isTrue();
|
||||
boolean endToEndEncryptionEnabled = capability.getEndToEndEncryption().isTrue();
|
||||
|
||||
filterDownload(toShow, toHide, synchronizing);
|
||||
filterRename(toShow, toHide, synchronizing);
|
||||
|
@ -184,9 +184,7 @@ public class FileMenuFilter {
|
|||
filterUnsetEncrypted(toShow, toHide, endToEndEncryptionEnabled);
|
||||
filterSetPictureAs(toShow, toHide);
|
||||
filterStream(toShow, toHide);
|
||||
if (endToEndEncryptionEnabled) {
|
||||
filterOpenAsRichDocument(toShow, toHide, capability);
|
||||
}
|
||||
filterOpenAsRichDocument(toShow, toHide, capability);
|
||||
}
|
||||
|
||||
private void filterShareFile(List<Integer> toShow, List<Integer> toHide, OCCapability capability) {
|
||||
|
|
Loading…
Reference in a new issue