Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 069d5ee9 authored by Michael Jurka's avatar Michael Jurka Committed by Android Git Automerger
Browse files

am 9d15b4cb: am 5dc8ce48: am c7037934: am cabcc590: Merge "Allowing rotation...

am 9d15b4cb: am 5dc8ce48: am c7037934: am cabcc590: Merge "Allowing rotation while adding lockscreen widgets" into jb-mr1-lockscreen-dev

* commit '9d15b4cb':
  Allowing rotation while adding lockscreen widgets
parents df8a020c 9d15b4cb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -136,11 +136,6 @@ public class LockPatternUtils {
     */
    public static final int ID_DEFAULT_STATUS_WIDGET = -2;

    /**
     * Intent extra that's used to tag the default widget when using the picker
     */
    public static final String EXTRA_DEFAULT_WIDGET = "com.android.settings.DEFAULT_WIDGET";

    protected final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";
    protected final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline";
    protected final static String PATTERN_EVER_CHOSEN_KEY = "lockscreen.patterneverchosen";
+3 −15
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public class KeyguardHostView extends KeyguardViewBase {
    // Use this to debug all of keyguard
    public static boolean DEBUG = KeyguardViewMediator.DEBUG;

    // Found in KeyguardAppWidgetPickActivity.java
    static final int APPWIDGET_HOST_ID = 0x4B455947;

    private AppWidgetHost mAppWidgetHost;
@@ -956,12 +957,8 @@ public class KeyguardHostView extends KeyguardViewBase {
            addWidgetButton.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
                    if (appWidgetId != -1) {
                        mActivityLauncher.launchWidgetPicker(appWidgetId);
                    } else {
                        Log.e(TAG, "Unable to allocate an AppWidget id in lock screen");
                    }
                    // Pass in an invalid widget id... the picker will allocate an ID for us
                    mActivityLauncher.launchWidgetPicker(AppWidgetManager.INVALID_APPWIDGET_ID);
                }
            });
        }
@@ -1262,15 +1259,6 @@ public class KeyguardHostView extends KeyguardViewBase {
        return null;
    }

    private boolean isWidgetPage(int pageIndex) {
        View v = mAppWidgetContainer.getChildAt(pageIndex);
        if (v != null && v instanceof KeyguardWidgetFrame) {
            KeyguardWidgetFrame kwf = (KeyguardWidgetFrame) v;
            return kwf.getContentAppWidgetId() != AppWidgetManager.INVALID_APPWIDGET_ID;
        }
        return false;
    }

    boolean isMusicPage(int pageIndex) {
        return pageIndex >= 0 && pageIndex == getWidgetPosition(R.id.keyguard_transport_control);
    }