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

Commit 7f86cd60 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Make sure theme attributes don't get lost" into oc-dev am: 9d2f03ec

am: 5cf51190

Change-Id: If65a78ae543335a9f3689e92665cca00e1fd5efd
parents ebb2bbba 5cf51190
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5941,7 +5941,7 @@ public class Activity extends ContextThemeWrapper
     */
    public void setTaskDescription(ActivityManager.TaskDescription taskDescription) {
        if (mTaskDescription != taskDescription) {
            mTaskDescription.copyFrom(taskDescription);
            mTaskDescription.copyFromPreserveHiddenFields(taskDescription);
            // Scale the icon down to something reasonable if it is provided
            if (taskDescription.getIconFilename() == null && taskDescription.getIcon() != null) {
                final int size = ActivityManager.getLauncherLargeIconSizeInner(this);
+21 −0
Original line number Diff line number Diff line
@@ -1222,6 +1222,27 @@ public class ActivityManager {
            mNavigationBarColor = other.mNavigationBarColor;
        }

        /**
         * Copies this the values from another TaskDescription, but preserves the hidden fields
         * if they weren't set on {@code other}
         * @hide
         */
        public void copyFromPreserveHiddenFields(TaskDescription other) {
            mLabel = other.mLabel;
            mIcon = other.mIcon;
            mIconFilename = other.mIconFilename;
            mColorPrimary = other.mColorPrimary;
            if (other.mColorBackground != 0) {
                mColorBackground = other.mColorBackground;
            }
            if (other.mStatusBarColor != 0) {
                mStatusBarColor = other.mStatusBarColor;
            }
            if (other.mNavigationBarColor != 0) {
                mNavigationBarColor = other.mNavigationBarColor;
            }
        }

        private TaskDescription(Parcel source) {
            readFromParcel(source);
        }