diff options
| author | 2018-10-05 01:06:42 +0000 | |
|---|---|---|
| committer | 2018-10-05 01:06:42 +0000 | |
| commit | 77c2e6736ada05dbb36a90bbd90a9b718febcf94 (patch) | |
| tree | ca82f029f66ae66a30474eac854b782a83458a97 | |
| parent | cce5e4f4a2c09ee11fa20ec1f8adf2a0f5b088db (diff) | |
| parent | 82e5908df04db95235aea76e58fa4bd5acb99afe (diff) | |
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.
4 files changed, 19 insertions, 12 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index de621e38a72b..501d7f1d97c9 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -11236,14 +11236,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 */ diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index 418b8953d68a..c4a3b7ab11af 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -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, diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java index 00758e8e1297..897ab88215ef 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java @@ -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 diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto index b990175fd616..d79d833f2233 100644 --- a/proto/src/metrics_constants.proto +++ b/proto/src/metrics_constants.proto @@ -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. |