Merge "Move Power menu from Gesture to System Settings" into sc-dev
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index 48a204f..b9f5009 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -2424,7 +2424,7 @@
errorLine1=" android:fillColor="@color/face_intro_outline""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="res/drawable/face_enroll_introduction.xml"
+ file="res/drawable/face_enroll_icon_large.xml"
line="25"
column="9"/>
</issue>
diff --git a/res/drawable/face_enroll_introduction.xml b/res/drawable/face_enroll_icon_large.xml
similarity index 86%
rename from res/drawable/face_enroll_introduction.xml
rename to res/drawable/face_enroll_icon_large.xml
index 217b13c..578a4a9 100644
--- a/res/drawable/face_enroll_introduction.xml
+++ b/res/drawable/face_enroll_icon_large.xml
@@ -19,26 +19,27 @@
android:width="300dp"
android:height="300dp"
android:viewportWidth="300"
- android:viewportHeight="300">
+ android:viewportHeight="300"
+ android:tint="@color/face_enroll_icon_color">
<path
- android:fillColor="@color/face_intro_outline"
+ android:fillColor="#FF000000"
android:fillType="evenOdd"
android:pathData="M150,0C67.16,0,0,67.16,0,150s67.16,150,150,150 s150-67.16,150-150S232.84,0,150,0 M150,4c39,0,75.66,15.19,103.24,42.76C280.81,74.34,296,111,296,150s-15.19,75.66-42.76,103.24 C225.66,280.81,189,296,150,296s-75.66-15.19-103.24-42.76C19.19,225.66,4,189,4,150S19.19,74.34,46.76,46.76 C74.34,19.19,111,4,150,4" />
<path
- android:fillColor="?android:attr/colorAccent"
+ android:fillColor="#FF000000"
android:fillType="evenOdd"
android:pathData="M220,120c0,5.52-4.48,10-10,10s-10-4.48-10-10 s4.48-10,10-10S220,114.48,220,120" />
<path
- android:fillColor="?android:attr/colorAccent"
+ android:fillColor="#FF000000"
android:fillType="evenOdd"
android:pathData="M90,130c-5.52,0-10-4.48-10-10s4.48-10,10-10 s10,4.48,10,10S95.52,130,90,130" />
<path
- android:fillColor="?android:attr/colorAccent"
+ android:fillColor="#FF000000"
android:fillType="evenOdd"
android:pathData="M164.2,215.88c-3.83,3.25-8.79,5.22-14.2,5.22 c-12.13,0-22-9.87-22-22c0-0.03,0-0.06,0-0.09l-8-0.03c0,0.04,0,0.08,0,0.13c0,6.24,1.9,12.03,5.16,16.83 c5.4,7.95,14.51,13.17,24.84,13.17c1.04,0,2.06-0.05,3.08-0.15c6.18-0.63,11.81-3.14,16.3-6.95L164.2,215.88z" />
<path
- android:fillColor="?android:attr/colorAccent"
+ android:fillColor="#FF000000"
android:fillType="evenOdd"
android:pathData="M 153 140 L 153 166 L 137 166 L 137 174 L 161 174 L 161 140 Z" />
</vector>
\ No newline at end of file
diff --git a/res/layout/face_enroll_education.xml b/res/layout/face_enroll_education.xml
index 0149479..a8455da 100644
--- a/res/layout/face_enroll_education.xml
+++ b/res/layout/face_enroll_education.xml
@@ -63,7 +63,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="invisible"
- android:background="@drawable/face_enroll_introduction"/>
+ android:background="@drawable/face_enroll_icon_large"/>
</FrameLayout>
diff --git a/res/layout/face_enroll_finish.xml b/res/layout/face_enroll_finish.xml
index d3c0479..30a6957 100644
--- a/res/layout/face_enroll_finish.xml
+++ b/res/layout/face_enroll_finish.xml
@@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
- android:src="@drawable/face_enroll_introduction" />
+ android:src="@drawable/face_enroll_icon_large" />
</com.google.android.setupdesign.view.FillContentLayout>
diff --git a/res/values-mcc234/strings.xml b/res/values-mcc234/strings.xml
new file mode 100644
index 0000000..f7d0d33
--- /dev/null
+++ b/res/values-mcc234/strings.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="cell_broadcast_settings">Emergency alerts</string>
+</resources>
\ No newline at end of file
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index 3cc23c3..f262104 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -27,7 +27,7 @@
<color name="notification_importance_button_selected">#AECBFA</color> <!-- material blue 200 -->
<color name="notification_importance_button_unselected">#5F6368</color>
<color name="notification_history_background">#202124</color>
- <color name="face_intro_outline">?android:attr/colorAccent</color>
+
<!-- Palette list preference colors. -->
<color name="palette_list_gradient_background">@android:color/black</color>
<color name="palette_list_color_red">@color/palette_list_dark_mode_color_red</color>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index edef6ef..0b26c13 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -152,7 +152,7 @@
<!-- Search bar background color -->
<color name="search_bar_background">?androidprv:attr/colorSurfaceHighlight</color>
- <color name="face_intro_outline">#ffdadce0</color>
+ <color name="face_enroll_icon_color">#42a5f5</color> <!-- Blue 400 -->
<color name="back_gesture_indicator">#4182ef</color>
diff --git a/src/com/android/settings/gestures/GestureNavigationSettingsAssistController.java b/src/com/android/settings/gestures/GestureNavigationSettingsAssistController.java
index 5c49538..95fd9f1 100644
--- a/src/com/android/settings/gestures/GestureNavigationSettingsAssistController.java
+++ b/src/com/android/settings/gestures/GestureNavigationSettingsAssistController.java
@@ -26,18 +26,16 @@
*/
public class GestureNavigationSettingsAssistController extends TogglePreferenceController {
- // This value is based on SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
- // behaviour. We assume that the gestures are enabled by default.
- private static final int ASSIST_TOUCH_GESTURE_DEFAULT_VALUE = 1;
-
public GestureNavigationSettingsAssistController(Context context, String key) {
super(context, key);
}
@Override
public boolean isChecked() {
+ boolean onByDefault = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_assistTouchGestureEnabledDefault);
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, ASSIST_TOUCH_GESTURE_DEFAULT_VALUE)
+ Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, onByDefault ? 1 : 0)
== 1;
}
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
index 73e9bed..2115947 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
@@ -134,7 +134,7 @@
mController.updateBattery();
assertThat(mBatteryPreference.getSummary())
- .isEqualTo("No battery use since last full charge");
+ .isEqualTo("No battery use for past 24 hours");
}
@Test
@@ -147,7 +147,7 @@
mController.updateBattery();
- assertThat(mBatteryPreference.getSummary()).isEqualTo("60% use since last full charge");
+ assertThat(mBatteryPreference.getSummary()).isEqualTo("60% use for past 24 hours");
}
@Test