Merge "Apply footer icon for Smart Storage" into sc-dev am: f38af98895 am: 2c4337ac0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13422710
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iadc4d28caabfa179902ca1bfa9bede55b91fd785
diff --git a/res/xml/automatic_storage_management_settings.xml b/res/xml/automatic_storage_management_settings.xml
index 1428741..0c9e9b5 100644
--- a/res/xml/automatic_storage_management_settings.xml
+++ b/res/xml/automatic_storage_management_settings.xml
@@ -23,13 +23,12 @@
android:summary="%s"
android:title="@string/automatic_storage_manager_days_title"
android:entries="@array/automatic_storage_management_days"
- android:entryValues="@array/automatic_storage_management_days_values"
- settings:allowDividerBelow="true" />
+ android:entryValues="@array/automatic_storage_management_days_values" />
- <Preference
+ <com.android.settingslib.widget.FooterPreference
android:key="freed_bytes"
android:persistent="false"
android:selectable="false"
- settings:allowDividerAbove="true" />
+ settings:searchable="false"/>
</PreferenceScreen>
\ No newline at end of file
diff --git a/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceController.java b/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceController.java
index d11e68b..4cd7949 100644
--- a/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceController.java
+++ b/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceController.java
@@ -19,13 +19,13 @@
import android.text.format.DateUtils;
import android.text.format.Formatter;
-import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.Utils;
import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settingslib.widget.FooterPreference;
/**
* Handles the wall of text which appears below the options in the Storage Management settings drill
@@ -51,7 +51,7 @@
@Override
public void displayPreference(PreferenceScreen screen) {
- Preference preference = screen.findPreference(getPreferenceKey());
+ final FooterPreference preference = screen.findPreference(getPreferenceKey());
final Context context = preference.getContext();
ContentResolver cr = context.getContentResolver();
long freedBytes =
diff --git a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceControllerTest.java
index 19ecc54..dbdbf38 100644
--- a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerDescriptionPreferenceControllerTest.java
@@ -7,10 +7,10 @@
import android.content.Context;
import android.provider.Settings;
-import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
+import com.android.settingslib.widget.FooterPreference;
import org.junit.Before;
import org.junit.Ignore;
@@ -28,7 +28,7 @@
@Mock
private PreferenceScreen mScreen;
@Mock
- private Preference mPreference;
+ private FooterPreference mPreference;
private AutomaticStorageManagerDescriptionPreferenceController mController;
private Context mContext = RuntimeEnvironment.application;