Skip to content

Commit 7ca4861

Browse files
dsandlerAndroid Git Automerger
authored andcommitted
am 969e8d5: am 118f484: Fix NPE on devices without notification panel help clings.
* commit '969e8d52faa32a6602a7fd0a851e7e56d9abeff0': Fix NPE on devices without notification panel help clings.
2 parents a440014 + 969e8d5 commit 7ca4861

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,14 +1376,20 @@ public void hideCling() {
13761376
}
13771377

13781378
public void showCling() {
1379+
// lazily inflate this to accommodate orientation change
1380+
final ViewStub stub = (ViewStub) mStatusBarWindow.findViewById(R.id.status_bar_cling_stub);
1381+
if (stub == null) {
1382+
mClingShown = true;
1383+
return; // no clings on this device
1384+
}
1385+
13791386
mSuppressStatusBarDrags = true;
13801387

13811388
mHandler.postDelayed(new Runnable() {
13821389
@Override
13831390
public void run() {
1384-
// lazily inflate this to accommodate orientation change
1385-
ViewStub stub = (ViewStub) mStatusBarWindow.findViewById(R.id.status_bar_cling_stub);
13861391
mCling = (ViewGroup) stub.inflate();
1392+
13871393
mCling.setOnTouchListener(new View.OnTouchListener() {
13881394
@Override
13891395
public boolean onTouch(View v, MotionEvent event) {

0 commit comments

Comments
 (0)