Merge "Ensure the device wakes up from doze when tapping expand button" into sc-dev am: ba1e18b5c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15327940 Change-Id: I2b0fe18f7d2f6ab5c23830b234fa69edb8ca16c3
This commit is contained in:
@@ -287,7 +287,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
|||||||
mGroupExpansionChanging = true;
|
mGroupExpansionChanging = true;
|
||||||
final boolean wasExpanded = mGroupExpansionManager.isGroupExpanded(mEntry);
|
final boolean wasExpanded = mGroupExpansionManager.isGroupExpanded(mEntry);
|
||||||
boolean nowExpanded = mGroupExpansionManager.toggleGroupExpansion(mEntry);
|
boolean nowExpanded = mGroupExpansionManager.toggleGroupExpansion(mEntry);
|
||||||
mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded);
|
mOnExpandClickListener.onExpandClicked(mEntry, v, nowExpanded);
|
||||||
MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER,
|
MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER,
|
||||||
nowExpanded);
|
nowExpanded);
|
||||||
onExpansionChanged(true /* userAction */, wasExpanded);
|
onExpansionChanged(true /* userAction */, wasExpanded);
|
||||||
@@ -310,7 +310,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
|||||||
setUserExpanded(nowExpanded);
|
setUserExpanded(nowExpanded);
|
||||||
}
|
}
|
||||||
notifyHeightChanged(true);
|
notifyHeightChanged(true);
|
||||||
mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded);
|
mOnExpandClickListener.onExpandClicked(mEntry, v, nowExpanded);
|
||||||
MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_EXPANDER,
|
MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_EXPANDER,
|
||||||
nowExpanded);
|
nowExpanded);
|
||||||
}
|
}
|
||||||
@@ -3064,7 +3064,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnExpandClickListener {
|
public interface OnExpandClickListener {
|
||||||
void onExpandClicked(NotificationEntry clickedEntry, boolean nowExpanded);
|
void onExpandClicked(NotificationEntry clickedEntry, View clickedView, boolean nowExpanded);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ import android.app.KeyguardManager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
|
import android.os.SystemClock;
|
||||||
import android.service.notification.NotificationListenerService;
|
import android.service.notification.NotificationListenerService;
|
||||||
import android.service.notification.StatusBarNotification;
|
import android.service.notification.StatusBarNotification;
|
||||||
import android.service.vr.IVrManager;
|
import android.service.vr.IVrManager;
|
||||||
import android.service.vr.IVrStateCallbacks;
|
import android.service.vr.IVrStateCallbacks;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
import android.view.View;
|
||||||
import android.view.accessibility.AccessibilityManager;
|
import android.view.accessibility.AccessibilityManager;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -394,8 +396,10 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExpandClicked(NotificationEntry clickedEntry, boolean nowExpanded) {
|
public void onExpandClicked(NotificationEntry clickedEntry, View clickedView,
|
||||||
|
boolean nowExpanded) {
|
||||||
mHeadsUpManager.setExpanded(clickedEntry, nowExpanded);
|
mHeadsUpManager.setExpanded(clickedEntry, nowExpanded);
|
||||||
|
mStatusBar.wakeUpIfDozing(SystemClock.uptimeMillis(), clickedView, "NOTIFICATION_CLICK");
|
||||||
if (nowExpanded) {
|
if (nowExpanded) {
|
||||||
if (mStatusBarStateController.getState() == StatusBarState.KEYGUARD) {
|
if (mStatusBarStateController.getState() == StatusBarState.KEYGUARD) {
|
||||||
mShadeTransitionController.goToLockedShade(clickedEntry.getRow());
|
mShadeTransitionController.goToLockedShade(clickedEntry.getRow());
|
||||||
|
|||||||
Reference in New Issue
Block a user