diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-15 23:21:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-15 23:21:06 +0000 |
commit | 0c9dbf507b53a12bdf577ff3e55c1686a2e089de (patch) | |
tree | 3849f2add85d7abe11151436b3f03f99783157a8 /java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java | |
parent | e724c7b6376be660abf2113f97c7cbfc34515da8 (diff) | |
parent | c857f90590e7d7fcffa89511982eb33afd34805f (diff) |
Merge "Update Dialer to v10 RC32" into oc-dev
Diffstat (limited to 'java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java')
-rw-r--r-- | java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java b/java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java index 3cc42207d..6e9fe1315 100644 --- a/java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java +++ b/java/com/android/dialer/blocking/BlockedNumbersAutoMigrator.java @@ -21,6 +21,7 @@ import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.os.UserManagerCompat; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnHasBlockedNumbersListener; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; @@ -100,6 +101,10 @@ public class BlockedNumbersAutoMigrator { @Nullable @Override public Boolean doInBackground(@Nullable Void input) { + if (!UserManagerCompat.isUserUnlocked(appContext)) { + LogUtil.i("BlockedNumbersAutoMigrator", "not attempting auto-migrate: device is locked"); + return false; + } SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(appContext); |