Merge "Prevent fatal exception at AppOpsService$InProgressStartOpEvent#finish" into sc-dev am: defab5707c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15302655 Change-Id: I837e751493b92cf214b66f80214a513c39f4372d
This commit is contained in:
@@ -202,6 +202,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
import java.util.Scanner;
|
||||
import java.util.Set;
|
||||
@@ -775,7 +776,11 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
|
||||
/** Clean up event */
|
||||
public void finish() {
|
||||
mClientId.unlinkToDeath(this, 0);
|
||||
try {
|
||||
mClientId.unlinkToDeath(this, 0);
|
||||
} catch (NoSuchElementException e) {
|
||||
// Either not linked, or already unlinked. Either way, nothing to do.
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user