diff options
author | Jim Miller <jaggies@google.com> | 2012-11-07 18:09:14 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-11-07 18:09:14 -0800 |
commit | 3c9297c3cb739b9aec9ccff7e4e3e05006edb836 (patch) | |
tree | 8f7a0d37e2cbf592d945b9b441eb006dbf899774 | |
parent | 5c533884ead3bb8a8e2e4e8d79587a81dbe31700 (diff) | |
parent | a97686096265c2b718e15f806bca352675e5cd2d (diff) | |
download | frameworks_base-3c9297c3cb739b9aec9ccff7e4e3e05006edb836.zip frameworks_base-3c9297c3cb739b9aec9ccff7e4e3e05006edb836.tar.gz frameworks_base-3c9297c3cb739b9aec9ccff7e4e3e05006edb836.tar.bz2 |
Merge "Attempt to fix NegativeArraySizeException crash in keyguard" into jb-mr1-lockscreen-dev
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 030dfef..75fef24 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -1167,6 +1167,10 @@ public class LockPatternUtils { public boolean removeAppWidget(int widgetId) { int[] widgets = getAppWidgets(); + if (widgets.length == 0) { + return false; + } + int[] newWidgets = new int[widgets.length - 1]; for (int i = 0, j = 0; i < widgets.length; i++) { if (widgets[i] == widgetId) { @@ -1331,7 +1335,7 @@ public class LockPatternUtils { public boolean getPowerButtonInstantlyLocks() { return getBoolean(LOCKSCREEN_POWER_BUTTON_INSTANTLY_LOCKS, true); } - + public static boolean isSafeModeEnabled() { try { return IWindowManager.Stub.asInterface( |