public class MockUtil
extends java.lang.Object
| Constructor and Description |
|---|
MockUtil() |
| Modifier and Type | Method and Description |
|---|---|
static AppInfo |
checkForApp(Device device,
java.lang.String pn)
Check if an app is available on a device
|
static Device |
decodeDevice(java.io.Reader json)
Decode a
Device |
static Device |
decodeDevice(java.lang.String json)
Decode a
Device |
static int |
decodeMajorGlVersion(int encoded)
Decode the major GLES version number.
|
static int |
decodeMinorGlVersion(int encoded)
Decode the minor GLES version number.
|
static Pawn |
decodePawn(java.io.Reader json)
Decode a pawn
|
static Pawn |
decodePawn(java.lang.String json)
Decode a pawn
|
static java.lang.String |
encodeDevice(Device device)
Encode a
Device |
static int |
encodeGlVersion(int major,
int minor)
Encode the GLES version as a single int.
|
static java.lang.String |
encodePawn(Pawn pawn)
Encode a pawn
|
static de.onyxbits.raccoon.proto.AndroidBuildProto |
toAndroidBuildProto(Device d) |
static java.lang.String |
toCheckinAgent(Device d)
Generate the HTTP user agent string for the checkin package.
|
static de.onyxbits.raccoon.proto.DeviceConfigurationProto |
toDeviceConfigurationProto(Device d)
Encode a
Device as a protocol buffer. |
static java.lang.String |
toDownloadAgent(Device d)
Generate the HTTP user agent string for the system's download manager.
|
static java.lang.String |
toFingerPrint(Device d)
Compute the fingerprint of a device
|
static java.lang.String |
toFinskyAgent(Device d)
Generate the HTTP user agent string of the Finsky App
|
static java.lang.String |
toLoginAgent(Device d) |
public static de.onyxbits.raccoon.proto.AndroidBuildProto toAndroidBuildProto(Device d)
public static de.onyxbits.raccoon.proto.DeviceConfigurationProto toDeviceConfigurationProto(Device d)
Device as a protocol buffer.d - devicepublic static java.lang.String toFinskyAgent(Device d)
d - deviceHeaders.agent(String).public static java.lang.String toCheckinAgent(Device d)
d - deviceHeaders.agent(String).public static java.lang.String toDownloadAgent(Device d)
d - deviceHeaders.agent(String).public static java.lang.String toLoginAgent(Device d)
public static int encodeGlVersion(int major,
int minor)
major - major version numberminor - minor version numberpublic static int decodeMajorGlVersion(int encoded)
encoded - an integer, encoding major and minor GLES version number.public static int decodeMinorGlVersion(int encoded)
encoded - an integer, encoding major and minor GLES version number.public static java.lang.String encodePawn(Pawn pawn)
pawn - pawnpublic static Pawn decodePawn(java.lang.String json)
json - json objectpublic static Pawn decodePawn(java.io.Reader json)
json - a readerpublic static java.lang.String encodeDevice(Device device)
Devicedevice - a devicepublic static Device decodeDevice(java.lang.String json)
Devicejson - json objectDevicepublic static Device decodeDevice(java.io.Reader json)
Devicejson - readerDevice object.public static java.lang.String toFingerPrint(Device d)
d - device in question