Loading services/core/java/com/android/server/pm/ShortcutPackage.java +14 −0 Original line number Diff line number Diff line Loading @@ -2419,6 +2419,20 @@ class ShortcutPackage extends ShortcutPackageItem { } } void closeAppSearchSession() { synchronized (mLock) { if (mAppSearchSession != null) { final long callingIdentity = Binder.clearCallingIdentity(); try { mAppSearchSession.close(); } finally { Binder.restoreCallingIdentity(callingIdentity); } } mAppSearchSession = null; } } @NonNull private AndroidFuture<AppSearchSession> setupSchema( @NonNull final AppSearchSession session) { Loading services/core/java/com/android/server/pm/ShortcutService.java +4 −1 Original line number Diff line number Diff line Loading @@ -1050,7 +1050,10 @@ public class ShortcutService extends IShortcutService.Stub { file.failWrite(os); } getUserShortcutsLocked(userId).logSharingShortcutStats(mMetricsLogger); final ShortcutUser user = getUserShortcutsLocked(userId); // Close AppSearchSession to flush pending changes. user.forAllPackages(ShortcutPackage::closeAppSearchSession); user.logSharingShortcutStats(mMetricsLogger); } @GuardedBy("mLock") Loading Loading
services/core/java/com/android/server/pm/ShortcutPackage.java +14 −0 Original line number Diff line number Diff line Loading @@ -2419,6 +2419,20 @@ class ShortcutPackage extends ShortcutPackageItem { } } void closeAppSearchSession() { synchronized (mLock) { if (mAppSearchSession != null) { final long callingIdentity = Binder.clearCallingIdentity(); try { mAppSearchSession.close(); } finally { Binder.restoreCallingIdentity(callingIdentity); } } mAppSearchSession = null; } } @NonNull private AndroidFuture<AppSearchSession> setupSchema( @NonNull final AppSearchSession session) { Loading
services/core/java/com/android/server/pm/ShortcutService.java +4 −1 Original line number Diff line number Diff line Loading @@ -1050,7 +1050,10 @@ public class ShortcutService extends IShortcutService.Stub { file.failWrite(os); } getUserShortcutsLocked(userId).logSharingShortcutStats(mMetricsLogger); final ShortcutUser user = getUserShortcutsLocked(userId); // Close AppSearchSession to flush pending changes. user.forAllPackages(ShortcutPackage::closeAppSearchSession); user.logSharingShortcutStats(mMetricsLogger); } @GuardedBy("mLock") Loading