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

Commit cc6828c6 authored by Romain Guy's avatar Romain Guy
Browse files

Deprecate fill_parent and introduce match_parent.

Bug: #2361749.
parent 79ac6982
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class KeyguardViewManager implements KeyguardWindowController {

            mKeyguardHost = new KeyguardViewHost(mContext, mCallback);

            final int stretch = ViewGroup.LayoutParams.FILL_PARENT;
            final int stretch = ViewGroup.LayoutParams.MATCH_PARENT;
            int flags = WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
                    | WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER
                    | WindowManager.LayoutParams.FLAG_KEEP_SURFACE_WHILE_ANIMATING
@@ -127,8 +127,8 @@ public class KeyguardViewManager implements KeyguardWindowController {
            mKeyguardView.setCallback(mCallback);

            final ViewGroup.LayoutParams lp = new FrameLayout.LayoutParams(
                    ViewGroup.LayoutParams.FILL_PARENT,
                    ViewGroup.LayoutParams.FILL_PARENT);
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.MATCH_PARENT);

            mKeyguardHost.addView(mKeyguardView, lp);

+5 −8
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@

package com.android.internal.policy.impl;

import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
@@ -41,8 +41,6 @@ import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
@@ -61,7 +59,6 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewManager;
import android.view.VolumePanel;
@@ -204,7 +201,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

    @Override
    public void setContentView(View view) {
        setContentView(view, new ViewGroup.LayoutParams(FILL_PARENT, FILL_PARENT));
        setContentView(view, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
    }

    @Override
@@ -424,7 +421,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }

            int backgroundResId;
            if (lp.width == ViewGroup.LayoutParams.FILL_PARENT) {
            if (lp.width == ViewGroup.LayoutParams.MATCH_PARENT) {
                // If the contents is fill parent for the width, set the
                // corresponding background
                backgroundResId = st.fullBackground;
@@ -1811,7 +1808,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                if (SWEEP_OPEN_MENU) {
                    if (mMenuBackground == null && mFeatureId < 0
                            && getAttributes().height
                            == WindowManager.LayoutParams.FILL_PARENT) {
                            == WindowManager.LayoutParams.MATCH_PARENT) {
                        mMenuBackground = getContext().getResources().getDrawable(
                                com.android.internal.R.drawable.menu_background);
                    }
@@ -2151,7 +2148,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        mDecor.startChanging();

        View in = mLayoutInflater.inflate(layoutResource, null);
        decor.addView(in, new ViewGroup.LayoutParams(FILL_PARENT, FILL_PARENT));
        decor.addView(in, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));

        ViewGroup contentParent = (ViewGroup)findViewById(ID_ANDROID_CONTENT);
        if (contentParent == null) {
+2 −2
Original line number Diff line number Diff line
@@ -805,8 +805,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
            WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);

        win.setLayout(WindowManager.LayoutParams.FILL_PARENT,
                            WindowManager.LayoutParams.FILL_PARENT);
        win.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
                            WindowManager.LayoutParams.MATCH_PARENT);

        final WindowManager.LayoutParams params = win.getAttributes();
        params.token = appToken;