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;
}
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;
}
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);
}
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;
}
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;
}
Aggregations