public class DeviceDatabase
extends android.database.sqlite.SQLiteOpenHelper
| Constructor and Description |
|---|
DeviceDatabase(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
onCreate(android.database.sqlite.SQLiteDatabase db) |
void |
onUpgrade(android.database.sqlite.SQLiteDatabase db,
int oldVersion,
int newVersion) |
java.lang.String |
query(java.lang.String codename,
java.lang.String model)
Query the market name given the codename and/or model of a device.
|
DeviceName.DeviceInfo |
queryToDevice(java.lang.String codename,
java.lang.String model)
Query the device info given the codename and/or model of a device.
|
public java.lang.String query(java.lang.String codename,
java.lang.String model)
codename - the value of the system property "ro.product.device" (Build.DEVICE).model - the value of the system property "ro.product.model" (Build.MODEL).public DeviceName.DeviceInfo queryToDevice(java.lang.String codename, java.lang.String model)
codename - the value of the system property "ro.product.device" (Build.DEVICE).model - the value of the system property "ro.product.model" (Build.MODEL).DeviceName.DeviceInfo if it is found in the database, otherwise null.public void onCreate(android.database.sqlite.SQLiteDatabase db)
onCreate in class android.database.sqlite.SQLiteOpenHelperpublic void onUpgrade(android.database.sqlite.SQLiteDatabase db,
int oldVersion,
int newVersion)
onUpgrade in class android.database.sqlite.SQLiteOpenHelper