Bug:
17298128
Change-Id: If64b6957a594bcc48f6454689d11cd63d31b9239
public void lockScreenOrientation() {
if (Utilities.isRotationEnabled(this)) {
- setRequestedOrientation(mapConfigurationOriActivityInfoOri(getResources()
- .getConfiguration().orientation));
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ setRequestedOrientation(mapConfigurationOriActivityInfoOri(getResources()
+ .getConfiguration().orientation));
+ } else {
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED);
+ }
}
}
public void unlockScreenOrientation(boolean immediate) {