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

Commit cae79bb6 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge changes Ie2fbc4a9,Id5918813,Ie61d5da3,I26a12ff6 into qt-r1-dev

am: 35890aba

Change-Id: I047d608a67fca6fa1625295da6e9e19ea5b7d407
parents f59f6b82 35890aba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -94,6 +94,10 @@
    <item type="id" name="top_roundess_animator_start_tag"/>
    <item type="id" name="top_roundess_animator_end_tag"/>

    <item type="id" name="keyguard_hun_animator_tag"/>
    <item type="id" name="keyguard_hun_animator_start_tag"/>
    <item type="id" name="keyguard_hun_animator_end_tag"/>

    <!-- Accessibility actions for the notification menu -->
    <item type="id" name="action_snooze_undo"/>
    <item type="id" name="action_snooze_shorter"/>
+4 −10
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
    private static final String HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE =
            "heads_up_status_bar_view_super_parcelable";
    private static final String FIRST_LAYOUT = "first_layout";
    private static final String PUBLIC_MODE = "public_mode";
    private static final String VISIBILITY = "visibility";
    private static final String ALPHA = "alpha";
    private int mAbsoluteStartPadding;
@@ -54,7 +53,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
    private Rect mLayoutedIconRect = new Rect();
    private int[] mTmpPosition = new int[2];
    private boolean mFirstLayout = true;
    private boolean mPublicMode;
    private int mMaxWidth;
    private View mRootView;
    private int mSysWinInset;
@@ -121,7 +119,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
        bundle.putParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE,
                super.onSaveInstanceState());
        bundle.putBoolean(FIRST_LAYOUT, mFirstLayout);
        bundle.putBoolean(PUBLIC_MODE, mPublicMode);
        bundle.putInt(VISIBILITY, getVisibility());
        bundle.putFloat(ALPHA, getAlpha());

@@ -139,7 +136,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
        Parcelable superState = bundle.getParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE);
        super.onRestoreInstanceState(superState);
        mFirstLayout = bundle.getBoolean(FIRST_LAYOUT, true);
        mPublicMode = bundle.getBoolean(PUBLIC_MODE, false);
        if (bundle.containsKey(VISIBILITY)) {
            setVisibility(bundle.getInt(VISIBILITY));
        }
@@ -166,11 +162,13 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
        if (entry != null) {
            mShowingEntry = entry;
            CharSequence text = entry.headsUpStatusBarText;
            if (mPublicMode) {
            if (entry.isSensitive()) {
                text = entry.headsUpStatusBarTextPublic;
            }
            mTextView.setText(text);
        } else {
            mShowingEntry.setOnSensitiveChangedListener(() -> setEntry(entry));
        } else if (mShowingEntry != null){
            mShowingEntry.setOnSensitiveChangedListener(null);
            mShowingEntry = null;
        }
    }
@@ -273,10 +271,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout {
        mTextView.setTextColor(DarkIconDispatcher.getTint(area, this, tint));
    }

    public void setPublicMode(boolean publicMode) {
        mPublicMode = publicMode;
    }

    public void setOnDrawingRectChangedListener(Runnable onDrawingRectChangedListener) {
        mOnDrawingRectChangedListener = onDrawingRectChangedListener;
    }
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle
            boolean deviceSensitive = devicePublic
                    && !mLockscreenUserManager.userAllowsPrivateNotificationsInPublic(
                    currentUserId);
            ent.getRow().setSensitive(sensitive, deviceSensitive);
            ent.setSensitive(sensitive, deviceSensitive);
            ent.getRow().setNeedsRedaction(needsRedaction);
            if (mGroupManager.isChildInGroupWithSummary(ent.notification)) {
                NotificationEntry summary = mGroupManager.getGroupSummary(ent.notification);
+21 −5
Original line number Diff line number Diff line
@@ -36,9 +36,12 @@ import com.android.systemui.plugins.FalsingManager
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.ExpandableView
import com.android.systemui.statusbar.notification.stack.NotificationRoundnessManager
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.phone.ShadeController
import com.android.systemui.statusbar.policy.HeadsUpManager

import javax.inject.Inject
import javax.inject.Singleton
@@ -51,7 +54,9 @@ import kotlin.math.max
class PulseExpansionHandler @Inject
constructor(context: Context,
            private val wakeUpCoordinator: NotificationWakeUpCoordinator,
            private val bypassController: KeyguardBypassController) : Gefingerpoken {
            private val bypassController: KeyguardBypassController,
            private val headsUpManager: HeadsUpManagerPhone,
            private val roundnessManager: NotificationRoundnessManager) : Gefingerpoken {
    companion object {
        private val RUBBERBAND_FACTOR_STATIC = 0.25f
        private val SPRING_BACK_ANIMATION_LENGTH_MS = 375
@@ -67,11 +72,22 @@ constructor(context: Context,
            val changed = field != value
            field = value
            bypassController.isPulseExpanding = value
            if (changed && !value && !leavingLockscreen) {
            if (changed) {
                if (value) {
                    val topEntry = headsUpManager.topEntry
                    topEntry?.let {
                        roundnessManager.setTrackingHeadsUp(it.row)
                    }
                } else {
                    roundnessManager.setTrackingHeadsUp(null)
                    if (!leavingLockscreen) {
                        bypassController.maybePerformPendingUnlock()
                        pulseExpandAbortListener?.run()
                    }
                }
                headsUpManager.unpinAll(true /* userUnPinned */)
            }
        }
    var leavingLockscreen: Boolean = false
        private set
    private val mTouchSlop: Float
@@ -231,7 +247,7 @@ constructor(context: Context,
    }

    private fun captureStartingChild(x: Float, y: Float) {
        if (mStartingChild == null) {
        if (mStartingChild == null && !bypassController.bypassEnabled) {
            mStartingChild = findView(x, y)
            if (mStartingChild != null) {
                setUserLocked(mStartingChild!!, true)
+15 −2
Original line number Diff line number Diff line
@@ -115,7 +115,20 @@ public class PropertyAnimator {
        view.setTag(animationEndTag, newEndValue);
    }

    public static <T extends View> boolean isAnimating(T view, AnimatableProperty property) {
    public static <T extends View> void applyImmediately(T view, AnimatableProperty property,
            float newValue) {
        cancelAnimation(view, property);
        property.getProperty().set(view, newValue);
    }

    public static void cancelAnimation(View view, AnimatableProperty property) {
        ValueAnimator animator = (ValueAnimator) view.getTag(property.getAnimatorTag());
        if (animator != null) {
            animator.cancel();
        }
    }

    public static boolean isAnimating(View view, AnimatableProperty property) {
        return view.getTag(property.getAnimatorTag()) != null;
    }
}
Loading