Merge "AOD: Fix fallout from new Ambient Display"
This commit is contained in:
@@ -57,7 +57,6 @@
|
||||
<TextView android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:paddingBottom="@dimen/notification_content_margin_bottom"
|
||||
android:textAppearance="@style/TextAppearance.Material.Notification"
|
||||
android:singleLine="false"
|
||||
android:layout_weight="1"
|
||||
|
||||
@@ -499,11 +499,6 @@ public class NotificationContentView extends FrameLayout {
|
||||
com.android.internal.R.dimen.notification_action_list_height);
|
||||
}
|
||||
|
||||
if (isVisibleOrTransitioning(VISIBLE_TYPE_AMBIENT)) {
|
||||
return mContractedChild.getHeight() + mContext.getResources().getDimensionPixelSize(
|
||||
com.android.internal.R.dimen.notification_action_list_height);
|
||||
}
|
||||
|
||||
// Transition between heads-up & expanded, or pinned.
|
||||
if (mHeadsUpChild != null && mExpandedChild != null) {
|
||||
boolean transitioningBetweenHunAndExpanded =
|
||||
@@ -523,7 +518,9 @@ public class NotificationContentView extends FrameLayout {
|
||||
}
|
||||
|
||||
int hint;
|
||||
if (mHeadsUpChild != null && isVisibleOrTransitioning(VISIBLE_TYPE_HEADSUP)) {
|
||||
if (mAmbientChild != null && isVisibleOrTransitioning(VISIBLE_TYPE_AMBIENT)) {
|
||||
hint = mAmbientChild.getHeight();
|
||||
} else if (mHeadsUpChild != null && isVisibleOrTransitioning(VISIBLE_TYPE_HEADSUP)) {
|
||||
hint = mHeadsUpChild.getHeight();
|
||||
} else if (mExpandedChild != null) {
|
||||
hint = mExpandedChild.getHeight();
|
||||
@@ -685,10 +682,6 @@ public class NotificationContentView extends FrameLayout {
|
||||
visibleView.setVisibility(VISIBLE);
|
||||
transferRemoteInputFocus(visibleType);
|
||||
}
|
||||
NotificationViewWrapper visibleWrapper = getVisibleWrapper(visibleType);
|
||||
if (visibleWrapper != null) {
|
||||
visibleWrapper.setContentHeight(mContentHeight, getMinContentHeightHint());
|
||||
}
|
||||
|
||||
if (animate && ((visibleType == VISIBLE_TYPE_EXPANDED && mExpandedChild != null)
|
||||
|| (visibleType == VISIBLE_TYPE_HEADSUP && mHeadsUpChild != null)
|
||||
@@ -702,6 +695,10 @@ public class NotificationContentView extends FrameLayout {
|
||||
if (changedType) {
|
||||
focusExpandButtonIfNecessary();
|
||||
}
|
||||
NotificationViewWrapper visibleWrapper = getVisibleWrapper(visibleType);
|
||||
if (visibleWrapper != null) {
|
||||
visibleWrapper.setContentHeight(mContentHeight, getMinContentHeightHint());
|
||||
}
|
||||
updateBackgroundColor(animate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -613,6 +613,8 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
private Vibrator mVibrator;
|
||||
private long[] mCameraLaunchGestureVibePattern;
|
||||
|
||||
private final int[] mTmpInt2 = new int[2];
|
||||
|
||||
// Fingerprint (as computed by getLoggingFingerprint() of the last logged state.
|
||||
private int mLastLoggedStateFingerprint;
|
||||
|
||||
@@ -715,6 +717,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
|
||||
private final View.OnClickListener mGoToLockedShadeListener = v -> {
|
||||
if (mState == StatusBarState.KEYGUARD) {
|
||||
wakeUpIfDozing(SystemClock.uptimeMillis(), v);
|
||||
goToLockedShade(null);
|
||||
}
|
||||
};
|
||||
@@ -4946,12 +4949,14 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
return !mNotificationData.getActiveNotifications().isEmpty();
|
||||
}
|
||||
|
||||
public void wakeUpIfDozing(long time, PointF where) {
|
||||
public void wakeUpIfDozing(long time, View where) {
|
||||
if (mDozing && mDozeScrimController.isPulsing()) {
|
||||
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
|
||||
pm.wakeUp(time, "com.android.systemui:NODOZE");
|
||||
mWakeUpComingFromTouch = true;
|
||||
mWakeUpTouchLocation = where;
|
||||
where.getLocationInWindow(mTmpInt2);
|
||||
mWakeUpTouchLocation = new PointF(mTmpInt2[0] + where.getWidth() / 2,
|
||||
mTmpInt2[1] + where.getHeight() / 2);
|
||||
mNotificationPanel.setTouchDisabled(false);
|
||||
mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
|
||||
mFalsingManager.onScreenOnFromTouch();
|
||||
@@ -5348,14 +5353,11 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
};
|
||||
|
||||
private RemoteViews.OnClickHandler mOnClickHandler = new RemoteViews.OnClickHandler() {
|
||||
private final int[] mTmpInt2 = new int[2];
|
||||
|
||||
@Override
|
||||
public boolean onClickHandler(
|
||||
final View view, final PendingIntent pendingIntent, final Intent fillInIntent) {
|
||||
view.getLocationInWindow(mTmpInt2);
|
||||
wakeUpIfDozing(SystemClock.uptimeMillis(), new PointF(
|
||||
mTmpInt2[0] + view.getWidth() / 2, mTmpInt2[1] + view.getHeight() / 2));
|
||||
wakeUpIfDozing(SystemClock.uptimeMillis(), view);
|
||||
|
||||
|
||||
if (handleRemoteInput(view, pendingIntent, fillInIntent)) {
|
||||
@@ -6584,7 +6586,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
|
||||
|
||||
private final class NotificationClicker implements View.OnClickListener {
|
||||
private final int[] mTmpInt2 = new int[2];
|
||||
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
@@ -6593,9 +6594,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
return;
|
||||
}
|
||||
|
||||
v.getLocationInWindow(mTmpInt2);
|
||||
wakeUpIfDozing(SystemClock.uptimeMillis(),
|
||||
new PointF(mTmpInt2[0] + v.getWidth() / 2, mTmpInt2[1] + v.getHeight() / 2));
|
||||
wakeUpIfDozing(SystemClock.uptimeMillis(), v);
|
||||
|
||||
final ExpandableNotificationRow row = (ExpandableNotificationRow) v;
|
||||
final StatusBarNotification sbn = row.getStatusBarNotification();
|
||||
|
||||
Reference in New Issue
Block a user