use of android.view.IWindowManager in project android_frameworks_base by crdroidandroid.
the class RotationPolicy method isCurrentRotationAllowed.
private static boolean isCurrentRotationAllowed(Context context) {
int userRotationAngles = Settings.System.getInt(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1);
boolean allowAllRotations = context.getResources().getBoolean(com.android.internal.R.bool.config_allowAllRotations);
final IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
try {
return isRotationAllowed(wm.getRotation(), userRotationAngles, allowAllRotations);
} catch (RemoteException exc) {
Log.w(TAG, "Unable to getWindowManagerService.getRotation()");
}
return false;
}
Aggregations