Merge changes from topics "remove_feature_flag_emergency", "faster_emergency_feature_flag" into pi-dev
* changes: RESTRICT AUTOMERGE: Removes feature flag for faster emergency call. Add new metrics in power menu Add feature flag in Settings.
This commit is contained in:
@@ -11235,14 +11235,6 @@ public final class Settings {
|
||||
*/
|
||||
public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed";
|
||||
|
||||
/**
|
||||
* Enable faster emergency phone call feature.
|
||||
* The value is a boolean (1 or 0).
|
||||
* @hide
|
||||
*/
|
||||
public static final String FASTER_EMERGENCY_PHONE_CALL_ENABLED =
|
||||
"faster_emergency_phone_call_enabled";
|
||||
|
||||
/**
|
||||
* See RIL_PreferredNetworkType in ril.h
|
||||
* @hide
|
||||
|
||||
@@ -237,7 +237,6 @@ public class SettingsBackupTest {
|
||||
Settings.Global.EUICC_SUPPORTED_COUNTRIES,
|
||||
Settings.Global.EUICC_FACTORY_RESET_TIMEOUT_MILLIS,
|
||||
Settings.Global.FANCY_IME_ANIMATIONS,
|
||||
Settings.Global.FASTER_EMERGENCY_PHONE_CALL_ENABLED,
|
||||
Settings.Global.FORCE_ALLOW_ON_EXTERNAL,
|
||||
Settings.Global.FORCED_APP_STANDBY_ENABLED,
|
||||
Settings.Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED,
|
||||
|
||||
@@ -101,7 +101,7 @@ import java.util.List;
|
||||
* is provisioned.
|
||||
*/
|
||||
class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
||||
DialogInterface.OnClickListener {
|
||||
DialogInterface.OnClickListener, DialogInterface.OnShowListener {
|
||||
|
||||
static public final String SYSTEM_DIALOG_REASON_KEY = "reason";
|
||||
static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
|
||||
@@ -318,8 +318,7 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
||||
ArraySet<String> addedKeys = new ArraySet<String>();
|
||||
mHasLogoutButton = false;
|
||||
mHasLockdownButton = false;
|
||||
mSeparatedEmergencyButtonEnabled = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.FASTER_EMERGENCY_PHONE_CALL_ENABLED, 0) != 0;
|
||||
mSeparatedEmergencyButtonEnabled = true;
|
||||
for (int i = 0; i < defaultActions.length; i++) {
|
||||
String actionKey = defaultActions[i];
|
||||
if (addedKeys.contains(actionKey)) {
|
||||
@@ -398,6 +397,7 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
||||
dialog.setKeyguardShowing(mKeyguardShowing);
|
||||
|
||||
dialog.setOnDismissListener(this);
|
||||
dialog.setOnShowListener(this);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
@@ -456,6 +456,7 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
||||
|
||||
@Override
|
||||
public void onPress() {
|
||||
MetricsLogger.action(mContext, MetricsEvent.ACTION_EMERGENCY_DIALER_FROM_POWER_MENU);
|
||||
Intent intent = new Intent(EmergencyDialerConstants.ACTION_DIAL);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
intent.putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE,
|
||||
@@ -862,6 +863,11 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
||||
item.onPress();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void onShow(DialogInterface dialog) {
|
||||
MetricsLogger.visible(mContext, MetricsEvent.POWER_MENU);
|
||||
}
|
||||
|
||||
/**
|
||||
* The adapter used for the list within the global actions dialog, taking
|
||||
* into account whether the keyguard is showing via
|
||||
|
||||
@@ -6482,6 +6482,16 @@ message MetricsEvent {
|
||||
// OS: Q
|
||||
FIELD_EMERGENCY_DIALER_SHORTCUT_TAPS_INTERVAL = 1567;
|
||||
|
||||
// OPEN: Power menu is opened
|
||||
// CATEGORY: GLOBAL_SYSTEM_UI
|
||||
// OS: Q
|
||||
POWER_MENU = 1568;
|
||||
|
||||
// ACTION: User tapped emergency dialer icon in the power menu.
|
||||
// CATEGORY: GLOBAL_SYSTEM_UI
|
||||
// OS: Q
|
||||
ACTION_EMERGENCY_DIALER_FROM_POWER_MENU = 1569;
|
||||
|
||||
// ---- End Q Constants, all Q constants go above this line ----
|
||||
|
||||
// Add new aosp constants above this line.
|
||||
|
||||
Reference in New Issue
Block a user