當前位置: 首頁>>代碼示例>>Java>>正文


Java Build.TAGS屬性代碼示例

本文整理匯總了Java中android.os.Build.TAGS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Build.TAGS屬性的具體用法?Java Build.TAGS怎麽用?Java Build.TAGS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.os.Build的用法示例。


在下文中一共展示了Build.TAGS屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: isRooted

/**
 * 檢測手機是否Rooted
 * 
 * @return
 */
private static boolean isRooted() {
	boolean isSdk = isGoogleSdk();
	Object tags = Build.TAGS;
	if ((!isSdk) && (tags != null)
			&& (((String) tags).contains("test-keys"))) {
		return true;
	}
	if (new File("/system/app/Superuser.apk").exists()) {
		return true;
	}
	if ((!isSdk) && (new File("/system/xbin/su").exists())) {
		return true;
	}
	return false;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:20,代碼來源:CrashSnapshot.java

示例2: getDeviceDetails

public static String getDeviceDetails(Context context) {

        return "Device Information\n"
                + "\nDEVICE.ID : " + getDeviceId(context)
                + "\nUSER.ID : " + getUserIdentity(context)
                + "\nAPP.VERSION : " + getAppVersion(context)
                + "\nLAUNCHER.APP : " + getCurrentLauncherApp(context)
                + "\nTIMEZONE : " + timeZone()
                + "\nVERSION.RELEASE : " + Build.VERSION.RELEASE
                + "\nVERSION.INCREMENTAL : " + Build.VERSION.INCREMENTAL
                + "\nVERSION.SDK.NUMBER : " + Build.VERSION.SDK_INT
                + "\nBOARD : " + Build.BOARD
                + "\nBOOTLOADER : " + Build.BOOTLOADER
                + "\nBRAND : " + Build.BRAND
                + "\nCPU_ABI : " + Build.CPU_ABI
                + "\nCPU_ABI2 : " + Build.CPU_ABI2
                + "\nDISPLAY : " + Build.DISPLAY
                + "\nFINGERPRINT : " + Build.FINGERPRINT
                + "\nHARDWARE : " + Build.HARDWARE
                + "\nHOST : " + Build.HOST
                + "\nID : " + Build.ID
                + "\nMANUFACTURER : " + Build.MANUFACTURER
                + "\nMODEL : " + Build.MODEL
                + "\nPRODUCT : " + Build.PRODUCT
                + "\nSERIAL : " + Build.SERIAL
                + "\nTAGS : " + Build.TAGS
                + "\nTIME : " + Build.TIME
                + "\nTYPE : " + Build.TYPE
                + "\nUNKNOWN : " + Build.UNKNOWN
                + "\nUSER : " + Build.USER;
    }
 
開發者ID:MindorksOpenSource,項目名稱:CrashReporter,代碼行數:31,代碼來源:AppUtils.java

示例3: isRooted

public static boolean isRooted(Context context) {
    boolean isEmulator = isEmulator(context);
    String buildTags = Build.TAGS;
    if ((!isEmulator && buildTags != null && buildTags.contains("test-keys")) || new File("/system/app/Superuser.apk").exists()) {
        return true;
    }
    File file = new File("/system/xbin/su");
    if (isEmulator || !file.exists()) {
        return false;
    }
    return true;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:12,代碼來源:CommonUtils.java

示例4: getBuildTags

public static String getBuildTags() {
    return Build.TAGS;
}
 
開發者ID:jeasinlee,項目名稱:AndroidBasicLibs,代碼行數:3,代碼來源:DeviceUtils.java

示例5: isRootByBuildTag

public static boolean isRootByBuildTag() {
    String buildTags = Build.TAGS;
    return ((buildTags != null && buildTags.contains("test-keys")));
}
 
開發者ID:dkanada,項目名稱:OpenAPK,代碼行數:4,代碼來源:ShellCommands.java

示例6: checkOne

private static boolean checkOne() {
    return Build.TAGS != null && Build.TAGS.contains("test-keys");
}
 
開發者ID:wulkanowy,項目名稱:wulkanowy,代碼行數:3,代碼來源:RootChecker.java

示例7: getBuildTags

public String getBuildTags() {
    return Build.TAGS;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:3,代碼來源:EnvironmentInfo.java


注:本文中的android.os.Build.TAGS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。