Skip to content

Commit af232ed

Browse files
committed
Avoid showing popup when View detatched.
Bug: 6388558 Change-Id: I12cfde91b142916ce137ebd4e96107a12ad2b4b7
1 parent 1e945c4 commit af232ed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ protected View.OnLongClickListener getNotificationLongClicker() {
237237
public boolean onLongClick(View v) {
238238
final String packageNameF = (String) v.getTag();
239239
if (packageNameF == null) return false;
240+
if (v.getWindowToken() == null) return false;
240241
PopupMenu popup = new PopupMenu(mContext, v);
241242
popup.getMenuInflater().inflate(R.menu.notification_popup_menu, popup.getMenu());
242243
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {

0 commit comments

Comments
 (0)