Merge "Import translations. DO NOT MERGE" into nyc-mr1-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 388120a..3b8755d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -6541,6 +6541,9 @@
    <!-- Message for encryption dialog telling the user that Talkback and other accessibility services will be disabled. -->
    <string name="encrypt_talkback_dialog_message_password">When you enter your password to start this device, accessibility services like <xliff:g id="service" example="TalkBack">%1$s</xliff:g> won\u2019t yet be available.</string>
 
+   <!-- [CHAR LIMIT=NONE] Dialog body explaining that the app just selected by the user will not work after a reboot until until after the user enters their credentials, such as a PIN or password. -->
+   <string name="direct_boot_unaware_dialog_message">Note: After a reboot, this app can\'t start until you unlock your phone</string>
+
    <!-- Title and summary for SIM Status -->
    <string name="imei_information_title">IMEI information</string>
    <string name="imei_information_summary">IMEI relative information</string>
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index 3d57fc1..22d3e97 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -84,11 +84,12 @@
                 android:summary="@string/device_info_default"/>
 
         <!-- Security patch level -->
-        <Preference android:key="security_patch"
-                android:enabled="false"
-                android:shouldDisableView="false"
+        <PreferenceScreen android:key="security_patch"
                 android:title="@string/security_patch"
-                android:summary="@string/device_info_default"/>
+                android:summary="@string/device_info_default">
+                <intent android:action="android.intent.action.VIEW"
+                        android:data="https://source.android.com/security/bulletin/" />
+        </PreferenceScreen>
 
         <!-- Device FCC equipment id -->
         <Preference android:key="fcc_equipment_id"
diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
index b49bb7b..b161c41 100644
--- a/src/com/android/settings/dashboard/DashboardAdapter.java
+++ b/src/com/android/settings/dashboard/DashboardAdapter.java
@@ -53,6 +53,8 @@
     public static final String TAG = "DashboardAdapter";
     private static final String STATE_SUGGESTION_LIST = "suggestion_list";
     private static final String STATE_CATEGORY_LIST = "category_list";
+    private static final String STATE_IS_SHOWING_ALL = "is_showing_all";
+    private static final String STATE_SUGGESTION_MODE = "suggestion_mode";
     private static final int NS_SPACER = 0;
     private static final int NS_SUGGESTION = 1000;
     private static final int NS_ITEMS = 2000;
@@ -92,12 +94,16 @@
         mConditions = conditions;
 
         setHasStableIds(true);
-        setShowingAll(true);
 
+        boolean showAll = true;
         if (savedInstanceState != null) {
             mSuggestions = savedInstanceState.getParcelableArrayList(STATE_SUGGESTION_LIST);
             mCategories = savedInstanceState.getParcelableArrayList(STATE_CATEGORY_LIST);
+            showAll = savedInstanceState.getBoolean(STATE_IS_SHOWING_ALL, true);
+            mSuggestionMode = savedInstanceState.getInt(
+                    STATE_SUGGESTION_MODE, SUGGESTION_MODE_DEFAULT);
         }
+        setShowingAll(showAll);
     }
 
     public List<Tile> getSuggestions() {
@@ -149,10 +155,8 @@
     }
 
     public void setConditions(List<Condition> conditions) {
-        if (!Objects.equals(mConditions, conditions)) {
-            mConditions = conditions;
-            recountItems();
-        }
+        mConditions = conditions;
+        recountItems();
     }
 
     public boolean isShowingAll() {
@@ -441,9 +445,16 @@
     }
 
     void onSaveInstanceState(Bundle outState) {
-        outState.putParcelableArrayList(STATE_SUGGESTION_LIST, new ArrayList<Tile>(mSuggestions));
-        outState.putParcelableArrayList(STATE_CATEGORY_LIST,
-                new ArrayList<DashboardCategory>(mCategories));
+        if (mSuggestions != null) {
+            outState.putParcelableArrayList(STATE_SUGGESTION_LIST,
+                    new ArrayList<Tile>(mSuggestions));
+        }
+        if (mCategories != null) {
+            outState.putParcelableArrayList(STATE_CATEGORY_LIST,
+                    new ArrayList<DashboardCategory>(mCategories));
+        }
+        outState.putBoolean(STATE_IS_SHOWING_ALL, mIsShowingAll);
+        outState.putInt(STATE_SUGGESTION_MODE, mSuggestionMode);
     }
 
     private static class IconCache {