mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
spotbugs: remove redundant null checks
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
0a9e79988a
commit
2c30e5e9f7
2 changed files with 4 additions and 10 deletions
|
@ -379,10 +379,7 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View expirationView) {
|
public void onClick(View expirationView) {
|
||||||
if (mPublicShare != null && mPublicShare.getExpirationDate() > 0) {
|
if (mPublicShare != null && mPublicShare.getExpirationDate() > 0) {
|
||||||
long chosenDateInMillis = -1;
|
long chosenDateInMillis = mPublicShare.getExpirationDate();
|
||||||
if (mPublicShare != null) {
|
|
||||||
chosenDateInMillis = mPublicShare.getExpirationDate();
|
|
||||||
}
|
|
||||||
ExpirationDatePickerDialogFragment dialog =
|
ExpirationDatePickerDialogFragment dialog =
|
||||||
ExpirationDatePickerDialogFragment.newInstance(mFile, chosenDateInMillis);
|
ExpirationDatePickerDialogFragment.newInstance(mFile, chosenDateInMillis);
|
||||||
dialog.show(
|
dialog.show(
|
||||||
|
|
|
@ -718,12 +718,9 @@ public class FileOperationsHelper {
|
||||||
|
|
||||||
OCCapability capability = mFileActivity.getStorageManager().getCapability(mFileActivity.getAccount().name);
|
OCCapability capability = mFileActivity.getStorageManager().getCapability(mFileActivity.getAccount().name);
|
||||||
SendShareDialog mSendShareDialog;
|
SendShareDialog mSendShareDialog;
|
||||||
if (capability != null) {
|
|
||||||
mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions,
|
mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions,
|
||||||
capability.getFilesSharingPublicPasswordEnforced().isTrue());
|
capability.getFilesSharingPublicPasswordEnforced().isTrue());
|
||||||
} else {
|
|
||||||
mSendShareDialog = SendShareDialog.newInstance(file, hideNcSharingOptions, false);
|
|
||||||
}
|
|
||||||
mSendShareDialog.setFileOperationsHelper(this);
|
mSendShareDialog.setFileOperationsHelper(this);
|
||||||
mSendShareDialog.show(ft, "TAG_SEND_SHARE_DIALOG");
|
mSendShareDialog.show(ft, "TAG_SEND_SHARE_DIALOG");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue