Backport 'add config to disable snapshots'.
Bug: 201691826 Test: m Merged-In: I83d9ab4a15a862ea220debdd8da8b3d5673da276 Merged-In: Ibdff22eda7be6c91e2872e5ac3ae8f2fe1e65b69 Change-Id: I4914876e4925284d55951d16e472654ee599c619
This commit is contained in:
@@ -5049,4 +5049,7 @@
|
|||||||
|
|
||||||
<!-- the number of the max cached processes in the system. -->
|
<!-- the number of the max cached processes in the system. -->
|
||||||
<integer name="config_customizedMaxCachedProcesses">32</integer>
|
<integer name="config_customizedMaxCachedProcesses">32</integer>
|
||||||
|
|
||||||
|
<!-- Whether this device should support taking app snapshots on closure -->
|
||||||
|
<bool name="config_disableTaskSnapshots">false</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -4426,4 +4426,7 @@
|
|||||||
<java-symbol type="bool" name="config_volumeShowRemoteSessions" />
|
<java-symbol type="bool" name="config_volumeShowRemoteSessions" />
|
||||||
|
|
||||||
<java-symbol type="integer" name="config_customizedMaxCachedProcesses" />
|
<java-symbol type="integer" name="config_customizedMaxCachedProcesses" />
|
||||||
|
|
||||||
|
<java-symbol type="bool" name="config_disableTaskSnapshots" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ class TaskSnapshotController {
|
|||||||
*/
|
*/
|
||||||
private final boolean mIsRunningOnWear;
|
private final boolean mIsRunningOnWear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag indicating if device configuration has disabled app snapshots.
|
||||||
|
*/
|
||||||
|
private final boolean mConfigDisableTaskSnapshots;
|
||||||
|
|
||||||
TaskSnapshotController(WindowManagerService service) {
|
TaskSnapshotController(WindowManagerService service) {
|
||||||
mService = service;
|
mService = service;
|
||||||
mPersister = new TaskSnapshotPersister(mService, Environment::getDataSystemCeDirectory);
|
mPersister = new TaskSnapshotPersister(mService, Environment::getDataSystemCeDirectory);
|
||||||
@@ -131,6 +136,8 @@ class TaskSnapshotController {
|
|||||||
PackageManager.FEATURE_WATCH);
|
PackageManager.FEATURE_WATCH);
|
||||||
mHighResTaskSnapshotScale = mService.mContext.getResources().getFloat(
|
mHighResTaskSnapshotScale = mService.mContext.getResources().getFloat(
|
||||||
com.android.internal.R.dimen.config_highResTaskSnapshotScale);
|
com.android.internal.R.dimen.config_highResTaskSnapshotScale);
|
||||||
|
mConfigDisableTaskSnapshots = mService.mContext.getResources().getBoolean(
|
||||||
|
com.android.internal.R.bool.config_disableTaskSnapshots);
|
||||||
}
|
}
|
||||||
|
|
||||||
void systemReady() {
|
void systemReady() {
|
||||||
@@ -488,7 +495,8 @@ class TaskSnapshotController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean shouldDisableSnapshots() {
|
boolean shouldDisableSnapshots() {
|
||||||
return mIsRunningOnWear || mIsRunningOnTv || mIsRunningOnIoT;
|
return mIsRunningOnWear || mIsRunningOnTv || mIsRunningOnIoT
|
||||||
|
|| mConfigDisableTaskSnapshots;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user