Ensure all AttributionSources are deregistered in PMS
this is a cp of aosp/1978250 Bug: 218794347 Test: Presubmit Change-Id: Ie56a2ee60a304ac0d306a71dc4453d11fdf9b44f Merged-In: I39072f3b72f0be6d6debbcbc948d7a940ad92785
This commit is contained in:
@@ -1112,15 +1112,21 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
||||
resolvedAttributionSource, skipCurrentFinish);
|
||||
}
|
||||
|
||||
if (next == null || next.getNext() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
RegisteredAttribution registered =
|
||||
sRunningAttributionSources.remove(current.getToken());
|
||||
if (registered != null) {
|
||||
registered.unregister();
|
||||
}
|
||||
|
||||
if (next == null || next.getNext() == null) {
|
||||
if (next != null) {
|
||||
registered = sRunningAttributionSources.remove(next.getToken());
|
||||
if (registered != null) {
|
||||
registered.unregister();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
current = next;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user