Search in sources :

Example 41 with IWindowManager

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;
}
Also used : IWindowManager(android.view.IWindowManager) RemoteException(android.os.RemoteException) Point(android.graphics.Point)

Aggregations

IWindowManager (android.view.IWindowManager)41 RemoteException (android.os.RemoteException)29 Point (android.graphics.Point)7 IInstrumentationWatcher (android.app.IInstrumentationWatcher)6 UiAutomationConnection (android.app.UiAutomationConnection)6 ComponentName (android.content.ComponentName)6 Bundle (android.os.Bundle)6 AndroidException (android.util.AndroidException)6 BridgeInflater (android.view.BridgeInflater)6 IWindowManagerImpl (android.view.IWindowManagerImpl)6 Result (com.android.ide.common.rendering.api.Result)6 SessionParams (com.android.ide.common.rendering.api.SessionParams)6 BridgeContext (com.android.layoutlib.bridge.android.BridgeContext)6 BridgeXmlBlockParser (com.android.layoutlib.bridge.android.BridgeXmlBlockParser)6 InstrumentationInfo (android.content.pm.InstrumentationInfo)5 FrameLayout (android.widget.FrameLayout)5 LinearLayout (android.widget.LinearLayout)5 ArrayList (java.util.ArrayList)5 UserInfo (android.content.pm.UserInfo)4 Intent (android.content.Intent)2