]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DictionaryManagerActivity.java
Switch to app compat preferences.
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryManagerActivity.java
index f9a084f706f69deec2c7d956f4dcd16dde0e8e27..faf507da40dca60fd84a5ab53b1f551da1c4c5e1 100644 (file)
@@ -31,7 +31,7 @@ import android.os.Build;
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.Handler;
-import android.preference.PreferenceManager;
+import android.support.v7.preference.PreferenceManager;
 import android.provider.Settings;
 import android.support.annotation.NonNull;
 import android.support.v4.app.ActivityCompat;
@@ -144,7 +144,7 @@ public class DictionaryManagerActivity extends AppCompatActivity {
             final String action = intent.getAction();
 
             if (DownloadManager.ACTION_NOTIFICATION_CLICKED.equals(action)) {
-                startActivity(DictionaryManagerActivity.getLaunchIntent(getApplicationContext()).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP));
+                startActivity(getLaunchIntent(getApplicationContext()).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP));
             }
             if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) {
                 final long downloadId = intent.getLongExtra(
@@ -688,7 +688,7 @@ public class DictionaryManagerActivity extends AppCompatActivity {
         if (cursor == null) {
             if (cancel) {
                 String msg = getString(R.string.downloadManagerQueryFailed);
-                new AlertDialog.Builder(DictionaryManagerActivity.this).setTitle(getString(R.string.error))
+                new AlertDialog.Builder(this).setTitle(getString(R.string.error))
                 .setMessage(getString(R.string.downloadFailed, msg))
                 .setNeutralButton("Close", null).show();
             }
@@ -851,7 +851,7 @@ public class DictionaryManagerActivity extends AppCompatActivity {
 
         if (downloadManager == null) {
             String msg = getString(R.string.downloadManagerQueryFailed);
-            new AlertDialog.Builder(DictionaryManagerActivity.this).setTitle(getString(R.string.error))
+            new AlertDialog.Builder(this).setTitle(getString(R.string.error))
                     .setMessage(getString(R.string.downloadFailed, msg))
                     .setNeutralButton("Close", null).show();
             return;