ZipExporterPreference: requireNonNull is redundant
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
f9d68185e2
commit
a47ddf57d1
@ -104,7 +104,7 @@ public class ZipExporterPreference extends Preference {
|
|||||||
final String message = getContext().getString(R.string.export_error, error);
|
final String message = getContext().getString(R.string.export_error, error);
|
||||||
Log.e(TAG, message, throwable);
|
Log.e(TAG, message, throwable);
|
||||||
Snackbar.make(
|
Snackbar.make(
|
||||||
Objects.requireNonNull(getPrefActivity(this)).findViewById(android.R.id.content),
|
getPrefActivity(this).findViewById(android.R.id.content),
|
||||||
message, Snackbar.LENGTH_LONG).show();
|
message, Snackbar.LENGTH_LONG).show();
|
||||||
} else {
|
} else {
|
||||||
exportedFilePath = filePath;
|
exportedFilePath = filePath;
|
||||||
@ -125,7 +125,7 @@ public class ZipExporterPreference extends Preference {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
Objects.requireNonNull(getPrefActivity(this)).ensurePermissions(
|
getPrefActivity(this).ensurePermissions(
|
||||||
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
(permissions, granted) -> {
|
(permissions, granted) -> {
|
||||||
if (granted.length > 0 && granted[0] == PackageManager.PERMISSION_GRANTED)
|
if (granted.length > 0 && granted[0] == PackageManager.PERMISSION_GRANTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user