List of usage examples for android.os Build BRAND
String BRAND
To view the source code for android.os Build BRAND.
Click Source Link
From source file:org.zywx.wbpalmstar.engine.EBrowserView.java
private void closeHardwareForSpecificString() { String[] strs = EUExUtil.getStringArray("platform_close_hardware"); if (strs != null) { for (int i = 0; i < strs.length; i++) { String str = strs[i].trim(); // ??Android? if (Build.MODEL.trim().equals(str) || Build.BRAND.trim().equals(str) || Build.MANUFACTURER.trim().equals(str)) { setLayerType(View.LAYER_TYPE_SOFTWARE, null); BDebug.i("setLayerType", "LAYER_TYPE_SOFTWARE"); break; }/* w ww .j a v a 2s . c om*/ } } }
From source file:net.frakbot.FWeather.util.FeedbackService.java
/** * Builds a feedback email body with some basic system info. * * @return Returns the generated system info. */// w w w . jav a 2s. c o m @SuppressWarnings("StringBufferReplaceableByString") private String generateFeedbackBody() { StringBuilder sb = new StringBuilder("\n\n" + "-----------\n" + "System info\n" + "-----------\n\n"); // HW information sb.append("Device model: ").append(Build.MODEL).append("\n"); sb.append("Manifacturer: ").append(Build.MANUFACTURER).append("\n"); sb.append("Brand: ").append(Build.BRAND).append("\n"); sb.append("CPU ABI: ").append(Build.CPU_ABI).append("\n"); sb.append("Product: ").append(Build.PRODUCT).append("\n").append("\n"); // SW information sb.append("Android version: ").append(Build.VERSION.CODENAME).append("\n"); sb.append("Release: ").append(Build.VERSION.RELEASE).append("\n"); sb.append("Incremental: ").append(Build.VERSION.INCREMENTAL).append("\n"); sb.append("Build: ").append(Build.FINGERPRINT).append("\n"); sb.append("Kernel: ").append(getKernelVersion()).append("\n"); // App info sb.append("App version: ").append(getAppVersionNumber(this)); return sb.toString(); }
From source file:net.granoeste.scaffold.app.ScaffoldActivity.java
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { // WTF: LGE Bug... NullPointerException (@PhoneWindow:onKeyUpPanel:1002) {main} - Stack Overflow http://stackoverflow.com/questions/26833242/nullpointerexception-phonewindowonkeyuppanel1002-main if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) { openOptionsMenu();/* w ww . j a v a 2s . c om*/ return true; } return super.onKeyUp(keyCode, event); }
From source file:com.framgia.android.emulator.EmulatorDetector.java
private boolean checkBasic() { boolean result = Build.FINGERPRINT.startsWith("generic") || Build.MODEL.contains("google_sdk") || Build.MODEL.toLowerCase().contains("droid4x") || Build.MODEL.contains("Emulator") || Build.MODEL.contains("Android SDK built for x86") || Build.MANUFACTURER.contains("Genymotion") || Build.HARDWARE.equals("goldfish") || Build.HARDWARE.equals("vbox86") || Build.PRODUCT.equals("sdk") || Build.PRODUCT.equals("google_sdk") || Build.PRODUCT.equals("sdk_x86") || Build.PRODUCT.equals("vbox86p") || Build.BOARD.toLowerCase().contains("nox") || Build.BOOTLOADER.toLowerCase().contains("nox") || Build.HARDWARE.toLowerCase().contains("nox") || Build.PRODUCT.toLowerCase().contains("nox") || Build.SERIAL.toLowerCase().contains("nox"); if (result)//w w w. j a v a2 s.co m return true; result |= Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"); if (result) return true; result |= "google_sdk".equals(Build.PRODUCT); return result; }
From source file:com.speedtong.example.ui.chatting.ChattingActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { LogUtil.d(TAG, "onCreate"); super.onCreate(savedInstanceState); brand = Build.MODEL + Build.BRAND; TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); uuid = tm.getDeviceId();/*from w w w .j a va2s .c o m*/ messageDao = MessageDao.getInstance(this); toast = Toast.makeText(this, "", Toast.LENGTH_SHORT); sdpath = Environment.getExternalStorageDirectory().getAbsolutePath(); // ??? initView(); // ??? initActivityState(savedInstanceState); final ArrayList<ECMessage> list = IMessageSqlManager.queryIMessageList(mThread, 20, getMessageAdapterLastMessageTime() + ""); mListView.post(new Runnable() { @Override public void run() { mChattingAdapter.setData(list); if (mChattingAdapter.getCount() < 20) { //mPullDownView.setPullEnabled(false); //mPullDownView.setPullViewVisibed(false); } mListView.clearFocus(); mChattingAdapter.notifyDataSetChanged(); mListView.setSelection(mChattingAdapter.getCount()); } }); // ?IM?API mChatManager = SDKCoreHelper.getECChatManager(); HandlerThread thread = new HandlerThread("ChattingVoiceRecord", Process.THREAD_PRIORITY_BACKGROUND); thread.start(); // Get the HandlerThread's Looper and use it for our Handler mChattingLooper = thread.getLooper(); mVoiceHandler = new Handler(mChattingLooper); mVoiceHandler.post(new Runnable() { @Override public void run() { doEmojiPanel(); } }); }
From source file:com.savor.ads.core.Session.java
private Session(Context context) { mContext = context;// w w w. j a va 2s. c om mPreference = new SaveFileData(context, "savor"); osVersion = Build.VERSION.SDK_INT; buildVersion = Build.VERSION.RELEASE; model = Build.MODEL; brand = Build.BRAND; romVersion = Build.VERSION.INCREMENTAL; try { // AppUtils.clearExpiredFile(context, false); // AppUtils.clearExpiredCacheFile(context); readSettings(); } catch (Exception e) { e.printStackTrace(); } }
From source file:sandra.examples.oneshot.voicelaunch.VoiceLaunch.java
/** * Initializes the search button and its listener. When the button is pressed, a feedback is shown to the user * and the recognition starts//from w ww . j a va2 s .c o m */ private void setSpeakButton() { // gain reference to speak button Button speak = (Button) findViewById(R.id.speech_btn); speak.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //If the user is running the app on a virtual device, they get a Toast if ("generic".equals(Build.BRAND.toLowerCase(Locale.US))) { Toast toast = Toast.makeText(getApplicationContext(), "ASR is not supported on virtual devices", Toast.LENGTH_SHORT); toast.show(); Log.e(LOGTAG, "ASR attempt on virtual device"); } else { startListeningForApps(); } } }); }
From source file:com.iiordanov.bVNC.RemoteCanvas.java
/** * Constructor used by the inflation apparatus * /*from w ww .j a va 2 s.c o m*/ * @param context */ public RemoteCanvas(final Context context, AttributeSet attrs) { super(context, attrs); clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE); decoder = new Decoder(this); isRdp = getContext().getPackageName().contains("RDP"); isSpice = getContext().getPackageName().contains("SPICE"); final Display display = ((Activity) context).getWindow().getWindowManager().getDefaultDisplay(); displayWidth = display.getWidth(); displayHeight = display.getHeight(); DisplayMetrics metrics = new DisplayMetrics(); display.getMetrics(metrics); displayDensity = metrics.density; if (android.os.Build.MODEL.contains("BlackBerry") || android.os.Build.BRAND.contains("BlackBerry") || android.os.Build.MANUFACTURER.contains("BlackBerry")) { bb = true; } }
From source file:de.ub0r.android.lib.DonationHelper.java
/** * Get MD5 hash of the IMEI (device id). * /*from w ww . j a v a2 s .com*/ * @param context * {@link Context} * @return MD5 hash of IMEI */ public static String getImeiHash(final Context context) { if (imeiHash == null) { // get imei TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); final String did = mTelephonyMgr.getDeviceId(); if (did != null) { imeiHash = Utils.md5(did); } else { imeiHash = Utils.md5(Build.BOARD + Build.BRAND + Build.PRODUCT + Build.DEVICE); } } return imeiHash; }