Loading packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +9 −6 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public class KeyguardHostView extends KeyguardViewBase { private View mExpandChallengeView; private boolean mDefaultAppWidgetAttached; protected OnDismissAction mDismissAction; protected int mFailedAttempts; Loading Loading @@ -437,7 +439,8 @@ public class KeyguardHostView extends KeyguardViewBase { // Don't let the user drag the challenge down if widgets are disabled. if (mSlidingChallengeLayout != null) { mSlidingChallengeLayout.setEnableChallengeDragging(!widgetsDisabled()); mSlidingChallengeLayout.setEnableChallengeDragging( !widgetsDisabled() || mDefaultAppWidgetAttached); } // Select the appropriate page Loading Loading @@ -1368,13 +1371,13 @@ public class KeyguardHostView extends KeyguardViewBase { final boolean userAddedWidgetsEnabled = !widgetsDisabled(); boolean addedDefaultAppWidget = false; mDefaultAppWidgetAttached = false; if (!mSafeModeEnabled) { if (userAddedWidgetsEnabled) { int appWidgetId = allocateIdForDefaultAppWidget(); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { addedDefaultAppWidget = addWidget(appWidgetId, insertPageIndex, true); mDefaultAppWidgetAttached = addWidget(appWidgetId, insertPageIndex, true); } } else { // note: even if widgetsDisabledByDpm() returns true, we still bind/create Loading @@ -1387,8 +1390,8 @@ public class KeyguardHostView extends KeyguardViewBase { } } if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { addedDefaultAppWidget = addWidget(appWidgetId, insertPageIndex, false); if (!addedDefaultAppWidget) { mDefaultAppWidgetAttached = addWidget(appWidgetId, insertPageIndex, false); if (!mDefaultAppWidgetAttached) { mAppWidgetHost.deleteAppWidgetId(appWidgetId); mLockPatternUtils.writeFallbackAppWidgetId( AppWidgetManager.INVALID_APPWIDGET_ID); Loading @@ -1398,7 +1401,7 @@ public class KeyguardHostView extends KeyguardViewBase { } // Use the built-in status/clock view if we can't inflate the default widget if (!addedDefaultAppWidget) { if (!mDefaultAppWidgetAttached) { addDefaultStatusWidget(insertPageIndex); } Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +9 −6 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public class KeyguardHostView extends KeyguardViewBase { private View mExpandChallengeView; private boolean mDefaultAppWidgetAttached; protected OnDismissAction mDismissAction; protected int mFailedAttempts; Loading Loading @@ -437,7 +439,8 @@ public class KeyguardHostView extends KeyguardViewBase { // Don't let the user drag the challenge down if widgets are disabled. if (mSlidingChallengeLayout != null) { mSlidingChallengeLayout.setEnableChallengeDragging(!widgetsDisabled()); mSlidingChallengeLayout.setEnableChallengeDragging( !widgetsDisabled() || mDefaultAppWidgetAttached); } // Select the appropriate page Loading Loading @@ -1368,13 +1371,13 @@ public class KeyguardHostView extends KeyguardViewBase { final boolean userAddedWidgetsEnabled = !widgetsDisabled(); boolean addedDefaultAppWidget = false; mDefaultAppWidgetAttached = false; if (!mSafeModeEnabled) { if (userAddedWidgetsEnabled) { int appWidgetId = allocateIdForDefaultAppWidget(); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { addedDefaultAppWidget = addWidget(appWidgetId, insertPageIndex, true); mDefaultAppWidgetAttached = addWidget(appWidgetId, insertPageIndex, true); } } else { // note: even if widgetsDisabledByDpm() returns true, we still bind/create Loading @@ -1387,8 +1390,8 @@ public class KeyguardHostView extends KeyguardViewBase { } } if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { addedDefaultAppWidget = addWidget(appWidgetId, insertPageIndex, false); if (!addedDefaultAppWidget) { mDefaultAppWidgetAttached = addWidget(appWidgetId, insertPageIndex, false); if (!mDefaultAppWidgetAttached) { mAppWidgetHost.deleteAppWidgetId(appWidgetId); mLockPatternUtils.writeFallbackAppWidgetId( AppWidgetManager.INVALID_APPWIDGET_ID); Loading @@ -1398,7 +1401,7 @@ public class KeyguardHostView extends KeyguardViewBase { } // Use the built-in status/clock view if we can't inflate the default widget if (!addedDefaultAppWidget) { if (!mDefaultAppWidgetAttached) { addDefaultStatusWidget(insertPageIndex); } Loading