SystemUI Tuner's activity changes to null when Multi-window's state is
changed after confirmation dialog about removing SystemUI Tuner is
shown. Then NullPointerException occurs by trying to finish the
activity to tap "REMOVE" button on the confirmation dialog.
So add null check before finish the activity.
Bug:
32786029
Test: manual - remove System UI Tuner on Multi-Window mode
Change-Id: I455d17c0c600eeb05c9dfb7d609d40307de2f855
TunerService.showResetRequest(getContext(), new Runnable() {
@Override
public void run() {
- getActivity().finish();
+ if (getActivity() != null) {
+ getActivity().finish();
+ }
}
});
return true;