Merge "Fix AppPrediction/Smartspace leak" into tm-dev am: 8683e32060

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19125209

Change-Id: Idec4c4d2f29b2df3e3db9a0662749fef38a0017e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pinyao Ting
2022-07-29 17:09:42 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 24 deletions

View File

@@ -398,18 +398,7 @@ public class AppPredictionPerUserService extends
final IBinder.DeathRecipient mDeathRecipient;
private final RemoteCallbackList<IPredictionCallback> mCallbacks =
new RemoteCallbackList<IPredictionCallback>() {
@Override
public void onCallbackDied(IPredictionCallback callback) {
if (DEBUG) {
Slog.d(TAG, "Binder died for session Id=" + mSessionId
+ " and callback=" + callback.asBinder());
}
if (mCallbacks.getRegisteredCallbackCount() == 0) {
destroy();
}
}
};
new RemoteCallbackList<>();
AppPredictionSessionInfo(
@NonNull final AppPredictionSessionId id,

View File

@@ -334,18 +334,7 @@ public class SmartspacePerUserService extends
@NonNull
private final SmartspaceConfig mSmartspaceConfig;
private final RemoteCallbackList<ISmartspaceCallback> mCallbacks =
new RemoteCallbackList<ISmartspaceCallback>() {
@Override
public void onCallbackDied(ISmartspaceCallback callback) {
if (DEBUG) {
Slog.d(TAG, "Binder died for session Id=" + mSessionId
+ " and callback=" + callback.asBinder());
}
if (mCallbacks.getRegisteredCallbackCount() == 0) {
destroy();
}
}
};
new RemoteCallbackList<>();
SmartspaceSessionInfo(
@NonNull final SmartspaceSessionId id,