Search in sources :

Example 6 with ConfigurationInfo

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

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 7 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project android-gpuimage-ndkbuild-sample by mugku.

the class GPUImage method supportsOpenGLES2.

/**
     * Checks if OpenGL ES 2.0 is supported on the current device.
     *
     * @param context the context
     * @return true, if successful
     */
private boolean supportsOpenGLES2(final Context context) {
    final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
    final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
    return configurationInfo.reqGlEsVersion >= 0x20000;
}
Also used : ActivityManager(android.app.ActivityManager) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 8 with ConfigurationInfo

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

the class GLDepthTestActivity method detectOpenGLES20.

private boolean detectOpenGLES20() {
    ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
    ConfigurationInfo info = am.getDeviceConfigurationInfo();
    return (info.reqGlEsVersion >= 0x20000);
}
Also used : ActivityManager(android.app.ActivityManager) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 9 with ConfigurationInfo

use of android.content.pm.ConfigurationInfo in project BleSensorTag by StevenRudenko.

the class GlFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final Context context = getActivity();
    final View v = inflater.inflate(getContentViewId(), container, false);
    ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
    ConfigurationInfo info = am.getDeviceConfigurationInfo();
    if (info.reqGlEsVersion < 0x20000)
        throw new Error("OpenGL ES 2.0 is not supported by this device");
    loading = v.findViewById(R.id.loading);
    gLView = (GLSurfaceView) v.findViewById(R.id.gl);
    renderer = new ModelRenderer(context);
    renderer.setSurfaceView(gLView);
    gLView.setRenderer(renderer);
    loader.loadModel(getActivity(), this);
    return v;
}
Also used : Context(android.content.Context) ActivityManager(android.app.ActivityManager) View(android.view.View) ConfigurationInfo(android.content.pm.ConfigurationInfo)

Example 10 with ConfigurationInfo

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

the class MffContext method getPlatformSupportsGLES2.

private static boolean getPlatformSupportsGLES2(Context context) {
    ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
    ConfigurationInfo configurationInfo = am.getDeviceConfigurationInfo();
    return configurationInfo.reqGlEsVersion >= 0x20000;
}
Also used : ActivityManager(android.app.ActivityManager) 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