Merge "Attempt to fix NegativeArraySizeException crash in keyguard" into jb-mr1-lockscreen-dev

This commit is contained in:
Jim Miller
2012-11-07 18:09:14 -08:00
committed by Android (Google) Code Review

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(