Merge "Guard against SecurityException of accessing to slice uri" into rvc-dev am: 28a5c00429
am: ad90366eef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12042286 Change-Id: I68fc9122aa6ae1f98f57ef41503aee9be46d2269
This commit is contained in:
@@ -120,9 +120,13 @@ public class EligibleCardChecker implements Callable<ContextualCard> {
|
||||
|
||||
// Workaround of unpinning slice in the same SerialExecutor of AsyncTask as SliceCallback's
|
||||
// observer.
|
||||
ThreadUtils.postOnMainThread(() ->
|
||||
AsyncTask.execute(() -> manager.unregisterSliceCallback(uri, callback))
|
||||
);
|
||||
ThreadUtils.postOnMainThread(() -> AsyncTask.execute(() -> {
|
||||
try {
|
||||
manager.unregisterSliceCallback(uri, callback);
|
||||
} catch (SecurityException e) {
|
||||
Log.d(TAG, "No permission currently: " + e);
|
||||
}
|
||||
}));
|
||||
|
||||
return slice;
|
||||
}
|
||||
|
Reference in New Issue
Block a user