Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a71a2b authored by Keith Mok's avatar Keith Mok
Browse files

Check if view is inited when screen rotated

In M, we need to request permission the first time
application is use it. And we put that before
the creation of the content view. If screen
rotated before user confirm the permission dialog box,
it will cause onConfigurationChanged to be called,
and refreshs the view which is not created yet.
Add a null pointer checking to avoid that.

FEIJ-1083

Change-Id: Ic3c762e62edef28d4c5d7a7a89fabec3f4324eca
(cherry picked from commit f86cee7c)
parent f451f579
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -221,8 +221,10 @@ public class PickerActivity extends Activity
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        if (this.mRootView != null) { // the view may not be ready if we are requesting permission
            measureHeight();
        }
    }

    /**
     * Method that displays a dialog with a {@link NavigationView} to select the