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

Commit 493a768a authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Lockscreen : Hide clock for Chronus/DeskClock" into cm-10.1

parents 748856b3 d0423a40
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -51,6 +51,11 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
    protected static float OVERSCROLL_MAX_ROTATION = 30;
    private static final boolean PERFORM_OVERSCROLL_ROTATION = true;

    private static final String[] CLOCK_WIDGET_PACKAGES = new String[] {
        "com.cyanogenmod.lockclock",
        "com.android.deskclock"
    };

    protected KeyguardViewStateManager mViewStateManager;
    private LockPatternUtils mLockPatternUtils;

@@ -130,6 +135,16 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
            ViewGroup vg = (ViewGroup) newPage;
            if (vg.getChildAt(0) instanceof KeyguardStatusView) {
                showingStatusWidget = true;
            } else if (vg.getChildAt(0) instanceof AppWidgetHostView) {
                AppWidgetProviderInfo info =
                        ((AppWidgetHostView) vg.getChildAt(0)).getAppWidgetInfo();
                String widgetPackage = info.provider.getPackageName();
                for (String packageName : CLOCK_WIDGET_PACKAGES) {
                    if (packageName.equals(widgetPackage)) {
                        showingStatusWidget = true;
                        break;
                    }
                }
            }
        }