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

Commit febea58c authored by Chris Wren's avatar Chris Wren Committed by Android (Google) Code Review
Browse files

Merge "hide multiuser selector when IME is up." into jb-mr1-lockscreen-dev

parents cc5c168e 5f69f380
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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>
+5 −0
Original line number Diff line number Diff line
@@ -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>
+1 −0
Original line number Diff line number Diff line
@@ -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" />
+31 −22
Original line number Diff line number Diff line
@@ -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
@@ -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,
@@ -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);
@@ -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) {
@@ -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);