Loading core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2685,6 +2685,11 @@ <!-- The amount to scale fullscreen snapshots for Overview and snapshot starting windows. --> <item name="config_fullTaskSnapshotScale" format="float" type="dimen">1.0</item> <!-- The amount to scale reduced scale snapshots for Overview and snapshot starting windows. Reduced scale snapshots are loaded before full screen snapshots to improve load times and minimize the chance the user will see an empty task card. --> <item name="config_reducedTaskSnapshotScale" format="float" type="dimen">0.5</item> <!-- Feature flag to store TaskSnapshot in 16 bit pixel format to save memory. --> <bool name="config_use16BitTaskSnapshotPixelFormat">false</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -360,6 +360,7 @@ <java-symbol type="bool" name="config_enableNewAutoSelectNetworkUI"/> <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/> <java-symbol type="dimen" name="config_fullTaskSnapshotScale" /> <java-symbol type="dimen" name="config_reducedTaskSnapshotScale" /> <java-symbol type="bool" name="config_use16BitTaskSnapshotPixelFormat" /> <java-symbol type="bool" name="config_hasRecents" /> <java-symbol type="string" name="config_recentsComponentName" /> Loading services/core/java/com/android/server/wm/TaskSnapshotPersister.java +7 −3 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ class TaskSnapshotPersister { private static final String TAG = TAG_WITH_CLASS_NAME ? "TaskSnapshotPersister" : TAG_WM; private static final String SNAPSHOTS_DIRNAME = "snapshots"; private static final String REDUCED_POSTFIX = "_reduced"; private static final float REDUCED_SCALE = .5f; private static final float LOW_RAM_REDUCED_SCALE = .8f; static final boolean DISABLE_FULL_SIZED_BITMAPS = ActivityManager.isLowRamDeviceStatic(); private static final long DELAY_MS = 100; Loading Loading @@ -84,8 +83,13 @@ class TaskSnapshotPersister { TaskSnapshotPersister(WindowManagerService service, DirectoryResolver resolver) { mDirectoryResolver = resolver; mReducedScale = ActivityManager.isLowRamDeviceStatic() ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE; if (ActivityManager.isLowRamDeviceStatic()) { mReducedScale = LOW_RAM_REDUCED_SCALE; } else { mReducedScale = service.mContext.getResources().getFloat( com.android.internal.R.dimen.config_reducedTaskSnapshotScale); } mUse16BitFormat = service.mContext.getResources().getBoolean( com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat); } Loading Loading
core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2685,6 +2685,11 @@ <!-- The amount to scale fullscreen snapshots for Overview and snapshot starting windows. --> <item name="config_fullTaskSnapshotScale" format="float" type="dimen">1.0</item> <!-- The amount to scale reduced scale snapshots for Overview and snapshot starting windows. Reduced scale snapshots are loaded before full screen snapshots to improve load times and minimize the chance the user will see an empty task card. --> <item name="config_reducedTaskSnapshotScale" format="float" type="dimen">0.5</item> <!-- Feature flag to store TaskSnapshot in 16 bit pixel format to save memory. --> <bool name="config_use16BitTaskSnapshotPixelFormat">false</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -360,6 +360,7 @@ <java-symbol type="bool" name="config_enableNewAutoSelectNetworkUI"/> <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/> <java-symbol type="dimen" name="config_fullTaskSnapshotScale" /> <java-symbol type="dimen" name="config_reducedTaskSnapshotScale" /> <java-symbol type="bool" name="config_use16BitTaskSnapshotPixelFormat" /> <java-symbol type="bool" name="config_hasRecents" /> <java-symbol type="string" name="config_recentsComponentName" /> Loading
services/core/java/com/android/server/wm/TaskSnapshotPersister.java +7 −3 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ class TaskSnapshotPersister { private static final String TAG = TAG_WITH_CLASS_NAME ? "TaskSnapshotPersister" : TAG_WM; private static final String SNAPSHOTS_DIRNAME = "snapshots"; private static final String REDUCED_POSTFIX = "_reduced"; private static final float REDUCED_SCALE = .5f; private static final float LOW_RAM_REDUCED_SCALE = .8f; static final boolean DISABLE_FULL_SIZED_BITMAPS = ActivityManager.isLowRamDeviceStatic(); private static final long DELAY_MS = 100; Loading Loading @@ -84,8 +83,13 @@ class TaskSnapshotPersister { TaskSnapshotPersister(WindowManagerService service, DirectoryResolver resolver) { mDirectoryResolver = resolver; mReducedScale = ActivityManager.isLowRamDeviceStatic() ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE; if (ActivityManager.isLowRamDeviceStatic()) { mReducedScale = LOW_RAM_REDUCED_SCALE; } else { mReducedScale = service.mContext.getResources().getFloat( com.android.internal.R.dimen.config_reducedTaskSnapshotScale); } mUse16BitFormat = service.mContext.getResources().getBoolean( com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat); } Loading