1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | not_supported_message //tv.ouya.console.launcher.home.HomeActivity if (!DeviceInfoReceiver.getInstance().checkIsSupportedDevice() && !SystemProperties.getDebug()) { // support check DeviceNotSupportedDialog.show(this); return; } //tv.ouya.console.api.DeviceInfoReceiver implements ServiceConnection public void a(Context context, Bundle bundle) { Intent registerReceiver = context.registerReceiver(null, new IntentFilter("tv.ouya.DEVICE_INFO_ACTION")); if (registerReceiver == null) { return new DeviceInfo(false, "unknown", SupportedDeviceTypes.UNKNOWN); } boolean booleanExtra = registerReceiver.getBooleanExtra("SUPPORTED_DEVICE", false); String stringExtra = registerReceiver.getStringExtra("DEVICE_NAME"); String stringExtra2 = registerReceiver.getStringExtra("DEVICE_ENUM"); SupportedDeviceTypes supportedDeviceTypes = SupportedDeviceTypes.UNKNOWN; try { supportedDeviceTypes = SupportedDeviceTypes.valueOf(stringExtra2); } catch (Exception e2) { Log.w("OUYAF", "Error looking up deviceEnum for: " + stringExtra2); } c = new DeviceInfo(booleanExtra, stringExtra, supportedDeviceTypes); |