diff options
-rw-r--r-- | res/layout/search_panel.xml | 10 | ||||
-rw-r--r-- | res/values-night/colors.xml | 19 | ||||
-rw-r--r-- | res/values/colors.xml | 2 | ||||
-rw-r--r-- | res/values/dimens.xml | 9 | ||||
-rw-r--r-- | src/com/android/settings/intelligence/search/indexing/IndexDatabaseHelper.java | 4 |
5 files changed, 31 insertions, 13 deletions
diff --git a/res/layout/search_panel.xml b/res/layout/search_panel.xml index 5f621cd..52caeb3 100644 --- a/res/layout/search_panel.xml +++ b/res/layout/search_panel.xml @@ -25,21 +25,19 @@ android:id="@+id/search_bar_container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/search_panel_background" - android:elevation="4dp"> + android:background="?android:attr/colorPrimary"> <androidx.cardview.widget.CardView android:id="@+id/search_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/search_bar_margin" - app:cardCornerRadius="2dp" - app:cardBackgroundColor="?android:attr/colorBackground" - app:cardElevation="2dp"> + app:cardCornerRadius="@dimen/search_bar_corner_radius" + app:cardElevation="0dp"> <Toolbar android:id="@+id/search_toolbar" android:layout_width="match_parent" android:layout_height="@dimen/search_bar_height" - android:background="?android:attr/selectableItemBackground" + android:background="@color/search_panel_background" android:contentInsetStart="0dp" android:contentInsetStartWithNavigation="0dp" android:theme="?android:attr/actionBarTheme"> diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml new file mode 100644 index 0000000..a2f534b --- /dev/null +++ b/res/values-night/colors.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 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> + <color name="search_panel_background">@*android:color/surface_variant_dark</color> +</resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index a2105f0..b2f02b8 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -18,5 +18,5 @@ <resources> <color name="launcher_background_color">#ff008577</color> - <color name="search_panel_background">#f2f2f2</color> + <color name="search_panel_background">@*android:color/surface_highlight_light</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 8a40eb6..ef07d9d 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -26,11 +26,12 @@ <!-- The following two margins need to match, with the caveat that the second should be negative. The second one ensures that the icons and text align despite the additional padding caused by the search bar's card background. --> - <dimen name="search_bar_margin">8dp</dimen> - <dimen name="search_bar_negative_margin">-8dp</dimen> + <dimen name="search_bar_margin">16dp</dimen> + <dimen name="search_bar_negative_margin">-16dp</dimen> - <dimen name="search_bar_height">48dp</dimen> - <dimen name="search_bar_text_size">16dp</dimen> + <dimen name="search_bar_height">52dp</dimen> + <dimen name="search_bar_text_size">20sp</dimen> + <dimen name="search_bar_corner_radius">28dp</dimen> <!-- Dashboard image tile size --> <dimen name="dashboard_tile_image_size">24dp</dimen> diff --git a/src/com/android/settings/intelligence/search/indexing/IndexDatabaseHelper.java b/src/com/android/settings/intelligence/search/indexing/IndexDatabaseHelper.java index b9211e7..b7ec6da 100644 --- a/src/com/android/settings/intelligence/search/indexing/IndexDatabaseHelper.java +++ b/src/com/android/settings/intelligence/search/indexing/IndexDatabaseHelper.java @@ -291,7 +291,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper { */ static void setIndexed(Context context, List<ResolveInfo> providers) { final String localeStr = Locale.getDefault().toString(); - final String fingerprint = Build.FINGERPRINT; + final String fingerprint = Build.VERSION.INCREMENTAL; final String providerVersionedNames = IndexDatabaseHelper.buildProviderVersionedNames(context, providers); final String devicePolicyResourcesVersion = context.getSystemService( @@ -316,7 +316,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper { */ static boolean isFullIndex(Context context, List<ResolveInfo> providers) { final String localeStr = Locale.getDefault().toString(); - final String fingerprint = Build.FINGERPRINT; + final String fingerprint = Build.VERSION.INCREMENTAL; final String providerVersionedNames = IndexDatabaseHelper.buildProviderVersionedNames(context, providers); final SharedPreferences prefs = context |