Search in sources :

Example 26 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project XobotOS by xamarin.

the class ActivityManagerProxy method getDeviceConfigurationInfo.

public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    mRemote.transact(GET_DEVICE_CONFIGURATION_TRANSACTION, data, reply, 0);
    reply.readException();
    ConfigurationInfo res = ConfigurationInfo.CREATOR.createFromParcel(reply);
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 27 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project android_frameworks_base by DirtyUnicorns.

the class ActivityManagerProxy method getDeviceConfigurationInfo.

public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    mRemote.transact(GET_DEVICE_CONFIGURATION_TRANSACTION, data, reply, 0);
    reply.readException();
    ConfigurationInfo res = ConfigurationInfo.CREATOR.createFromParcel(reply);
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 28 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project android_frameworks_base by DirtyUnicorns.

the class ActivityManagerTest method testGetDeviceConfigurationInfo.

@SmallTest
public void testGetDeviceConfigurationInfo() throws Exception {
    ConfigurationInfo config = mActivityManager.getDeviceConfigurationInfo();
    assertNotNull(config);
    // Validate values against configuration retrieved from resources
    Configuration vconfig = mContext.getResources().getConfiguration();
    assertNotNull(vconfig);
    assertEquals(config.reqKeyboardType, vconfig.keyboard);
    assertEquals(config.reqTouchScreen, vconfig.touchscreen);
    assertEquals(config.reqNavigation, vconfig.navigation);
    if (vconfig.navigation == Configuration.NAVIGATION_NONAV) {
        assertNotNull(config.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV);
    }
    if (vconfig.keyboard != Configuration.KEYBOARD_UNDEFINED) {
        assertNotNull(config.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD);
    }
}
Also used : Configuration(android.content.res.Configuration) ConfigurationInfo(android.content.pm.ConfigurationInfo) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 29 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project cornerstone by Onskreen.

the class ActivityManagerProxy method getDeviceConfigurationInfo.

public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    mRemote.transact(GET_DEVICE_CONFIGURATION_TRANSACTION, data, reply, 0);
    reply.readException();
    ConfigurationInfo res = ConfigurationInfo.CREATOR.createFromParcel(reply);
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 30 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project android_frameworks_base by AOSPA.

the class ActivityManagerProxy method getDeviceConfigurationInfo.

public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    mRemote.transact(GET_DEVICE_CONFIGURATION_TRANSACTION, data, reply, 0);
    reply.readException();
    ConfigurationInfo res = ConfigurationInfo.CREATOR.createFromParcel(reply);
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Aggregations

ConfigurationInfo (android.content.pm.ConfigurationInfo)34 ActivityManager (android.app.ActivityManager)16 Parcel (android.os.Parcel)8 Configuration (android.content.res.Configuration)6 SmallTest (android.test.suitebuilder.annotation.SmallTest)6 Context (android.content.Context)2 GLSurfaceView (android.opengl.GLSurfaceView)1 View (android.view.View)1 AndroidInputHandler (com.jme3.input.android.AndroidInputHandler)1 AndroidInputHandler14 (com.jme3.input.android.AndroidInputHandler14)1 StarWarsRenderer (com.yalantis.starwars.render.StarWarsRenderer)1 StarWarsTilesGLSurfaceView (com.yalantis.starwars.widget.StarWarsTilesGLSurfaceView)1 ParticleSystemRenderer (com.yalantis.starwarsdemo.particlesys.ParticleSystemRenderer)1 BezierRenderer (com.yalantis.waves.gl.BezierRenderer)1