From a47ddf57d1cdaef5b93d54055b66a26916d3bd95 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 30 Apr 2018 15:12:49 +0200 Subject: ZipExporterPreference: requireNonNull is redundant Signed-off-by: Jason A. Donenfeld --- .../java/com/wireguard/android/preference/ZipExporterPreference.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java index d568fbf9..421be1df 100644 --- a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java @@ -104,7 +104,7 @@ public class ZipExporterPreference extends Preference { final String message = getContext().getString(R.string.export_error, error); Log.e(TAG, message, throwable); Snackbar.make( - Objects.requireNonNull(getPrefActivity(this)).findViewById(android.R.id.content), + getPrefActivity(this).findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG).show(); } else { exportedFilePath = filePath; @@ -125,7 +125,7 @@ public class ZipExporterPreference extends Preference { @Override protected void onClick() { - Objects.requireNonNull(getPrefActivity(this)).ensurePermissions( + getPrefActivity(this).ensurePermissions( new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, (permissions, granted) -> { if (granted.length > 0 && granted[0] == PackageManager.PERMISSION_GRANTED) -- cgit v1.2.3