Loading core/res/res/values-land/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,9 @@ <!-- Bottom padding for the widget pager --> <dimen name="kg_widget_pager_bottom_padding">0dp</dimen> <!-- If the height if keyguard drops below this threshold (most likely due to the appearance of the IME), then drop the multiuser selector. Landscape's layout allows this to be smaller than for portrait. --> <dimen name="kg_squashed_layout_threshold">400dp</dimen> </resources> core/res/res/values/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -330,4 +330,9 @@ <!-- Size of the region along the edge of the screen that will accept swipes to scroll the widget area. --> <dimen name="kg_edge_swipe_region_size">24dp</dimen> <!-- If the height if keyguard drops below this threshold (most likely due to the appearance of the IME), then drop the multiuser selector. --> <dimen name="kg_squashed_layout_threshold">600dp</dimen> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1234,6 +1234,7 @@ <java-symbol type="dimen" name="keyguard_avatar_frame_stroke_width" /> <java-symbol type="dimen" name="keyguard_avatar_frame_shadow_radius" /> <java-symbol type="dimen" name="kg_edge_swipe_region_size" /> <java-symbol type="dimen" name="kg_squashed_layout_threshold" /> <java-symbol type="drawable" name="ic_jog_dial_sound_off" /> <java-symbol type="drawable" name="ic_jog_dial_sound_on" /> <java-symbol type="drawable" name="ic_jog_dial_unlock" /> Loading policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java +31 −22 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo private OnBouncerStateChangedListener mBouncerListener; private final Rect mTempRect = new Rect(); private final Context mContext; private final OnClickListener mScrimClickListener = new OnClickListener() { @Override Loading @@ -66,6 +67,8 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo public MultiPaneChallengeLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mContext = context; final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.MultiPaneChallengeLayout, defStyleAttr, 0); mOrientation = a.getInt(R.styleable.MultiPaneChallengeLayout_orientation, Loading Loading @@ -173,6 +176,8 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo throw new IllegalArgumentException( "MultiPaneChallengeLayout must be measured with an exact size"); } float squashedLayoutThreshold = mContext.getResources().getDimension(R.dimen.kg_squashed_layout_threshold); final int width = MeasureSpec.getSize(widthSpec); final int height = MeasureSpec.getSize(heightSpec); Loading Loading @@ -208,7 +213,10 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo mUserSwitcherView = child; if (child.getVisibility() == GONE) continue; if (height < squashedLayoutThreshold) { int zero = MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY); measureChild(child, zero, zero); } else { int adjustedWidthSpec = widthSpec; int adjustedHeightSpec = heightSpec; if (lp.maxWidth >= 0) { Loading @@ -231,6 +239,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo } else if (Gravity.isHorizontal(lp.gravity)) { widthUsed += child.getMeasuredWidth() * 1.5f; } } } else if (lp.childType == LayoutParams.CHILD_TYPE_SCRIM) { setScrimView(child); child.measure(widthSpec, heightSpec); Loading Loading
core/res/res/values-land/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,9 @@ <!-- Bottom padding for the widget pager --> <dimen name="kg_widget_pager_bottom_padding">0dp</dimen> <!-- If the height if keyguard drops below this threshold (most likely due to the appearance of the IME), then drop the multiuser selector. Landscape's layout allows this to be smaller than for portrait. --> <dimen name="kg_squashed_layout_threshold">400dp</dimen> </resources>
core/res/res/values/dimens.xml +5 −0 Original line number Diff line number Diff line Loading @@ -330,4 +330,9 @@ <!-- Size of the region along the edge of the screen that will accept swipes to scroll the widget area. --> <dimen name="kg_edge_swipe_region_size">24dp</dimen> <!-- If the height if keyguard drops below this threshold (most likely due to the appearance of the IME), then drop the multiuser selector. --> <dimen name="kg_squashed_layout_threshold">600dp</dimen> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1234,6 +1234,7 @@ <java-symbol type="dimen" name="keyguard_avatar_frame_stroke_width" /> <java-symbol type="dimen" name="keyguard_avatar_frame_shadow_radius" /> <java-symbol type="dimen" name="kg_edge_swipe_region_size" /> <java-symbol type="dimen" name="kg_squashed_layout_threshold" /> <java-symbol type="drawable" name="ic_jog_dial_sound_off" /> <java-symbol type="drawable" name="ic_jog_dial_sound_on" /> <java-symbol type="drawable" name="ic_jog_dial_unlock" /> Loading
policy/src/com/android/internal/policy/impl/keyguard/MultiPaneChallengeLayout.java +31 −22 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo private OnBouncerStateChangedListener mBouncerListener; private final Rect mTempRect = new Rect(); private final Context mContext; private final OnClickListener mScrimClickListener = new OnClickListener() { @Override Loading @@ -66,6 +67,8 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo public MultiPaneChallengeLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mContext = context; final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.MultiPaneChallengeLayout, defStyleAttr, 0); mOrientation = a.getInt(R.styleable.MultiPaneChallengeLayout_orientation, Loading Loading @@ -173,6 +176,8 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo throw new IllegalArgumentException( "MultiPaneChallengeLayout must be measured with an exact size"); } float squashedLayoutThreshold = mContext.getResources().getDimension(R.dimen.kg_squashed_layout_threshold); final int width = MeasureSpec.getSize(widthSpec); final int height = MeasureSpec.getSize(heightSpec); Loading Loading @@ -208,7 +213,10 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo mUserSwitcherView = child; if (child.getVisibility() == GONE) continue; if (height < squashedLayoutThreshold) { int zero = MeasureSpec.makeMeasureSpec(0, MeasureSpec.EXACTLY); measureChild(child, zero, zero); } else { int adjustedWidthSpec = widthSpec; int adjustedHeightSpec = heightSpec; if (lp.maxWidth >= 0) { Loading @@ -231,6 +239,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo } else if (Gravity.isHorizontal(lp.gravity)) { widthUsed += child.getMeasuredWidth() * 1.5f; } } } else if (lp.childType == LayoutParams.CHILD_TYPE_SCRIM) { setScrimView(child); child.measure(widthSpec, heightSpec); Loading