Show full screen 'Free up space' for large screen devices

Uses Intent.FLAG_ACTIVITY_NEW_TASK to start the Activity
and it will shows in different Activity stack.
Then it shows full screen 'Free up space' for different
Activity stack.

Bug: 197703552
Test: manual
      Storage -> click 'Free up space'
Change-Id: I8ce16aa23438424d4990171449884755e36cf21d
This commit is contained in:
Arc Wang
2021-09-13 11:12:40 +08:00
parent d24f289548
commit ec350919ea
2 changed files with 2 additions and 0 deletions

View File

@@ -286,6 +286,7 @@ public class StorageCategoryFragment extends DashboardFragment
metricsFeatureProvider.logClickedPreference(preference, getMetricsCategory());
metricsFeatureProvider.action(context, SettingsEnums.STORAGE_FREE_UP_SPACE_NOW);
final Intent intent = new Intent(StorageManager.ACTION_MANAGE_STORAGE);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivityAsUser(intent, new UserHandle(mUserId));
return true;
}

View File

@@ -486,6 +486,7 @@ public class StorageDashboardFragment extends DashboardFragment
metricsFeatureProvider.logClickedPreference(preference, getMetricsCategory());
metricsFeatureProvider.action(context, SettingsEnums.STORAGE_FREE_UP_SPACE_NOW);
final Intent intent = new Intent(StorageManager.ACTION_MANAGE_STORAGE);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivityAsUser(intent, new UserHandle(mUserId));
return true;
}