diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-08-01 15:45:49 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-08-01 16:13:28 -0700 |
commit | 49f4f03dc8ed3925e80d379634e43eb24eea25b9 (patch) | |
tree | 5721d68b95e5741d058e28145d035d9b460a8524 /src/com/android/launcher3/shortcuts/DeepShortcutManager.java | |
parent | f8d2a70e0fc00559266aaab078aaefde8e34f3a7 (diff) | |
download | android_packages_apps_Trebuchet-49f4f03dc8ed3925e80d379634e43eb24eea25b9.tar.gz android_packages_apps_Trebuchet-49f4f03dc8ed3925e80d379634e43eb24eea25b9.tar.bz2 android_packages_apps_Trebuchet-49f4f03dc8ed3925e80d379634e43eb24eea25b9.zip |
Handling IllegalStateException which can be thrown by the system when the user is locked
Bug: 30411561
Change-Id: I0d7fc0aaecba01b1aaac95b98654f6e3ee090ce8
Diffstat (limited to 'src/com/android/launcher3/shortcuts/DeepShortcutManager.java')
-rw-r--r-- | src/com/android/launcher3/shortcuts/DeepShortcutManager.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java index 36bb2b5df..05ab84361 100644 --- a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java +++ b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java @@ -105,7 +105,7 @@ public class DeepShortcutManager { try { mLauncherApps.pinShortcuts(packageName, pinnedIds, user.getUser()); mWasLastCallSuccess = true; - } catch (SecurityException e) { + } catch (SecurityException|IllegalStateException e) { Log.w(TAG, "Failed to unpin shortcut", e); mWasLastCallSuccess = false; } @@ -127,7 +127,7 @@ public class DeepShortcutManager { try { mLauncherApps.pinShortcuts(packageName, pinnedIds, user.getUser()); mWasLastCallSuccess = true; - } catch (SecurityException e) { + } catch (SecurityException|IllegalStateException e) { Log.w(TAG, "Failed to pin shortcut", e); mWasLastCallSuccess = false; } @@ -142,7 +142,7 @@ public class DeepShortcutManager { mLauncherApps.startShortcut(packageName, id, sourceBounds, startActivityOptions, user.getUser()); mWasLastCallSuccess = true; - } catch (SecurityException e) { + } catch (SecurityException|IllegalStateException e) { Log.e(TAG, "Failed to start shortcut", e); mWasLastCallSuccess = false; } @@ -157,7 +157,7 @@ public class DeepShortcutManager { shortcutInfo.getShortcutInfo(), density); mWasLastCallSuccess = true; return icon; - } catch (SecurityException e) { + } catch (SecurityException|IllegalStateException e) { Log.e(TAG, "Failed to get shortcut icon", e); mWasLastCallSuccess = false; } @@ -208,7 +208,7 @@ public class DeepShortcutManager { try { shortcutInfos = mLauncherApps.getShortcuts(q, user.getUser()); mWasLastCallSuccess = true; - } catch (SecurityException e) { + } catch (SecurityException|IllegalStateException e) { Log.e(TAG, "Failed to query for shortcuts", e); mWasLastCallSuccess = false; } |