Add null check before updating NotificationItemView
It's possible that the notifications were removed between the popup opening and updating its UI. In that case, mNotificationItemView will be null. Bug: 146152941 Change-Id: I60b44ea6d766720613cf2f25481fa3fc17cab6af
This commit is contained in:
1 parent
fbe947a223
commit
899557c048
1 file changed
+3
-3
@@ -37,7 +37,6 @@ import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -66,7 +65,6 @@ import com.android.launcher3.notification.NotificationKeyData;
|
||||
import com.android.launcher3.popup.PopupDataProvider.PopupDataChangeListener;
|
||||
import com.android.launcher3.shortcuts.DeepShortcutView;
|
||||
import com.android.launcher3.shortcuts.ShortcutDragPreviewProvider;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.touch.ItemClickHandler;
|
||||
import com.android.launcher3.touch.ItemLongClickListener;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
@@ -339,7 +337,9 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource,
|
||||
}
|
||||
|
||||
public void applyNotificationInfos(List<NotificationInfo> notificationInfos) {
|
||||
mNotificationItemView.applyNotificationInfos(notificationInfos);
|
||||
if (mNotificationItemView != null) {
|
||||
mNotificationItemView.applyNotificationInfos(notificationInfos);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateHiddenShortcuts() {
|
||||
|
||||
Reference in new issue
Block a user