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: Ief328c9a5893a6a337d87a5ccf8f79ffb9416cdb
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:08:32 +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; final IBinder.DeathRecipient mDeathRecipient;
private final RemoteCallbackList<IPredictionCallback> mCallbacks = private final RemoteCallbackList<IPredictionCallback> mCallbacks =
new RemoteCallbackList<IPredictionCallback>() { new RemoteCallbackList<>();
@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();
}
}
};
AppPredictionSessionInfo( AppPredictionSessionInfo(
@NonNull final AppPredictionSessionId id, @NonNull final AppPredictionSessionId id,

View File

@@ -334,18 +334,7 @@ public class SmartspacePerUserService extends
@NonNull @NonNull
private final SmartspaceConfig mSmartspaceConfig; private final SmartspaceConfig mSmartspaceConfig;
private final RemoteCallbackList<ISmartspaceCallback> mCallbacks = private final RemoteCallbackList<ISmartspaceCallback> mCallbacks =
new RemoteCallbackList<ISmartspaceCallback>() { new RemoteCallbackList<>();
@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();
}
}
};
SmartspaceSessionInfo( SmartspaceSessionInfo(
@NonNull final SmartspaceSessionId id, @NonNull final SmartspaceSessionId id,