am f3add313: am 3c9297c3: Merge "Attempt to fix NegativeArraySizeException crash in keyguard" into jb-mr1-lockscreen-dev

* commit 'f3add313dcbcda6711b441022fe340b412b7d1a0':
  Attempt to fix NegativeArraySizeException crash in keyguard
This commit is contained in:
Jim Miller
2012-11-08 13:12:25 -08:00
committed by Android Git Automerger

View File

@ -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(