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

Commit 694f79b5 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #2519590: Lock screen stuck in landscape mode

Well, mostly.  There is still a problem here where the first time
you show the lock screen it just doesn't draw itself.  I assume
this is something breaking in the view hierarchy as it floounders
around removing and adding new views as it is first being shown...
but no idea at this point what is the actual case.

Change-Id: Iba99ae3242931c8673b17b106c86fc99e2c52abe
parent e4eb5bf2
Loading
Loading
Loading
Loading
+27 −1
Original line number Diff line number Diff line
@@ -47612,6 +47612,32 @@
<parameter name="interestingChanges" type="int">
</parameter>
</method>
<method name="readFromParcel"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="source" type="android.os.Parcel">
</parameter>
</method>
<method name="setTo"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="o" type="android.content.res.Configuration">
</parameter>
</method>
<method name="setToDefaults"
 return="void"
 abstract="false"
@@ -121947,7 +121973,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="text" type="java.lang.String">
<parameter name="message" type="java.lang.String">
</parameter>
</method>
</class>
+4 −0
Original line number Diff line number Diff line
@@ -3913,6 +3913,8 @@ public final class ActivityThread {
            mResConfiguration = new Configuration();
        }
        if (!mResConfiguration.isOtherSeqNewer(config)) {
            if (DEBUG_CONFIGURATION) Log.v(TAG, "Skipping new config: curSeq="
                    + mResConfiguration.seq + ", newSeq=" + config.seq);
            return;
        }
        mResConfiguration.updateFrom(config);
@@ -3936,6 +3938,8 @@ public final class ActivityThread {
            WeakReference<Resources> v = it.next();
            Resources r = v.get();
            if (r != null) {
                if (DEBUG_CONFIGURATION) Log.v(TAG, "Changing resources "
                        + r + " config to: " + config);
                r.updateConfiguration(config, dm);
                //Log.i(TAG, "Updated app resources " + v.getKey()
                //        + " " + r + ": " + r.getConfiguration());
+24 −16
Original line number Diff line number Diff line
@@ -219,6 +219,10 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * Makes a deep copy suitable for modification.
     */
    public Configuration(Configuration o) {
        setTo(o);
    }

    public void setTo(Configuration o) {
        fontScale = o.fontScale;
        mcc = o.mcc;
        mnc = o.mnc;
@@ -552,21 +556,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
        dest.writeInt(seq);
    }

    public static final Parcelable.Creator<Configuration> CREATOR
            = new Parcelable.Creator<Configuration>() {
        public Configuration createFromParcel(Parcel source) {
            return new Configuration(source);
        }

        public Configuration[] newArray(int size) {
            return new Configuration[size];
        }
    };

    /**
     * Construct this Configuration object, reading from the Parcel.
     */
    private Configuration(Parcel source) {
    public void readFromParcel(Parcel source) {
        fontScale = source.readFloat();
        mcc = source.readInt();
        mnc = source.readInt();
@@ -587,6 +577,24 @@ public final class Configuration implements Parcelable, Comparable<Configuration
        seq = source.readInt();
    }
    
    public static final Parcelable.Creator<Configuration> CREATOR
            = new Parcelable.Creator<Configuration>() {
        public Configuration createFromParcel(Parcel source) {
            return new Configuration(source);
        }

        public Configuration[] newArray(int size) {
            return new Configuration[size];
        }
    };

    /**
     * Construct this Configuration object, reading from the Parcel.
     */
    private Configuration(Parcel source) {
        readFromParcel(source);
    }

    public int compareTo(Configuration that) {
        int n;
        float a = this.fontScale;
+2 −1
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ public abstract class WallpaperService extends Service {
        final Rect mVisibleInsets = new Rect();
        final Rect mWinFrame = new Rect();
        final Rect mContentInsets = new Rect();
        final Configuration mConfiguration = new Configuration();
        
        final WindowManager.LayoutParams mLayout
                = new WindowManager.LayoutParams();
@@ -494,7 +495,7 @@ public abstract class WallpaperService extends Service {
                    final int relayoutResult = mSession.relayout(
                        mWindow, mLayout, mWidth, mHeight,
                            View.VISIBLE, false, mWinFrame, mContentInsets,
                            mVisibleInsets, mSurfaceHolder.mSurface);
                            mVisibleInsets, mConfiguration, mSurfaceHolder.mSurface);

                    if (DEBUG) Log.v(TAG, "New surface: " + mSurfaceHolder.mSurface
                            + ", frame=" + mWinFrame);
+6 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

package android.view;

import android.content.res.Configuration;
import android.graphics.Rect;
import android.graphics.Region;
import android.os.Bundle;
@@ -63,6 +64,9 @@ interface IWindowSession {
     * contents to make sure the user can see it.  This is different than
     * <var>outContentInsets</var> in that these insets change transiently,
     * so complex relayout of the window should not happen based on them.
     * @param outConfiguration New configuration of window, if it is now
     * becoming visible and the global configuration has changed since it
     * was last displayed.
     * @param outSurface Object in which is placed the new display surface.
     * 
     * @return int Result flags: {@link WindowManagerImpl#RELAYOUT_SHOW_FOCUS},
@@ -71,7 +75,8 @@ interface IWindowSession {
    int relayout(IWindow window, in WindowManager.LayoutParams attrs,
            int requestedWidth, int requestedHeight, int viewVisibility,
            boolean insetsPending, out Rect outFrame, out Rect outContentInsets,
            out Rect outVisibleInsets, out Surface outSurface);
            out Rect outVisibleInsets, out Configuration outConfig,
            out Surface outSurface);

    /**
     * Give the window manager a hint of the part of the window that is
Loading