Show 'Clear storage' on customize manage space button
Settings app may show 'Clear storage' button to clear data or 'Manage space' button to show app customize manage space UI. To have a consistent UI, shows 'Clear storage' button for the 2 cases. Fix: 241486222 Test: manual visual Settings -> Apps -> See all apps -> Photos -> Storage & cache Change-Id: I09f2e651a2844ef809ee269c7114296af69e6bb9
This commit is contained in:
@@ -4663,8 +4663,6 @@
|
||||
<string name="reset_app_preferences_desc">This will reset all preferences for:\n\n<li>Disabled apps</li>\n<li>Disabled app notifications</li>\n<li>Default applications for actions</li>\n<li>Background data restrictions for apps</li>\n<li>Any permission restrictions</li>\n<li>Battery usage settings</li>\n\nYou will not lose any app data.</string>
|
||||
<!-- [CHAR LIMIT=25] Manage applications screen, menu item. Confirmation button of dialog to confirm resetting user's app preferences. -->
|
||||
<string name="reset_app_preferences_button">Reset apps</string>
|
||||
<!-- Manage applications screen, individual app screen, button label when the user wants to manage the space taken up by an app. -->
|
||||
<string name="manage_space_text">Manage space</string>
|
||||
<!-- Text for menu option in ManageApps screen to present various menu options -->
|
||||
<string name="filter">Filter</string>
|
||||
<!-- Title of dialog for presenting filter options -->
|
||||
|
@@ -308,12 +308,8 @@ public class AppStorageSettings extends AppInfoWithHeader
|
||||
.setButton1Icon(R.drawable.ic_settings_delete)
|
||||
.setButton1Enabled(false);
|
||||
mCanClearData = false;
|
||||
} else {
|
||||
if (appHasSpaceManagementUI) {
|
||||
mButtonsPref.setButton1Text(R.string.manage_space_text);
|
||||
} else {
|
||||
mButtonsPref.setButton1Text(R.string.clear_user_data_text);
|
||||
}
|
||||
mButtonsPref.setButton1Icon(R.drawable.ic_settings_delete)
|
||||
.setButton1OnClickListener(v -> handleClearDataClick());
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ public class SwitchBarTest {
|
||||
@Test
|
||||
public void cycleChecked_customLabel_shouldUpdateTextAndBackground() {
|
||||
final int onText = R.string.main_clear_progress_text;
|
||||
final int offText = R.string.manage_space_text;
|
||||
final int offText = R.string.clear_user_data_text;
|
||||
|
||||
mBar.setSwitchBarText(onText, offText);
|
||||
assertThat(((TextView) mBar.findViewById(R.id.switch_text)).getText())
|
||||
|
Reference in New Issue
Block a user