SdkVersionUtil

public class SdkVersionUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.SdkVersionUtil


Tóm tắt

Phương thức công khai

static int getMajorSdkVersion(int sdkIntFull)

Trích xuất phiên bản lớn từ một SdkIntFull.

static int getMinorSdkVersion(int sdkIntFull)

Trích xuất phiên bản nhỏ từ một SdkIntFull.

static int parseFullVersion(String sdkFull)

Phân tích một chuỗi phiên bản SDK đầy đủ thành một giá trị đại diện số nguyên.

Phương thức công khai

getMajorSdkVersion

public static int getMajorSdkVersion (int sdkIntFull)

Trích xuất phiên bản lớn từ một SdkIntFull. Sao chép từ android.os.Build.getMajorSdkVersion

Tham số
sdkIntFull int

Giá trị trả về
int

getMinorSdkVersion

public static int getMinorSdkVersion (int sdkIntFull)

Trích xuất phiên bản nhỏ từ một SdkIntFull. Sao chép từ android.os.Build.getMinorSdkVersion

Tham số
sdkIntFull int

Giá trị trả về
int

parseFullVersion

public static int parseFullVersion (String sdkFull)

Phân tích một chuỗi phiên bản SDK đầy đủ thành một giá trị đại diện số nguyên. Logic này được sao chép từ android.os.Build.parseFullVersion để tránh các phần phụ thuộc phía máy chủ trên các thư viện Android dành riêng cho thiết bị.

Tham số
sdkFull String

Giá trị trả về
int Số nguyên SdkIntFull kết hợp.

Gửi
IllegalArgumentException nếu chuỗi phiên bản không hợp lệ.