Merge "Fix NFC state switched off every time user entered connection preferences page"
diff --git a/res/drawable/ic_settings_adaptive_sleep.xml b/res/drawable/ic_settings_adaptive_sleep.xml
index 765ed94..ac103dd 100644
--- a/res/drawable/ic_settings_adaptive_sleep.xml
+++ b/res/drawable/ic_settings_adaptive_sleep.xml
@@ -20,12 +20,12 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="#12B5CB"
android:pathData="M10.67,21H7v-1h3.13c-0.27-0.63-0.46-1.3-0.56-2H7V6h10v3.5c0.69,0,1.36,0.1,2,0.28V3 c0-1.1-0.9-1.99-2-1.99L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h5.52C11.79,22.45,11.16,21.77,10.67,21z M7,3h10v1H7V3z" />
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="#FA903E"
android:pathData="M17,12.5c2.48,0,4.5,2.02,4.5,4.5s-2.02,4.5-4.5,4.5s-4.5-2.02-4.5-4.5S14.52,12.5,17,12.5 M17,11 c-3.31,0-6,2.69-6,6s2.69,6,6,6c3.31,0,6-2.69,6-6S20.31,11,17,11L17,11z" />
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="#FA903E"
android:pathData="M17,14v3l-2.12,2.12C15.42,19.66,16.17,20,17,20c1.66,0,3-1.34,3-3S18.66,14,17,14z" />
</vector>
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 510fa0f..43557fb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -10205,7 +10205,7 @@
<!-- Title text for swipe up to switch apps [CHAR LIMIT=60] -->
<string name="swipe_up_to_switch_apps_title">2-button navigation</string>
<!-- Summary text for swipe up to switch apps [CHAR LIMIT=250] -->
- <string name="swipe_up_to_switch_apps_summary">To switch apps, swipe up on the Home button. Swipe up again to see all apps. Works from any screen. You’ll no longer have an Overview button on the bottom right of your screen.</string>
+ <string name="swipe_up_to_switch_apps_summary">To switch apps, swipe up on the Home button. To see all apps, swipe up again. To go back, tap the back button.</string>
<!-- Title for settings suggestion for swipe up to switch apps [CHAR LIMIT=60] -->
<string name="swipe_up_to_switch_apps_suggestion_title">Try the new Home button</string>
<!-- Summary for settings suggestion for swipe up to switch apps [CHAR LIMIT=60] -->
@@ -10214,12 +10214,12 @@
<!-- Title text for edge to edge navigation [CHAR LIMIT=60] -->
<string name="edge_to_edge_navigation_title">Gesture navigation</string>
<!-- Summary text for edge to edge navigation [CHAR LIMIT=NONE] -->
- <string name="edge_to_edge_navigation_summary">To go Home, swipe up from the bottom of the screen. To go Back, swipe from either the left or right edge of the screen. To switch apps, start swiping up from the bottom of the screen and hold before releasing.</string>
+ <string name="edge_to_edge_navigation_summary">To go Home, swipe up from the bottom of the screen. To switch apps, swipe up from the bottom, hold, then release. To go back, swipe from either the left or right edge.</string>
<!-- Title text for 3-button navigation [CHAR LIMIT=60] -->
<string name="legacy_navigation_title">3-button navigation</string>
<!-- Summary text for 3-button navigation [CHAR LIMIT=NONE] -->
- <string name="legacy_navigation_summary">Classic Android navigation mode where going Home, switching apps, and going Back are accessible via buttons.</string>
+ <string name="legacy_navigation_summary">Go back, Home, and switch apps with buttons at the bottom of your screen.</string>
<!-- Search keywords for System Navigation settings. [CHAR_LIMIT=NONE]-->
<string name="keywords_system_navigation">system navigation, 2 button navigation, 3 button navigation, gesture navigation</string>
diff --git a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
index 0e96b05..3da5763 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java
@@ -16,7 +16,7 @@
package com.android.settings.homepage.contextualcards.slices;
-import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.AVAILABLE_UNSEARCHABLE;
import static com.android.settings.display.AdaptiveSleepPreferenceController.PREF_NAME;
import static com.android.settings.display.AdaptiveSleepPreferenceController.isControllerAvailable;
import static com.android.settings.slices.CustomSliceRegistry.CONTEXTUAL_ADAPTIVE_SLEEP_URI;
@@ -90,6 +90,7 @@
final ListBuilder listBuilder = new ListBuilder(mContext,
CONTEXTUAL_ADAPTIVE_SLEEP_URI,
ListBuilder.INFINITY)
+ .setAccentColor(COLOR_NOT_TINTED)
.addRow(new ListBuilder.RowBuilder()
.setTitleItem(icon, ListBuilder.ICON_IMAGE)
.setTitle(title)
@@ -150,6 +151,6 @@
*/
@VisibleForTesting
boolean isSettingsAvailable() {
- return isControllerAvailable(mContext) == AVAILABLE;
+ return isControllerAvailable(mContext) == AVAILABLE_UNSEARCHABLE;
}
}
\ No newline at end of file
diff --git a/src/com/android/settings/notification/GentleDrawablePreferenceController.java b/src/com/android/settings/notification/GentleDrawablePreferenceController.java
index cdadf5a..b4e18db 100644
--- a/src/com/android/settings/notification/GentleDrawablePreferenceController.java
+++ b/src/com/android/settings/notification/GentleDrawablePreferenceController.java
@@ -72,7 +72,7 @@
private boolean showOnLockscreen() {
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) == ON;
+ Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, ON) == ON;
}
private boolean showOnStatusBar() {
diff --git a/src/com/android/settings/notification/GentleNotificationsPreferenceController.java b/src/com/android/settings/notification/GentleNotificationsPreferenceController.java
index 97e4e25..ea16e72 100644
--- a/src/com/android/settings/notification/GentleNotificationsPreferenceController.java
+++ b/src/com/android/settings/notification/GentleNotificationsPreferenceController.java
@@ -69,7 +69,7 @@
private boolean showOnLockscreen() {
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) == ON;
+ Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, ON) == ON;
}
private boolean showOnStatusBar() {
diff --git a/src/com/android/settings/notification/ImportancePreferenceController.java b/src/com/android/settings/notification/ImportancePreferenceController.java
index dc59275..4ef4593 100644
--- a/src/com/android/settings/notification/ImportancePreferenceController.java
+++ b/src/com/android/settings/notification/ImportancePreferenceController.java
@@ -66,7 +66,7 @@
pref.setImportance(mChannel.getImportance());
pref.setDisplayInStatusBar(mBackend.showSilentInStatusBar(mContext.getPackageName()));
pref.setDisplayOnLockscreen(Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) == 1);
+ Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 1) == 1);
}
}
diff --git a/src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java b/src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java
index 5d08ac7..df1f4a2 100644
--- a/src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java
+++ b/src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java
@@ -150,11 +150,11 @@
private boolean getLockscreenNotificationsEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
+ Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1) != 0;
}
private boolean getLockscreenSilentNotificationsEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) != 0;
+ Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 1) != 0;
}
}
diff --git a/src/com/android/settings/notification/SilentLockscreenPreferenceController.java b/src/com/android/settings/notification/SilentLockscreenPreferenceController.java
index 219d312..317f7da 100644
--- a/src/com/android/settings/notification/SilentLockscreenPreferenceController.java
+++ b/src/com/android/settings/notification/SilentLockscreenPreferenceController.java
@@ -38,7 +38,7 @@
@Override
public boolean isChecked() {
return Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) == 1;
+ Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 1) == 1;
}
@Override
diff --git a/tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java
index 6907051..a341def 100644
--- a/tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java
@@ -133,6 +133,18 @@
}
@Test
+ public void updateState_allNotifsOnLockscreen_isDefault() {
+ // settings don't exist
+
+ mController.updateState(mPreference);
+
+ assertThat(mPreference.getValue()).isEqualTo(
+ String.valueOf(R.string.lock_screen_notifs_show_all));
+ assertThat(mPreference.getSummary())
+ .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_all));
+ }
+
+ @Test
public void updateState_dpmSaysNo() {
Settings.Secure.putInt(mContext.getContentResolver(),
LOCK_SCREEN_SHOW_NOTIFICATIONS,