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

Commit 8dd9206a authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Fix NPE in rotation lock QS.

Bug: 7172228
Change-Id: I3ac35e18fe7ce5af13ee4c54dabae80df696c819
parent 74a550fa
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -399,7 +399,11 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
        mRotationLockState.label = locked
        mRotationLockState.label = locked
                ? mContext.getString(R.string.quick_settings_rotation_locked_label)
                ? mContext.getString(R.string.quick_settings_rotation_locked_label)
                : mContext.getString(R.string.quick_settings_rotation_unlocked_label);
                : mContext.getString(R.string.quick_settings_rotation_unlocked_label);

        // may be called before addRotationLockTile due to RotationPolicyListener in QuickSettings 
        if (mRotationLockTile != null && mRotationLockCallback != null) {
            mRotationLockCallback.refreshView(mRotationLockTile, mRotationLockState);
            mRotationLockCallback.refreshView(mRotationLockTile, mRotationLockState);
        }
        }
    }


}
}
 No newline at end of file