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

Commit 0ec10ac7 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'dyson'

* changes:
  Improved the transformation to an icon further
  Fixed a bug where the last notification could be invisible / faded
  Adapted the shelf color when transitioning
  Fully removed the bottom stack
  Fixed a bug where the first notification was cut off
  Fixed a a bug where clear all was invisible
  Fixed a flicker when expanding quicksettings on the lockscreen
  Added appear and disappear animations for the shelf icons
  Implemented a nicer transition when the icons overflow
  Added the possibility to animate X and refactoring
  Modified heads up experience
  Fixed a bug with not-gone notifications
  Adapted the animation to the full shade
  Fixed the lockscreen positon with a single notificaton
  Made heads up work again
  Fixed the transformation into the shelf
  Used different curve for the icons when expanding
  Refactored the stack animation logic
  Refactored shelf transformation code to support animations
  Improved the transition into the statusbar
  Adapted the icon transformation into the shelf
  Fixed the appearance of the shelf on the lockscreen
  Introduced the Notification shelf
  Refactored the viewstates for more modularity
parents 9985ed8b 875a3a11
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ImageView;
import android.widget.RemoteViews;

import com.android.internal.widget.CachingIconView;

import java.util.ArrayList;

/**
@@ -45,7 +47,7 @@ public class NotificationHeaderView extends ViewGroup {
    private OnClickListener mExpandClickListener;
    private HeaderTouchListener mTouchListener = new HeaderTouchListener();
    private ImageView mExpandButton;
    private View mIcon;
    private CachingIconView mIcon;
    private View mProfileBadge;
    private View mInfo;
    private int mIconColor;
@@ -123,7 +125,7 @@ public class NotificationHeaderView extends ViewGroup {
        if (mExpandButton != null) {
            mExpandButton.setAccessibilityDelegate(mExpandDelegate);
        }
        mIcon = findViewById(com.android.internal.R.id.icon);
        mIcon = (CachingIconView) findViewById(com.android.internal.R.id.icon);
        mProfileBadge = findViewById(com.android.internal.R.id.profile_badge);
    }

@@ -311,6 +313,10 @@ public class NotificationHeaderView extends ViewGroup {
        return mProfileBadge;
    }

    public CachingIconView getIcon() {
        return mIcon;
    }

    public class HeaderTouchListener implements View.OnTouchListener {

        private final ArrayList<Rect> mTouchRects = new ArrayList<>();
+22 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ public class CachingIconView extends ImageView {
    private String mLastPackage;
    private int mLastResId;
    private boolean mInternalSetDrawable;
    private boolean mForceHidden;
    private int mDesiredVisibility;

    public CachingIconView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
@@ -175,4 +177,24 @@ public class CachingIconView extends ImageView {
        mLastResId = 0;
        mLastPackage = null;
    }

    /**
     * Set the icon to be forcibly hidden, even when it's visibility is changed to visible.
     */
    public void setForceHidden(boolean forceHidden) {
        mForceHidden = forceHidden;
        updateVisibility();
    }

    @Override
    public void setVisibility(int visibility) {
        mDesiredVisibility = visibility;
        updateVisibility();
    }

    private void updateVisibility() {
        int visibility = mDesiredVisibility == VISIBLE && mForceHidden ? INVISIBLE
                : mDesiredVisibility;
        super.setVisibility(visibility);
    }
}
+1 −7
Original line number Diff line number Diff line
@@ -19,13 +19,7 @@
    android:id="@+id/notification_icon_area_inner"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <com.android.systemui.statusbar.StatusBarIconView
        android:id="@+id/moreIcon"
        android:layout_width="@dimen/status_bar_icon_size"
        android:layout_height="match_parent"
        android:src="@drawable/stat_notify_more"
        android:visibility="gone" />
    <com.android.systemui.statusbar.phone.IconMerger
    <com.android.systemui.statusbar.phone.NotificationIconContainer
        android:id="@+id/notificationIcons"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
    <LinearLayout android:id="@+id/status_bar_contents"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingStart="6dp"
        android:paddingStart="@dimen/status_bar_padding_start"
        android:paddingEnd="8dp"
        android:orientation="horizontal"
        >
+47 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2014 The Android Open Source Project
  ~ Copyright (C) 2016 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
@@ -15,10 +15,10 @@
  -->

<!-- Extends FrameLayout -->
<com.android.systemui.statusbar.NotificationOverflowContainer
<com.android.systemui.statusbar.NotificationShelf
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/notification_summary_height"
    android:layout_height="@dimen/notification_shelf_height"
    android:focusable="true"
    android:clickable="true"
    >
@@ -31,44 +31,17 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

    <com.android.keyguard.AlphaOptimizedLinearLayout
    <com.android.systemui.statusbar.phone.NotificationIconContainer
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:id="@+id/more_text"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="12dp"
            android:layout_gravity="center_vertical"
            android:background="@drawable/keyguard_overflow_number_background"
            android:gravity="center"
            android:textColor="#ff686868"
            android:textStyle="bold"
            android:textSize="14dp"
            />
        <com.android.systemui.statusbar.StatusBarIconView
            android:id="@+id/more_icon_overflow"
            android:layout_width="@dimen/status_bar_icon_size"
        android:layout_height="match_parent"
            android:src="@drawable/stat_notify_more"
            android:tint="@color/keyguard_overflow_content_color"
            android:visibility="gone"
            />
        <com.android.systemui.statusbar.NotificationOverflowIconsView
            android:id="@+id/overflow_icons_view"
            android:layout_gravity="center_vertical"
            android:layout_marginEnd="8dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            />
    </com.android.keyguard.AlphaOptimizedLinearLayout>
        android:paddingStart="13dp"
        android:paddingEnd="13dp"
        android:gravity="center_vertical" />

    <com.android.systemui.statusbar.notification.FakeShadowView
        android:id="@+id/fake_shadow"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</com.android.systemui.statusbar.NotificationOverflowContainer>
</com.android.systemui.statusbar.NotificationShelf>
Loading