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

Commit a7987101 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix 4689527: Update Recents"

parents fb7a1446 f2a16b27
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -22,11 +22,11 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/recents_root"
    android:layout_height="match_parent"
    android:layout_width="wrap_content">
    android:layout_width="match_parent">

    <FrameLayout
        android:id="@+id/recents_bg_protect"
        android:background="@drawable/recents_bg_protect_tile"
        android:background="@drawable/status_bar_recents_background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
@@ -38,7 +38,6 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|right"
            android:background="@drawable/recents_blue_glow"
            android:orientation="horizontal"
            android:clipToPadding="false"
            android:clipChildren="false"
@@ -78,6 +77,7 @@
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="@drawable/ic_sysbar_back_ime"
        android:visibility="gone"
    />

</com.android.systemui.recent.RecentsPanelView>
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@

    <FrameLayout
        android:id="@+id/recents_bg_protect"
        android:background="@drawable/recents_bg_protect_tile"
        android:background="@drawable/status_bar_recents_background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
@@ -39,7 +39,6 @@
            android:layout_height="wrap_content"
            android:layout_marginBottom="0dp"
            android:layout_gravity="bottom"
            android:background="@drawable/recents_blue_glow"
            android:orientation="horizontal"
            android:clipToPadding="false"
            android:clipChildren="false"
@@ -79,6 +78,7 @@
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="@drawable/ic_sysbar_back_ime"
        android:visibility="gone"
    />

</com.android.systemui.recent.RecentsPanelView>
+1 −0
Original line number Diff line number Diff line
@@ -21,4 +21,5 @@
    <drawable name="notification_item_background_color">#ff000000</drawable>
    <drawable name="ticker_background_color">#ff1d1d1d</drawable>
    <drawable name="status_bar_background">#000000</drawable>
    <drawable name="status_bar_recents_background">#b3000000</drawable>
</resources>
+9 −7
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ package com.android.systemui.recent;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.AnimatorSet.Builder;
import android.animation.ObjectAnimator;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.util.Slog;
import android.view.View;
@@ -78,14 +80,14 @@ import android.view.View;
                ? new android.view.animation.AccelerateInterpolator(1.0f)
                : new android.view.animation.DecelerateInterpolator(1.0f));

        Animator bgAnim = ObjectAnimator.ofInt(mScrimView.getBackground(),
                "alpha", appearing ? 0 : 255, appearing ? 255 : 0);

        mContentAnim = new AnimatorSet();
        mContentAnim
                .play(bgAnim)
                .with(glowAnim)
                .with(posAnim);
        final Builder builder = mContentAnim.play(glowAnim).with(posAnim);
        Drawable background = mScrimView.getBackground();
        if (background != null) {
            Animator bgAnim = ObjectAnimator.ofInt(background,
                "alpha", appearing ? 0 : 255, appearing ? 255 : 0);
            builder.with(bgAnim);
        }
        mContentAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
        mContentAnim.addListener(this);
        if (mListener != null) {
+10 −6
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.view.Surface;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.WindowManager;
import android.view.WindowManagerImpl;
@@ -318,11 +319,11 @@ public class PhoneStatusBar extends StatusBar {
        return sb;
    }

    protected WindowManager.LayoutParams getRecentsLayoutParams() {
    protected WindowManager.LayoutParams getRecentsLayoutParams(LayoutParams layoutParams) {
        boolean translucent = false;
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                layoutParams.width,
                layoutParams.height,
                WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
                | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
@@ -344,13 +345,16 @@ public class PhoneStatusBar extends StatusBar {
            visible = mRecentsPanel.getVisibility() == View.VISIBLE;
            WindowManagerImpl.getDefault().removeView(mRecentsPanel);
        }
        mRecentsPanel = (RecentsPanelView) View.inflate(mContext,
                R.layout.status_bar_recent_panel, null);

        // Provide RecentsPanelView with a temporary parent to allow layout params to work.
        LinearLayout tmpRoot = new LinearLayout(mContext);
        mRecentsPanel = (RecentsPanelView) LayoutInflater.from(mContext).inflate(
                R.layout.status_bar_recent_panel, tmpRoot, false);

        mRecentsPanel.setOnTouchListener(new TouchOutsideListener(MSG_CLOSE_RECENTS_PANEL,
                mRecentsPanel));
        mRecentsPanel.setVisibility(View.GONE);
        WindowManager.LayoutParams lp = getRecentsLayoutParams();
        WindowManager.LayoutParams lp = getRecentsLayoutParams(mRecentsPanel.getLayoutParams());

        WindowManagerImpl.getDefault().addView(mRecentsPanel, lp);
        mRecentsPanel.setBar(this);