Loading packages/SystemUI/res/layout/global_actions_grid.xml +0 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:orientation="vertical" android:background="?android:attr/colorBackgroundFloating" android:gravity="center" android:translationZ="@dimen/global_actions_translate" /> Loading @@ -48,7 +47,6 @@ android:paddingRight="@dimen/global_actions_grid_horizontal_padding" android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:background="?android:attr/colorBackgroundFloating" > <LinearLayout android:layout_width="wrap_content" Loading packages/SystemUI/res/values-night/colors.xml +12 −0 Original line number Diff line number Diff line Loading @@ -47,4 +47,16 @@ <!-- The color of the background in the bottom part of QSCustomizer --> <color name="qs_customize_decoration">@color/GM2_grey_800</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">@color/GM2_grey_900</color> <!-- The color of the background in the grid of the Global Actions menu --> <color name="global_actions_grid_background">@color/GM2_grey_800</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_text">@color/GM2_grey_200</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_alert_text">@color/GM2_red_300</color> </resources> No newline at end of file packages/SystemUI/res/values/colors.xml +15 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,18 @@ <color name="qs_customize_background">@color/GM2_grey_50</color> <color name="qs_customize_decoration">@color/GM2_grey_100</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">@color/GM2_grey_300</color> <!-- The color of the background in the grid of the Global Actions menu --> <color name="global_actions_grid_background">@color/GM2_grey_200</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_text">@color/GM2_grey_900</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_alert_text">@color/GM2_red_500</color> <!-- Tint color for the content on the notification overflow card. --> <color name="keyguard_overflow_content_color">#ff686868</color> Loading Loading @@ -149,4 +161,7 @@ <color name="GM2_grey_700">#5F6368</color> <color name="GM2_grey_800">#3C4043</color> <color name="GM2_grey_900">#202124</color> <color name="GM2_red_300">#F28B82</color> <color name="GM2_red_500">#B71C1C</color> </resources> packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +54 −44 Original line number Diff line number Diff line Loading @@ -383,8 +383,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, mHasLogoutButton = true; } } else if (GLOBAL_ACTION_KEY_EMERGENCY.equals(actionKey)) { if (shouldUseSeparatedView() && !mEmergencyAffordanceManager.needsEmergencyAffordance()) { if (!mEmergencyAffordanceManager.needsEmergencyAffordance()) { mItems.add(new EmergencyDialerAction()); } } else { Loading @@ -395,7 +394,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } if (mEmergencyAffordanceManager.needsEmergencyAffordance()) { mItems.add(getEmergencyAction()); mItems.add(new EmergencyAffordanceAction()); } mAdapter = new MyAdapter(); Loading Loading @@ -484,22 +483,33 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } } private class EmergencyDialerAction extends SinglePressAction { private EmergencyDialerAction() { super(R.drawable.ic_faster_emergency, R.string.global_action_emergency); private abstract class EmergencyAction extends SinglePressAction { EmergencyAction(int iconResId, int messageResId) { super(iconResId, messageResId); } @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_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE, EmergencyDialerConstants.ENTRY_TYPE_POWER_MENU); mContext.startActivityAsUser(intent, UserHandle.CURRENT); public boolean shouldBeSeparated() { return shouldUseSeparatedView(); } @Override public View create( Context context, View convertView, ViewGroup parent, LayoutInflater inflater) { View v = super.create(context, convertView, parent, inflater); int textColor; if (shouldBeSeparated()) { textColor = v.getResources().getColor( com.android.systemui.R.color.global_actions_alert_text); } else { textColor = v.getResources().getColor( com.android.systemui.R.color.global_actions_text); } TextView messageView = v.findViewById(R.id.message); messageView.setTextColor(textColor); ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.getDrawable().setTint(textColor); return v; } @Override Loading @@ -511,10 +521,36 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, public boolean showBeforeProvisioning() { return true; } } private class EmergencyAffordanceAction extends EmergencyAction { EmergencyAffordanceAction() { super(R.drawable.emergency_icon, R.string.global_action_emergency); } @Override public boolean shouldBeSeparated() { return true; public void onPress() { mEmergencyAffordanceManager.performEmergencyCall(); } } private class EmergencyDialerAction extends EmergencyAction { private EmergencyDialerAction() { super(R.drawable.ic_faster_emergency, R.string.global_action_emergency); } @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_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE, EmergencyDialerConstants.ENTRY_TYPE_POWER_MENU); mContext.startActivityAsUser(intent, UserHandle.CURRENT); } } Loading Loading @@ -703,32 +739,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, }; } private Action getEmergencyAction() { Drawable emergencyIcon = mContext.getDrawable(R.drawable.emergency_icon); if (!shouldUseSeparatedView()) { // use un-colored legacy treatment emergencyIcon.setTintList(null); } return new SinglePressAction(R.drawable.emergency_icon, R.string.global_action_emergency) { @Override public void onPress() { mEmergencyAffordanceManager.performEmergencyCall(); } @Override public boolean showDuringKeyguard() { return true; } @Override public boolean showBeforeProvisioning() { return true; } }; } private Action getAssistAction() { return new SinglePressAction(R.drawable.ic_action_assist_focused, R.string.global_action_assist) { Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsGridLayout.java +8 −3 Original line number Diff line number Diff line Loading @@ -42,11 +42,16 @@ public class GlobalActionsGridLayout extends MultiListLayout { } private void setBackgrounds() { int gridBackgroundColor = getResources().getColor( com.android.systemui.R.color.global_actions_grid_background, null); int separatedBackgroundColor = getResources().getColor( com.android.systemui.R.color.global_actions_separated_background, null); HardwareBgDrawable listBackground = new HardwareBgDrawable(true, true, getContext()); HardwareBgDrawable separatedViewBackground = new HardwareBgDrawable(true, true, getContext()); HardwareBgDrawable separatedBackground = new HardwareBgDrawable(true, true, getContext()); listBackground.setTint(gridBackgroundColor); separatedBackground.setTint(separatedBackgroundColor); getListView().setBackground(listBackground); getSeparatedView().setBackground(separatedViewBackground); getSeparatedView().setBackground(separatedBackground); } @Override Loading packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java +1 −1 File changed.Contains only whitespace changes. Show changes Loading
packages/SystemUI/res/layout/global_actions_grid.xml +0 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:orientation="vertical" android:background="?android:attr/colorBackgroundFloating" android:gravity="center" android:translationZ="@dimen/global_actions_translate" /> Loading @@ -48,7 +47,6 @@ android:paddingRight="@dimen/global_actions_grid_horizontal_padding" android:paddingTop="@dimen/global_actions_grid_vertical_padding" android:paddingBottom="@dimen/global_actions_grid_vertical_padding" android:background="?android:attr/colorBackgroundFloating" > <LinearLayout android:layout_width="wrap_content" Loading
packages/SystemUI/res/values-night/colors.xml +12 −0 Original line number Diff line number Diff line Loading @@ -47,4 +47,16 @@ <!-- The color of the background in the bottom part of QSCustomizer --> <color name="qs_customize_decoration">@color/GM2_grey_800</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">@color/GM2_grey_900</color> <!-- The color of the background in the grid of the Global Actions menu --> <color name="global_actions_grid_background">@color/GM2_grey_800</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_text">@color/GM2_grey_200</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_alert_text">@color/GM2_red_300</color> </resources> No newline at end of file
packages/SystemUI/res/values/colors.xml +15 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,18 @@ <color name="qs_customize_background">@color/GM2_grey_50</color> <color name="qs_customize_decoration">@color/GM2_grey_100</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">@color/GM2_grey_300</color> <!-- The color of the background in the grid of the Global Actions menu --> <color name="global_actions_grid_background">@color/GM2_grey_200</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_text">@color/GM2_grey_900</color> <!-- The color of the text in the Global Actions menu --> <color name="global_actions_alert_text">@color/GM2_red_500</color> <!-- Tint color for the content on the notification overflow card. --> <color name="keyguard_overflow_content_color">#ff686868</color> Loading Loading @@ -149,4 +161,7 @@ <color name="GM2_grey_700">#5F6368</color> <color name="GM2_grey_800">#3C4043</color> <color name="GM2_grey_900">#202124</color> <color name="GM2_red_300">#F28B82</color> <color name="GM2_red_500">#B71C1C</color> </resources>
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +54 −44 Original line number Diff line number Diff line Loading @@ -383,8 +383,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, mHasLogoutButton = true; } } else if (GLOBAL_ACTION_KEY_EMERGENCY.equals(actionKey)) { if (shouldUseSeparatedView() && !mEmergencyAffordanceManager.needsEmergencyAffordance()) { if (!mEmergencyAffordanceManager.needsEmergencyAffordance()) { mItems.add(new EmergencyDialerAction()); } } else { Loading @@ -395,7 +394,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } if (mEmergencyAffordanceManager.needsEmergencyAffordance()) { mItems.add(getEmergencyAction()); mItems.add(new EmergencyAffordanceAction()); } mAdapter = new MyAdapter(); Loading Loading @@ -484,22 +483,33 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } } private class EmergencyDialerAction extends SinglePressAction { private EmergencyDialerAction() { super(R.drawable.ic_faster_emergency, R.string.global_action_emergency); private abstract class EmergencyAction extends SinglePressAction { EmergencyAction(int iconResId, int messageResId) { super(iconResId, messageResId); } @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_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE, EmergencyDialerConstants.ENTRY_TYPE_POWER_MENU); mContext.startActivityAsUser(intent, UserHandle.CURRENT); public boolean shouldBeSeparated() { return shouldUseSeparatedView(); } @Override public View create( Context context, View convertView, ViewGroup parent, LayoutInflater inflater) { View v = super.create(context, convertView, parent, inflater); int textColor; if (shouldBeSeparated()) { textColor = v.getResources().getColor( com.android.systemui.R.color.global_actions_alert_text); } else { textColor = v.getResources().getColor( com.android.systemui.R.color.global_actions_text); } TextView messageView = v.findViewById(R.id.message); messageView.setTextColor(textColor); ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.getDrawable().setTint(textColor); return v; } @Override Loading @@ -511,10 +521,36 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, public boolean showBeforeProvisioning() { return true; } } private class EmergencyAffordanceAction extends EmergencyAction { EmergencyAffordanceAction() { super(R.drawable.emergency_icon, R.string.global_action_emergency); } @Override public boolean shouldBeSeparated() { return true; public void onPress() { mEmergencyAffordanceManager.performEmergencyCall(); } } private class EmergencyDialerAction extends EmergencyAction { private EmergencyDialerAction() { super(R.drawable.ic_faster_emergency, R.string.global_action_emergency); } @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_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE, EmergencyDialerConstants.ENTRY_TYPE_POWER_MENU); mContext.startActivityAsUser(intent, UserHandle.CURRENT); } } Loading Loading @@ -703,32 +739,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, }; } private Action getEmergencyAction() { Drawable emergencyIcon = mContext.getDrawable(R.drawable.emergency_icon); if (!shouldUseSeparatedView()) { // use un-colored legacy treatment emergencyIcon.setTintList(null); } return new SinglePressAction(R.drawable.emergency_icon, R.string.global_action_emergency) { @Override public void onPress() { mEmergencyAffordanceManager.performEmergencyCall(); } @Override public boolean showDuringKeyguard() { return true; } @Override public boolean showBeforeProvisioning() { return true; } }; } private Action getAssistAction() { return new SinglePressAction(R.drawable.ic_action_assist_focused, R.string.global_action_assist) { Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsGridLayout.java +8 −3 Original line number Diff line number Diff line Loading @@ -42,11 +42,16 @@ public class GlobalActionsGridLayout extends MultiListLayout { } private void setBackgrounds() { int gridBackgroundColor = getResources().getColor( com.android.systemui.R.color.global_actions_grid_background, null); int separatedBackgroundColor = getResources().getColor( com.android.systemui.R.color.global_actions_separated_background, null); HardwareBgDrawable listBackground = new HardwareBgDrawable(true, true, getContext()); HardwareBgDrawable separatedViewBackground = new HardwareBgDrawable(true, true, getContext()); HardwareBgDrawable separatedBackground = new HardwareBgDrawable(true, true, getContext()); listBackground.setTint(gridBackgroundColor); separatedBackground.setTint(separatedBackgroundColor); getListView().setBackground(listBackground); getSeparatedView().setBackground(separatedViewBackground); getSeparatedView().setBackground(separatedBackground); } @Override Loading
packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java +1 −1 File changed.Contains only whitespace changes. Show changes