Warn users when selecting non-Direct Boot apps.
Certain apps like Phone, SMS, Emergency Info, and IME are critical enough that they ideally need to be runnable before the device is unlocked after a reboot. Users can still pick non-Direct Boot aware apps, but this change now warns users that the selected app won't be runnable until after unlocking. Bug: 27196876 Change-Id: I0498904d2f664fb41e8c1e6bb30d1cbf437cf4b9
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.applications;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -30,9 +29,11 @@ import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArraySet;
|
||||
import android.util.AttributeSet;
|
||||
import com.android.internal.telephony.SmsApplication;
|
||||
|
||||
import com.android.settings.AppListPreference;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SelfAvailablePreference;
|
||||
import com.android.settings.Utils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -56,6 +57,12 @@ public class DefaultEmergencyPreference extends AppListPreference
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence getConfirmationMessage(String value) {
|
||||
return Utils.isPackageDirectBootAware(getContext(), value) ? null
|
||||
: getContext().getText(R.string.direct_boot_unaware_dialog_message);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean persistString(String value) {
|
||||
String previousValue = Settings.Secure.getString(mContentResolver,
|
||||
|
Reference in New Issue
Block a user