本文整理汇总了Java中android.os.Build.FINGERPRINT属性的典型用法代码示例。如果您正苦于以下问题:Java Build.FINGERPRINT属性的具体用法?Java Build.FINGERPRINT怎么用?Java Build.FINGERPRINT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.os.Build
的用法示例。
在下文中一共展示了Build.FINGERPRINT属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBuildFingerprintAndDeviceSerial
private static byte[] getBuildFingerprintAndDeviceSerial() {
StringBuilder result = new StringBuilder();
String fingerprint = Build.FINGERPRINT;
if (fingerprint != null) {
result.append(fingerprint);
}
String serial = getDeviceSerialNumber();
if (serial != null) {
result.append(serial);
}
try {
return result.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 encoding not supported");
}
}
示例2: isSystemOTA
public static boolean isSystemOTA(String lastFingerPrint) {
String currentFingerprint = Build.FINGERPRINT;
if (lastFingerPrint == null
|| lastFingerPrint.equals("")
|| currentFingerprint == null
|| currentFingerprint.equals("")) {
Log.d(TAG, "fingerprint empty:" + lastFingerPrint + ",current:" + currentFingerprint);
return false;
} else {
if (lastFingerPrint.equals(currentFingerprint)) {
Log.d(TAG, "same fingerprint:" + currentFingerprint);
return false;
} else {
Log.d(TAG, "system OTA,fingerprint not equal:" + lastFingerPrint + "," + currentFingerprint);
return true;
}
}
}
示例3: getBuildFingerprintAndDeviceSerial
private static byte[] getBuildFingerprintAndDeviceSerial() {
StringBuilder result = new StringBuilder();
String fingerprint = Build.FINGERPRINT;
if (fingerprint != null) {
result.append(fingerprint);
}
String serial = Build.SERIAL;
if (serial != null) {
result.append(serial);
}
try {
return result.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 encoding not supported");
}
}
示例4: getBuildFingerprintAndDeviceSerial
private static byte[] getBuildFingerprintAndDeviceSerial() {
StringBuilder result = new StringBuilder();
String fingerprint = Build.FINGERPRINT;
if (fingerprint != null) {
result.append(fingerprint);
}
String serial = getDeviceSerialNumber();
if (serial != null) {
result.append(serial);
}
try {
return result.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 encoding not supported");
}
}
示例5: writeToEntropyPool
@Override
protected void writeToEntropyPool(DataOutputStream out) throws IOException {
super.writeToEntropyPool(out);
out.writeInt(android.os.Process.myPid());
out.writeInt(android.os.Process.myTid());
out.writeInt(android.os.Process.myUid());
if (Build.FINGERPRINT != null) out.writeUTF(Build.FINGERPRINT);
if (Build.SERIAL != null) out.writeUTF(Build.SERIAL);
ContentResolver contentResolver = appContext.getContentResolver();
String id = Settings.Secure.getString(contentResolver, ANDROID_ID);
if (id != null) out.writeUTF(id);
Parcel parcel = Parcel.obtain();
WifiManager wm =
(WifiManager) appContext.getSystemService(WIFI_SERVICE);
List<WifiConfiguration> configs = wm.getConfiguredNetworks();
if (configs != null) {
for (WifiConfiguration config : configs)
parcel.writeParcelable(config, 0);
}
BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter();
if (bt != null) {
for (BluetoothDevice device : bt.getBondedDevices())
parcel.writeParcelable(device, 0);
}
out.write(parcel.marshall());
parcel.recycle();
}
示例6: onPostResume
@Override
protected void onPostResume() {
super.onPostResume();
force = true;
if (mHandler != null) {
mHandler.sendEmptyMessage(MESSAGE_CHECK_NETWORK);
}
if (BuildConfig.RELEASE) {
((BreventApplication) getApplication()).decodeFromClipboard();
}
if (BreventIntent.ACTION_FEEDBACK.equals(getIntent().getAction())) {
String path = getIntent().getStringExtra(BreventIntent.EXTRA_PATH);
UILog.d("path: " + path);
if (hasEmailClient(this)) {
String content = Build.FINGERPRINT + "\n" +
getString(R.string.brevent_status_stopped);
sendEmail(this, new File(path), content);
}
}
if (shouldUpdateConfiguration) {
updateConfiguration();
}
}
示例7: getBuildFingerprintAndDeviceSerial
private static byte[] getBuildFingerprintAndDeviceSerial() {
StringBuilder result = new StringBuilder();
String fingerprint = Build.FINGERPRINT;
if (fingerprint != null) {
result.append(fingerprint);
}
String serial = getDeviceSerialNumber();
if (serial != null) {
result.append(serial);
}
return result.toString().getBytes(Charset.forName("UTF-8"));
}
示例8: getDeviceInfo
/**
* 获取设备信息
*/
public String getDeviceInfo(Context context) {
return getEmulatorName(context) + "\n" + "Build.PRODUCT: " + Build.PRODUCT + "\n" +
"Build.MANUFACTURER: " + Build.MANUFACTURER + "\n" +
"Build.BRAND: " + Build.BRAND + "\n" +
"Build.DEVICE: " + Build.DEVICE + "\n" +
"Build.MODEL: " + Build.MODEL + "\n" +
"Build.HARDWARE: " + Build.HARDWARE + "\n" +
"Build.FINGERPRINT: " + Build.FINGERPRINT;
}
示例9: getDeviceListing
/**
*
* @return all involved Build.* parameters and its values
*/
public static String getDeviceListing() {
return "Build.PRODUCT: " + Build.PRODUCT + "\n" +
"Build.MANUFACTURER: " + Build.MANUFACTURER + "\n" +
"Build.BRAND: " + Build.BRAND + "\n" +
"Build.DEVICE: " + Build.DEVICE + "\n" +
"Build.MODEL: " + Build.MODEL + "\n" +
"Build.HARDWARE: " + Build.HARDWARE + "\n" +
"Build.FINGERPRINT: " + Build.FINGERPRINT + "\n" +
"Build.CPU_ABI: " + Build.CPU_ABI + "\n" +
"Build.CPU_ABI2: " + Build.CPU_ABI2 + "\n" +
"Build.HOST: " + Build.HOST;
}
示例10: getBrand
public static String getBrand() {
return Build.FINGERPRINT;
}
示例11: getDeviceInfo
public String getDeviceInfo() {
return "\n" +
"Brand:" +
Build.BRAND +
"\n" +
"Manufacturer:" +
Build.MANUFACTURER +
"\n" +
"Product:" +
Build.PRODUCT +
"\n" +
"Board:" +
Build.BOARD +
"\n" +
"Bootloader:" +
Build.BOOTLOADER +
"\n" +
"CPU_abi:" +
Build.CPU_ABI +
"\n" +
"CPU_abi2:" +
Build.CPU_ABI2 +
"\n" +
"DEVICE:" +
Build.DEVICE +
"\n" +
"Display:" +
Build.DISPLAY +
"\n" +
"Fingerprint:" +
Build.FINGERPRINT +
"\n" +
"Hardware:" +
Build.HARDWARE +
"\n" +
"Host:" +
Build.HOST +
"\n" +
"ID:" +
Build.ID +
"\n" +
"Model:" +
Build.MODEL +
"\n" +
"Time:" +
Build.TIME +
"\n" +
"Type:" +
Build.TYPE +
"\n" +
"User:" +
Build.USER +
"\n" +
"CodeName:" +
Build.VERSION.CODENAME +
"\n" +
"Incremental:" +
Build.VERSION.INCREMENTAL +
"\n" +
"Release:" +
Build.VERSION.RELEASE +
"\n" +
"SDK:" +
Build.VERSION.SDK_INT +
"\n";
}
示例12: getFingerprint
public static String getFingerprint() {
return Build.FINGERPRINT;
}