diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-07-08 18:09:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-07-08 18:09:09 +0000 |
commit | 28a5c00429c52d139ec52a373c0c064e58c1f80b (patch) | |
tree | 34d9c7b69471d0ff1207417980e982c680b472b6 | |
parent | 05ae65b7b00e1abff004fef72927692282f74861 (diff) | |
parent | eaf1564d9fcb644825d2f0275564f039c52fc4ea (diff) | |
download | packages_apps_Settings-28a5c00429c52d139ec52a373c0c064e58c1f80b.tar.gz packages_apps_Settings-28a5c00429c52d139ec52a373c0c064e58c1f80b.tar.bz2 packages_apps_Settings-28a5c00429c52d139ec52a373c0c064e58c1f80b.zip |
Merge "Guard against SecurityException of accessing to slice uri" into rvc-dev
-rw-r--r-- | src/com/android/settings/homepage/contextualcards/EligibleCardChecker.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/settings/homepage/contextualcards/EligibleCardChecker.java b/src/com/android/settings/homepage/contextualcards/EligibleCardChecker.java index 46b4c869ec..f98d795521 100644 --- a/src/com/android/settings/homepage/contextualcards/EligibleCardChecker.java +++ b/src/com/android/settings/homepage/contextualcards/EligibleCardChecker.java @@ -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; } |