diff options
| author | 2022-03-01 02:35:12 +0000 | |
|---|---|---|
| committer | 2022-03-14 19:00:10 +0000 | |
| commit | 9ad2b6111fb8811d6582fac73837f642fd99d8c6 (patch) | |
| tree | 3ce4739da2800623de5846f9879e9a4a32edf9ff | |
| parent | e2f5e4acb48db852b6a603eee5e5dcac65965710 (diff) | |
Refrain from persisting shortcuts into AppSearch in low end device
As observed in b/220133968, on low-end devices, persisting shortcut into
AppSearch on a background thread introduces 50ms delay on app start time.
Given that there isn't a clear product roadmap for such feature to work
on Go devices, we will disable the integration until we have a concrete
demand for such feature that justfies the performance cost on low end
devices.
Bug: 220133968
Test: atest CtsShortcutManagerTestCases
Change-Id: I10339b3b3211b20994a8bca581504ea609b985ee
Merged-In: I10339b3b3211b20994a8bca581504ea609b985ee
| -rw-r--r-- | services/core/java/com/android/server/pm/ShortcutService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java index 1cf2dc52e430..25fe0007ec4b 100644 --- a/services/core/java/com/android/server/pm/ShortcutService.java +++ b/services/core/java/com/android/server/pm/ShortcutService.java @@ -488,7 +488,8 @@ public class ShortcutService extends IShortcutService.Stub { mShortcutBitmapSaver = new ShortcutBitmapSaver(this); mShortcutDumpFiles = new ShortcutDumpFiles(this); mIsAppSearchEnabled = DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI, - SystemUiDeviceConfigFlags.SHORTCUT_APPSEARCH_INTEGRATION, true); + SystemUiDeviceConfigFlags.SHORTCUT_APPSEARCH_INTEGRATION, true) + && !injectIsLowRamDevice(); if (onlyForPackageManagerApis) { return; // Don't do anything further. For unit tests only. |