Snap for 8710680 from 5f50ce04f1
to tm-qpr1-release
Change-Id: Ie6850b77779806df1798e7d9da33eff8b7f1f029
This commit is contained in:
@@ -838,7 +838,11 @@
|
||||
<!-- Introduction detail message shown in face enrollment dialog [CHAR LIMIT=NONE]-->
|
||||
<string name="security_settings_face_enroll_introduction_message">Use your face to unlock your phone, authorize purchases, or sign in to apps.</string>
|
||||
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
|
||||
<string name="security_settings_face_enroll_introduction_consent_message">Allow your child to use their face to unlock their phone or verify it\u2019s them. This happens when they sign in to apps, approve a purchase, and more.</string>
|
||||
<string name="security_settings_face_enroll_introduction_consent_message" product="default">Using your child\u2019s face to unlock their phone may be less secure than a strong pattern or PIN.</string>
|
||||
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
|
||||
<string name="security_settings_face_enroll_introduction_consent_message" product="tablet">Using your child\u2019s face to unlock their tablet may be less secure than a strong pattern or PIN.</string>
|
||||
<!-- Introduction detail message shown in face enrollment dialog when asking for parental consent [CHAR LIMIT=NONE]-->
|
||||
<string name="security_settings_face_enroll_introduction_consent_message" product="device">Using your child\u2019s face to unlock their device may be less secure than a strong pattern or PIN.</string>
|
||||
<!-- Introduction detail message shown in face enrollment dialog, when face unlock is disabled by device admin [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_face_enroll_introduction_message_unlock_disabled">Use your face to unlock your phone or approve purchases.\n\nNote: You can\u2019t use your face to unlock this device. For more information, contact your organization\u2019s admin.</string>
|
||||
<!-- Introduction detail message shown in face enrollment screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||
@@ -1022,7 +1026,11 @@
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard when asking for parental consent. [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_4">You and your child can delete their fingerprint images and model, or turn off Fingerprint Unlock at any time in Settings. Fingerprint images and models are stored on the phone until they\u2019re deleted.</string>
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_5">Your phone can be unlocked when you don\u2019t intend to, like if someone holds it up to your finger.</string>
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_5" product="default">Your phone can be unlocked when you don\u2019t intend to, like if someone holds it up to your finger.</string>
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_5" product="tablet">Your tablet can be unlocked when you don\u2019t intend to, like if someone holds it up to your finger.</string>
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_5" product="device">Your device can be unlocked when you don\u2019t intend to, like if someone holds it up to your finger.</string>
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard when asking for parental consent. [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_5">Your child\u2019s phone can be unlocked when they don\u2019t intend to, like if someone holds it up to their finger.</string>
|
||||
<!-- Introduction description message shown in fingerprint enrollment introduction screen in setup wizard. [CHAR LIMIT=NONE] -->
|
||||
@@ -1163,11 +1171,11 @@
|
||||
<!-- Title shown in fingerprint enrollment dialog once enrollment is completed [CHAR LIMIT=29] -->
|
||||
<string name="security_settings_fingerprint_enroll_finish_title">Fingerprint added</string>
|
||||
<!-- Message shown in fingerprint enrollment dialog once enrollment is completed (tablet) [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="tablet">Now you can use your fingerprint to unlock your tablet or verify it\u2019s you, like when you sign in to apps</string>
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="tablet">Fingerprint Unlock improves the more you use it to unlock your tablet or verify it\u2019s you in apps</string>
|
||||
<!-- Message shown in fingerprint enrollment dialog once enrollment is completed (device) [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="device">Now you can use your fingerprint to unlock your device or verify it\u2019s you, like when you sign in to apps</string>
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="device">Fingerprint Unlock improves the more you use it to unlock your device or verify it\u2019s you in apps</string>
|
||||
<!-- Message shown in fingerprint enrollment dialog once enrollment is completed (default) [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="default">Now you can use your fingerprint to unlock your phone or verify it\u2019s you, like when you sign in to apps</string>
|
||||
<string name="security_settings_fingerprint_enroll_finish_v2_message" product="default">Fingerprint Unlock improves the more you use it to unlock your phone or verify it\u2019s you in apps</string>
|
||||
<!-- Button text to skip enrollment of fingerprint [CHAR LIMIT=40] -->
|
||||
<string name="security_settings_fingerprint_enroll_enrolling_skip">Do it later</string>
|
||||
<!-- Accessibility message for fingerprint enrollment asking the user to place the tip of their finger on the fingerprint sensor [CHAR LIMIT=NONE] -->
|
||||
|
@@ -180,10 +180,11 @@ public class RemoveAccountPreferenceController extends AbstractPreferenceControl
|
||||
| AuthenticatorException e) {
|
||||
// handled below
|
||||
Log.w(TAG, "Remove account error: " + e);
|
||||
RemoveAccountFailureDialog.show(getTargetFragment());
|
||||
}
|
||||
Log.i(TAG, "failed: " + failed);
|
||||
if (!failed) {
|
||||
if (failed) {
|
||||
RemoveAccountFailureDialog.show(getTargetFragment());
|
||||
} else {
|
||||
targetActivity.finish();
|
||||
}
|
||||
}, null, mUserHandle);
|
||||
|
@@ -799,10 +799,12 @@ public class FingerprintSettings extends SubSettings {
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
mFp = getArguments().getParcelable(KEY_FINGERPRINT);
|
||||
final String title = getString(R.string.fingerprint_delete_title, mFp.getName());
|
||||
final String message =
|
||||
getString(R.string.fingerprint_v2_delete_message, mFp.getName());
|
||||
|
||||
mAlertDialog = new AlertDialog.Builder(getActivity())
|
||||
.setTitle(title)
|
||||
.setMessage(R.string.fingerprint_delete_message)
|
||||
.setMessage(message)
|
||||
.setPositiveButton(
|
||||
R.string.security_settings_fingerprint_enroll_dialog_delete,
|
||||
this /* onClickListener */)
|
||||
@@ -967,6 +969,10 @@ public class FingerprintSettings extends SubSettings {
|
||||
final boolean isProfileChallengeUser =
|
||||
getArguments().getBoolean("isProfileChallengeUser");
|
||||
|
||||
final String title = getString(R.string.fingerprint_delete_title, mFp.getName());
|
||||
final String message =
|
||||
getString(R.string.fingerprint_v2_delete_message, mFp.getName());
|
||||
|
||||
DevicePolicyManager devicePolicyManager =
|
||||
getContext().getSystemService(DevicePolicyManager.class);
|
||||
String messageId =
|
||||
@@ -977,10 +983,12 @@ public class FingerprintSettings extends SubSettings {
|
||||
: R.string.fingerprint_last_delete_message;
|
||||
|
||||
final AlertDialog alertDialog = new AlertDialog.Builder(getActivity())
|
||||
.setTitle(R.string.fingerprint_last_delete_title)
|
||||
.setTitle(title)
|
||||
.setMessage(devicePolicyManager.getResources().getString(
|
||||
messageId, () -> getContext().getString(defaultMessageId)))
|
||||
.setPositiveButton(R.string.fingerprint_last_delete_confirm,
|
||||
messageId,
|
||||
() -> message + "\n\n" + getContext().getString(defaultMessageId)))
|
||||
.setPositiveButton(
|
||||
R.string.security_settings_fingerprint_enroll_dialog_delete,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
@@ -22,6 +22,7 @@ import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.DeviceConfig;
|
||||
@@ -49,7 +50,6 @@ import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.IllegalFormatException;
|
||||
import java.util.List;
|
||||
|
||||
public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment {
|
||||
@@ -136,7 +136,6 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
use(BlockingSlicePrefController.class).setSliceUri(sliceEnabled
|
||||
? featureProvider.getBluetoothDeviceSettingsUri(mCachedDevice.getDevice())
|
||||
: null);
|
||||
updateExtraControlUri(/* viewWidth */ 0);
|
||||
}
|
||||
|
||||
private void updateExtraControlUri(int viewWidth) {
|
||||
@@ -148,13 +147,14 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
String uri = featureProvider.getBluetoothDeviceControlUri(mCachedDevice.getDevice());
|
||||
if (!TextUtils.isEmpty(uri)) {
|
||||
try {
|
||||
controlUri = Uri.parse(String.format(uri, viewWidth));
|
||||
} catch (IllegalFormatException | NullPointerException exception) {
|
||||
controlUri = Uri.parse(uri + viewWidth);
|
||||
} catch (NullPointerException exception) {
|
||||
Log.d(TAG, "unable to parse uri");
|
||||
controlUri = null;
|
||||
}
|
||||
}
|
||||
use(SlicePreferenceController.class).setSliceUri(sliceEnabled ? controlUri : null);
|
||||
use(SlicePreferenceController.class).onStart();
|
||||
}
|
||||
|
||||
private final ViewTreeObserver.OnGlobalLayoutListener mOnGlobalLayoutListener =
|
||||
@@ -165,7 +165,10 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
if (view == null) {
|
||||
return;
|
||||
}
|
||||
updateExtraControlUri(view.getWidth());
|
||||
if (view.getWidth() <= 0) {
|
||||
return;
|
||||
}
|
||||
updateExtraControlUri(view.getWidth() - getPaddingSize());
|
||||
view.getViewTreeObserver().removeOnGlobalLayoutListener(
|
||||
mOnGlobalLayoutListener);
|
||||
}
|
||||
@@ -251,4 +254,17 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
}
|
||||
return controllers;
|
||||
}
|
||||
|
||||
private int getPaddingSize() {
|
||||
TypedArray resolvedAttributes =
|
||||
getContext().obtainStyledAttributes(
|
||||
new int[]{
|
||||
android.R.attr.listPreferredItemPaddingStart,
|
||||
android.R.attr.listPreferredItemPaddingEnd
|
||||
});
|
||||
int width = resolvedAttributes.getDimensionPixelSize(0, 0)
|
||||
+ resolvedAttributes.getDimensionPixelSize(1, 0);
|
||||
resolvedAttributes.recycle();
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ import static com.android.settings.slices.CustomSliceRegistry.VOLUME_CALL_URI;
|
||||
import static com.android.settings.slices.CustomSliceRegistry.VOLUME_MEDIA_URI;
|
||||
import static com.android.settings.slices.CustomSliceRegistry.VOLUME_RINGER_URI;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.BroadcastReceiver;
|
||||
@@ -49,7 +50,6 @@ import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
|
||||
import com.android.settingslib.media.MediaOutputConstants;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.IllegalFormatException;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
||||
@@ -64,6 +64,7 @@ public class VolumePanel implements PanelContent, LifecycleObserver {
|
||||
|
||||
private PanelContentCallback mCallback;
|
||||
private LocalBluetoothProfileManager mProfileManager;
|
||||
private int mControlSliceWidth;
|
||||
|
||||
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
@@ -80,6 +81,14 @@ public class VolumePanel implements PanelContent, LifecycleObserver {
|
||||
|
||||
private VolumePanel(Context context) {
|
||||
mContext = context.getApplicationContext();
|
||||
if (context instanceof Activity) {
|
||||
int panelWidth =
|
||||
((Activity) context).getWindowManager().getCurrentWindowMetrics().getBounds()
|
||||
.width();
|
||||
// The control slice width = panel width - two left and right horizontal paddings
|
||||
mControlSliceWidth = panelWidth - context.getResources().getDimensionPixelSize(
|
||||
R.dimen.panel_slice_Horizontal_padding) * 2;
|
||||
}
|
||||
|
||||
final FutureTask<LocalBluetoothManager> localBtManagerFutureTask = new FutureTask<>(
|
||||
// Avoid StrictMode ThreadPolicy violation
|
||||
@@ -102,8 +111,7 @@ public class VolumePanel implements PanelContent, LifecycleObserver {
|
||||
public void onResume() {
|
||||
final IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(MediaOutputConstants.ACTION_CLOSE_PANEL);
|
||||
mContext.registerReceiver(mReceiver, filter,
|
||||
Context.RECEIVER_EXPORTED_UNAUDITED);
|
||||
mContext.registerReceiver(mReceiver, filter, Context.RECEIVER_EXPORTED_UNAUDITED);
|
||||
}
|
||||
|
||||
/** Invoked when the panel is paused. */
|
||||
@@ -159,13 +167,11 @@ public class VolumePanel implements PanelContent, LifecycleObserver {
|
||||
Uri controlUri = null;
|
||||
final BluetoothDevice bluetoothDevice = findActiveDevice();
|
||||
if (bluetoothDevice != null) {
|
||||
final int width = mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.settings_panel_width);
|
||||
final String uri = BluetoothUtils.getControlUriMetaData(bluetoothDevice);
|
||||
if (!TextUtils.isEmpty(uri)) {
|
||||
try {
|
||||
controlUri = Uri.parse(String.format(uri, width));
|
||||
} catch (IllegalFormatException | NullPointerException exception) {
|
||||
controlUri = Uri.parse(uri + mControlSliceWidth);
|
||||
} catch (NullPointerException exception) {
|
||||
Log.d(TAG, "unable to parse uri");
|
||||
controlUri = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user