List of usage examples for android.os Build DISPLAY
String DISPLAY
To view the source code for android.os Build DISPLAY.
Click Source Link
From source file:mx.klozz.xperience.tweaker.MainActivity.java
private void checkForSu() { if (mPreferences.getBoolean("theme_changed", false)) { mPreferences.edit().putBoolean("theme_changed", false).commit(); getCPUvalues();//Obtendremos los valores de la CPU mViewPager.setAdapter(titleAdapter); mViewPager.setCurrentItem(0);//from w ww. j a v a2 s . c o m } else { final String b = mPreferences.getString("rom", ""); if (!b.equals(Build.DISPLAY)) { Log.d(TAG, "check for su & busybox"); Intent intent = new Intent(MainActivity.this, checkSU.class); startActivityForResult(intent, 1); } else { if (Helpers.checkSu()) { getCPUvalues(); mViewPager.setAdapter(titleAdapter); mViewPager.setCurrentItem(0); } else { Log.d(TAG, "check for su"); Intent intent = new Intent(MainActivity.this, checkSU.class); startActivityForResult(intent, 1); } } } }
From source file:ee.ioc.phon.android.speak.Utils.java
public static String makeUserAgentComment(String tag, String versionName, String caller) { return tag + "/" + versionName + "; " + Build.MANUFACTURER + "/" + Build.DEVICE + "/" + Build.DISPLAY + "; " + caller;/*from w ww .j a v a 2 s. co m*/ }
From source file:com.lewa.crazychapter11.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { //set to full screen // getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); ///set to no title // requestWindowFeature(Window.FEATURE_NO_TITLE); // acionBar = getSupportActionBar(); // acionBar = getActionBar(); // acionBar.hide(); // Window win = getWindow(); // win.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); // win.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); // win.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // win.setStatusBarColor(Color.TRANSPARENT); // win.setNavigationBarColor(Color.TRANSPARENT); /*//*from w w w .j a v a 2 s . c o m*/ win.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); win.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); win.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); win.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); win.setStatusBarColor(Color.TRANSPARENT); win.setNavigationBarColor(Color.TRANSPARENT); //*/ super.onCreate(savedInstanceState); setContentView(R.layout.main); /* setTheme(R.style.CrazyTheme); */ AddGameBtn(); AddNoification(); LookupContact(); AddServiceBtn(); broadcastMain(); mediaPlayerMain(); mediaRecordSoundMain(); cameraMain(); recordvideoMain(); queMySql(); TestFragment(); justForTest(); LoadJson(); AddTestBtn(); AddUsageStatsBtn(); AddPeopleProvideBtn(); getInput(); ////just for test shutdown broadcast receiver IntentFilter mIntentFilter = new IntentFilter("android.intent.action.ACTION_SHUTDOWN"); mIntentFilter.addAction("com.lewa.alarm.test"); mIntentFilter.addAction("android.provider.Telephony.SECRET_CODE"); mIntentFilter.addAction("android.intent.action.SCREEN_ON"); mIntentFilter.addAction("android.intent.action.SCREEN_OFF"); mShoutdown = new shutdownReceiver(); registerReceiver(mShoutdown, mIntentFilter); ////test preferences = getSharedPreferences("crazyit", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE); editor = preferences.edit(); preferencestime = getSharedPreferences("RMS_Shutdown_time", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE); editortime = preferencestime.edit(); SharedShutdownTimeRead(); AddSharedPreBtn(); etNum = (EditText) findViewById(R.id.etNum); // // int maxLength = 4; InputFilter[] fArray = new InputFilter[1]; fArray[0] = new InputFilter.LengthFilter(maxLength); etNum.setFilters(fArray); // // calThread = new CalThread(); calThread.start(); Log.i("algerheMain", "MainActivity onCreate in!!"); String page = getString(R.string.str_page, "345", "24"); Log.i("algerheMain", "page=" + page); // /just for test here ComponentName comp = getIntent().getComponent(); show_txt = (EditText) findViewById(R.id.show_txt); show_txt.setText( "??" + comp.getPackageName() + " \n ??" + comp.getClassName()); ////MD5 check item ///1.IMEI TelephonyManager TelephonyMgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); String szImei = TelephonyMgr.getDeviceId(); String m_szSIMSerialNm = TelephonyMgr.getSimSerialNumber(); CellLocation m_location = TelephonyMgr.getCellLocation(); String m_Line1Number = TelephonyMgr.getLine1Number(); String m_OperatorName = TelephonyMgr.getSimOperatorName(); Log.i("algerheTelephonyMgr", "szImei=" + szImei); Log.i("algerheTelephonyMgr", "m_szSIMSerialNm=" + m_szSIMSerialNm); Log.i("algerheTelephonyMgr", "m_location=" + m_location); Log.i("algerheTelephonyMgr", "m_Line1Number=" + m_Line1Number); Log.i("algerheTelephonyMgr", "m_OperatorName=" + m_OperatorName); Log.i("algerheMain01", "szImei=" + szImei); Log.i("algerheMain01", "m_szSIMSerialNm=" + m_szSIMSerialNm); ///2.Pseudo-Unique ID String m_szDevIDShort = "35" + //we make this look like a valid IMEI Build.BOARD.length() % 10 + Build.BRAND.length() % 10 + Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 + Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 + Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 + Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 + Build.TAGS.length() % 10 + Build.TYPE.length() % 10 + Build.USER.length() % 10; //13 digits Log.i("algerheMain01", "m_szDevIDShort=" + m_szDevIDShort); ///3. Android ID String m_szAndroidID = Secure.getString(getContentResolver(), Secure.ANDROID_ID); Log.i("algerheMain01", "m_szAndroidID=" + m_szAndroidID); ///4.WLAN MAC Address string WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE); String m_szWLANMAC = "unknow_wifi_mac"; if (wm != null && wm.getConnectionInfo() != null) { m_szWLANMAC = wm.getConnectionInfo().getMacAddress(); } Log.i("algerheMain01", "m_szWLANMAC=" + m_szWLANMAC); ///5.BT MAC Address string BluetoothAdapter m_BluetoothAdapter = null; // Local Bluetooth adapter m_BluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); String m_szBTMAC = m_BluetoothAdapter.getAddress(); Log.i("algerheMain01", "m_szBTMAC=" + m_szBTMAC); ///6.sim serial number .getSimSerialNumber() // / ///reflect test checkMethod(); // */ final Intent alarmIntent = new Intent(); Log.i("algerheMain00", "isLewaRom=" + isLewaRom(this, alarmIntent)); handler = new Handler() { @Override public void handleMessage(Message msg) { if (msg.what == 0x4567) { String languageStr = null; String countryStr = null; Locale[] locList = Locale.getAvailableLocales(); for (int i = 0; i < locList.length; i++) { languageStr += locList[i].getLanguage(); countryStr += locList[i].getCountry(); } // show_txt = (EditText) findViewById(R.id.show_txt); show_txt.setText("" + languageStr + " \n " + countryStr); } else if (msg.what == 0x2789) { Log.i("algerheAlarm", "send alarm message in time=" + System.currentTimeMillis() + "\n action=" + alarmIntent.getAction()); // sendBroadcast(alarmIntent); } } }; // String strApkPath = intent.getStringExtra("apkPath"); // String strCmd = "pm install -r " + strApkPath; // try { // Process install = Runtime.getRuntime().exec(strCmd); // Log.d(TAG, "install = " + install + ", strCmd =" + strCmd); // }catch (Exception ex){ // Log.d(TAG, ex.getMessage()); // } // */ }
From source file:org.whispersystems.libpastelog.SubmitLogFragment.java
private static String buildDescription(Context context) { final PackageManager pm = context.getPackageManager(); final StringBuilder builder = new StringBuilder(); builder.append("Device : ").append(Build.MANUFACTURER).append(" ").append(Build.MODEL).append(" (") .append(Build.PRODUCT).append(")\n"); builder.append("Android : ").append(VERSION.RELEASE).append(" (").append(VERSION.INCREMENTAL).append(", ") .append(Build.DISPLAY).append(")\n"); builder.append("Memory : ").append(getMemoryUsage(context)).append("\n"); builder.append("Memclass: ").append(getMemoryClass(context)).append("\n"); builder.append("OS Host : ").append(Build.HOST).append("\n"); builder.append("App : "); try {/* www .j av a 2 s . co m*/ builder.append(pm.getApplicationLabel(pm.getApplicationInfo(context.getPackageName(), 0))).append(" ") .append(pm.getPackageInfo(context.getPackageName(), 0).versionName).append("\n"); } catch (PackageManager.NameNotFoundException nnfe) { builder.append("Unknown\n"); } return builder.toString(); }
From source file:com.aware.Aware.java
private void get_device_info() { Cursor awareContextDevice = awareContext.getContentResolver().query(Aware_Device.CONTENT_URI, null, null, null, null);/* w w w .ja va 2 s . co m*/ if (awareContextDevice == null || !awareContextDevice.moveToFirst()) { ContentValues rowData = new ContentValues(); rowData.put("timestamp", System.currentTimeMillis()); rowData.put("device_id", Aware.getSetting(awareContext, Aware_Preferences.DEVICE_ID)); rowData.put("board", Build.BOARD); rowData.put("brand", Build.BRAND); rowData.put("device", Build.DEVICE); rowData.put("build_id", Build.DISPLAY); rowData.put("hardware", Build.HARDWARE); rowData.put("manufacturer", Build.MANUFACTURER); rowData.put("model", Build.MODEL); rowData.put("product", Build.PRODUCT); rowData.put("serial", Build.SERIAL); rowData.put("release", Build.VERSION.RELEASE); rowData.put("release_type", Build.TYPE); rowData.put("sdk", Build.VERSION.SDK_INT); try { awareContext.getContentResolver().insert(Aware_Device.CONTENT_URI, rowData); Intent deviceData = new Intent(ACTION_AWARE_DEVICE_INFORMATION); sendBroadcast(deviceData); if (Aware.DEBUG) Log.d(TAG, "Device information:" + rowData.toString()); } catch (SQLiteException e) { if (Aware.DEBUG) Log.d(TAG, e.getMessage()); } catch (SQLException e) { if (Aware.DEBUG) Log.d(TAG, e.getMessage()); } } if (awareContextDevice != null && !awareContextDevice.isClosed()) awareContextDevice.close(); }
From source file:org.thoughtcrime.securesms.logsubmit.SubmitLogFragment.java
private static String buildDescription(Context context) { final PackageManager pm = context.getPackageManager(); final StringBuilder builder = new StringBuilder(); builder.append("Time : ").append(System.currentTimeMillis()).append('\n'); builder.append("Device : ").append(Build.MANUFACTURER).append(" ").append(Build.MODEL).append(" (") .append(Build.PRODUCT).append(")\n"); builder.append("Android : ").append(VERSION.RELEASE).append(" (").append(VERSION.INCREMENTAL).append(", ") .append(Build.DISPLAY).append(")\n"); builder.append("ABIs : ").append(TextUtils.join(", ", getSupportedAbis())).append("\n"); builder.append("Memory : ").append(getMemoryUsage(context)).append("\n"); builder.append("Memclass: ").append(getMemoryClass(context)).append("\n"); builder.append("OS Host : ").append(Build.HOST).append("\n"); builder.append("App : "); try {// w w w. j av a 2 s .c o m builder.append(pm.getApplicationLabel(pm.getApplicationInfo(context.getPackageName(), 0))).append(" ") .append(pm.getPackageInfo(context.getPackageName(), 0).versionName).append("\n"); } catch (PackageManager.NameNotFoundException nnfe) { builder.append("Unknown\n"); } return builder.toString(); }
From source file:at.aec.solutions.checkmkagent.AgentService.java
private void writeDMIDecode(PrintWriter _out) { _out.write("<<<dmi_sysinfo>>>" + NEWLINE); _out.write("System Information" + NEWLINE); _out.write(" Manufacturer: " + Build.MANUFACTURER + " (" + Build.BRAND + ")" + NEWLINE); _out.write(" Product Name: " + Build.MODEL + NEWLINE); _out.write(" Version: " + Build.VERSION.RELEASE + NEWLINE); _out.write(" Serial Number: " + Build.DISPLAY + NEWLINE); TelephonyManager tManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String uuid = tManager.getDeviceId(); _out.write(" UUID: " + uuid + NEWLINE); _out.write(" Radio Version: " + Build.getRadioVersion() + NEWLINE); _out.write(" Wake-up Type: Power Switch" + NEWLINE); _out.write(" SKU Number: Not Specified" + NEWLINE); _out.write(" Family: Not Specified" + NEWLINE); }
From source file:com.etalio.android.EtalioBase.java
protected String getEtalioUserAgent() { Locale locale = Locale.getDefault(); Resources resources;//w w w . j a v a 2s .c o m resources = mContext.getApplicationContext().getResources(); return "Etalio/" + getVersion() + " (Linux; " + " Android " + Build.VERSION.RELEASE + "; " + locale.toString() + "; " + Build.MANUFACTURER + " " + Build.MODEL + " Build/" + Build.DISPLAY + "; " + " Density/" + (resources != null ? resources.getDisplayMetrics().density : "unknown") + ")"; }
From source file:org.zeroxlab.zeroxbenchmark.Benchmark.java
public String getXMLResult() { if (mCases.size() == 0) return ""; Date date = new Date(); //2010-05-28T17:40:25CST SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz"); String xml = ""; xml += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; xml += "<result"; xml += " executedTimestamp=\"" + sdf.format(date) + "\""; xml += " manufacturer=\"" + Build.MANUFACTURER.replace(' ', '_') + "\""; xml += " model=\"" + Build.MODEL.replace(' ', '_') + ":" + Build.DISPLAY + "\""; xml += " buildTimestamp=\"" + sdf.format(new Date(Build.TIME)) + "\""; xml += " orientation=\"" + Integer.toString(orientation) + "\""; try { // read kernel version BufferedReader procVersion = new BufferedReader(new FileReader("/proc/version")); StringBuffer sbuff = new StringBuffer(); String tmp;//from w w w. jav a 2 s . c o m while ((tmp = procVersion.readLine()) != null) sbuff.append(tmp); procVersion.close(); tmp = sbuff.toString().replace("[\n\r]+", " ").replace(" +", "."); xml += " version=\"" + tmp + "\""; } catch (IOException e) { Log.e(TAG, "opening /proc/version failed: " + e.toString()); } try { // read and parse cpu info BufferedReader procVersion = new BufferedReader(new FileReader("/proc/cpuinfo")); StringBuffer sbuff = new StringBuffer(); String tmp; while ((tmp = procVersion.readLine()) != null) sbuff.append(tmp + "\n"); procVersion.close(); tmp = sbuff.toString(); sbuff = new StringBuffer(); Pattern p1 = Pattern.compile("(Processor\\s*:\\s*(.*)\\s*[\n\r]+)"); Matcher m1 = p1.matcher(tmp); if (m1.find()) sbuff.append(m1.group(2)); Pattern p2 = Pattern.compile("(Hardware\\s*:\\s*(.*)\\s*[\n\r]+)"); Matcher m2 = p2.matcher(tmp); if (m2.find()) sbuff.append(":" + m2.group(2)); Pattern p3 = Pattern.compile("(Revision\\s*:\\s*(.*)\\s*[\n\r]+)"); Matcher m3 = p3.matcher(tmp); if (m3.find()) sbuff.append(":" + m3.group(2)); Log.e(TAG, sbuff.toString()); xml += " cpu=\"" + sbuff.toString() + "\""; } catch (IOException e) { Log.e(TAG, "opening /proc/version failed: " + e.toString()); } xml += ">"; Case mycase; for (int i = 0; i < mCases.size(); i++) { mycase = mCases.get(i); xml += mycase.getXMLBenchmark(); } xml += "</result>"; return xml; }
From source file:org.brandroid.openmanager.fragments.DialogHandler.java
public static String getDeviceInfo() { String ret = ""; String sep = "\n"; ret += sep + "Build Info:" + sep; ret += "SDK: " + Build.VERSION.SDK_INT + sep; if (OpenExplorer.SCREEN_WIDTH > -1) ret += "Screen: " + OpenExplorer.SCREEN_WIDTH + "x" + OpenExplorer.SCREEN_HEIGHT + sep; if (OpenExplorer.SCREEN_DPI > -1) ret += "DPI: " + OpenExplorer.SCREEN_DPI + sep; ret += "Lang: " + getLangCode() + sep; ret += "Fingerprint: " + Build.FINGERPRINT + sep; ret += "Manufacturer: " + Build.MANUFACTURER + sep; ret += "Model: " + Build.MODEL + sep; ret += "Product: " + Build.PRODUCT + sep; ret += "Brand: " + Build.BRAND + sep; ret += "Board: " + Build.BOARD + sep; ret += "Bootloader: " + Build.BOOTLOADER + sep; ret += "Hardware: " + Build.HARDWARE + sep; ret += "Display: " + Build.DISPLAY + sep; ret += "Language: " + Locale.getDefault().getDisplayLanguage() + sep; ret += "Country: " + Locale.getDefault().getDisplayCountry() + sep; ret += "Tags: " + Build.TAGS + sep; ret += "Type: " + Build.TYPE + sep; ret += "User: " + Build.USER + sep; if (Build.UNKNOWN != null) ret += "Unknown: " + Build.UNKNOWN + sep; ret += "ID: " + Build.ID; return ret;// w w w . j ava 2 s . c o m }