public final class

DataUsageContract

extends Object
java.lang.Object
   ↳ cyanogenmod.providers.DataUsageContract

Class Overview

The DataUsageProvdier contract containing definitions for the supported URIs and columns

Summary

Constants
String ACTIVE DataUsage Active State - dynamically computed by the DataUsage algorithm to determine warning type to display to the user 0 - first warning type is generated, once a warning generation is triggered 1 - Nth warning type is generated, once a warning generation is triggered

Type: INTEGER

String BYTES Number of bytes consumed by the App so far.
int COLUMN_OF_ACTIVE
int COLUMN_OF_BYTES
int COLUMN_OF_ENABLE
int COLUMN_OF_EXTRA
int COLUMN_OF_FAST_AVG
int COLUMN_OF_FAST_SAMPLES
int COLUMN_OF_ID Column index for each field in the database row
int COLUMN_OF_LABEL
int COLUMN_OF_SLOW_AVG
int COLUMN_OF_SLOW_SAMPLES
int COLUMN_OF_UID
String CONTENT_ITEM_TYPE The mime type of a single item
String CONTENT_TYPE The mime type of a directory of items
String DATAUSAGE_AUTHORITY The authority for the DataUsage provider
String DATAUSAGE_TABLE
String ENABLE DataUsage Enable Configuration - statically set by the Settings App 0 - no data usage warning are generated 1 - data usage algorithm is evaluated and warnings are generated

Type: INTEGER

String EXTRA Extra information used debugging purposes - collects up to 1000 samples so that algorithm can be manually verified

Type: TEXT

String FAST_AVG The fast bandwidth consumption average accumulated over 'fast' number of samples

Type: INTEGER (long)

String FAST_SAMPLES Number of fast samples accumulated so far, analogous algorithm to 'slow_samples'

Type: INTEGER (long)

String LABEL The Name of the Application that corresponds to the uid

Type: TEXT

String SLOW_AVG The slow bandwidth consumption average accumulated over 'SLOW' number of samples

Type: INTEGER (long)

String SLOW_SAMPLES Number of slow samples accumulated so far, once the number of samples reaches a MAX number of samples, the 'slow_samples' pegs at MAX and new samples are factored into 'slow_avg' by "taking out" one sample.
String UID The UID of the application whose bandwidth is stored in this row

Type: INTEGER

String _ID The unique ID for a row

Type: INTEGER

Fields
public static final Uri BASE_CONTENT_URI The content URI for the top-level datausage authority
public static final Uri CONTENT_URI The content URI for this table
public static final String[] PROJECTION_ALL A projection of all columns in the datausage table.
Public Constructors
DataUsageContract()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ACTIVE

Added in API level 5

DataUsage Active State - dynamically computed by the DataUsage algorithm to determine warning type to display to the user 0 - first warning type is generated, once a warning generation is triggered 1 - Nth warning type is generated, once a warning generation is triggered

Type: INTEGER

Constant Value: "active"

public static final String BYTES

Added in API level 5

Number of bytes consumed by the App so far. It is used to determine the number of bytes consumed between samples

Type: INTEGER (long)

Constant Value: "bytes"

public static final int COLUMN_OF_ACTIVE

Added in API level 5

Constant Value: 3 (0x00000003)

public static final int COLUMN_OF_BYTES

Added in API level 5

Constant Value: 5 (0x00000005)

public static final int COLUMN_OF_ENABLE

Added in API level 5

Constant Value: 2 (0x00000002)

public static final int COLUMN_OF_EXTRA

Added in API level 5

Constant Value: 10 (0x0000000a)

public static final int COLUMN_OF_FAST_AVG

Added in API level 5

Constant Value: 8 (0x00000008)

public static final int COLUMN_OF_FAST_SAMPLES

Added in API level 5

Constant Value: 9 (0x00000009)

public static final int COLUMN_OF_ID

Added in API level 5

Column index for each field in the database row

Constant Value: 0 (0x00000000)

public static final int COLUMN_OF_LABEL

Added in API level 5

Constant Value: 4 (0x00000004)

public static final int COLUMN_OF_SLOW_AVG

Added in API level 5

Constant Value: 6 (0x00000006)

public static final int COLUMN_OF_SLOW_SAMPLES

Added in API level 5

Constant Value: 7 (0x00000007)

public static final int COLUMN_OF_UID

Added in API level 5

Constant Value: 1 (0x00000001)

public static final String CONTENT_ITEM_TYPE

Added in API level 5

The mime type of a single item

Constant Value: "vnd.android.cursor.itemdatausage_item"

public static final String CONTENT_TYPE

Added in API level 5

The mime type of a directory of items

Constant Value: "vnd.android.cursor.dirdatausage_item"

public static final String DATAUSAGE_AUTHORITY

Added in API level 5

The authority for the DataUsage provider

Constant Value: "org.cyanogenmod.providers.datausage"

public static final String DATAUSAGE_TABLE

Added in API level 5

Constant Value: "datausage"

public static final String ENABLE

Added in API level 5

DataUsage Enable Configuration - statically set by the Settings App 0 - no data usage warning are generated 1 - data usage algorithm is evaluated and warnings are generated

Type: INTEGER

Constant Value: "enable"

public static final String EXTRA

Added in API level 5

Extra information used debugging purposes - collects up to 1000 samples so that algorithm can be manually verified

Type: TEXT

Constant Value: "extra"

public static final String FAST_AVG

Added in API level 5

The fast bandwidth consumption average accumulated over 'fast' number of samples

Type: INTEGER (long)

Constant Value: "fast_avg"

public static final String FAST_SAMPLES

Added in API level 5

Number of fast samples accumulated so far, analogous algorithm to 'slow_samples'

Type: INTEGER (long)

Constant Value: "fast_samples"

public static final String LABEL

Added in API level 5

The Name of the Application that corresponds to the uid

Type: TEXT

Constant Value: "label"

public static final String SLOW_AVG

Added in API level 5

The slow bandwidth consumption average accumulated over 'SLOW' number of samples

Type: INTEGER (long)

Constant Value: "slow_avg"

public static final String SLOW_SAMPLES

Added in API level 5

Number of slow samples accumulated so far, once the number of samples reaches a MAX number of samples, the 'slow_samples' pegs at MAX and new samples are factored into 'slow_avg' by "taking out" one sample. slow_samples < MAX: slow_avg = (slow_avg * slow_samples + new_sample)/(slow_samples+1) slow_samples == MAX: slow_avg = (slow_avg * (MAX-1) + new_sample)/MAX

Type: Integer (long>

Constant Value: "slow_samples"

public static final String UID

Added in API level 5

The UID of the application whose bandwidth is stored in this row

Type: INTEGER

Constant Value: "uid"

public static final String _ID

Added in API level 5

The unique ID for a row

Type: INTEGER

Constant Value: "_id"

Fields

public static final Uri BASE_CONTENT_URI

Added in API level 5

The content URI for the top-level datausage authority

public static final Uri CONTENT_URI

Added in API level 5

The content URI for this table

public static final String[] PROJECTION_ALL

Added in API level 5

A projection of all columns in the datausage table.

Public Constructors

public DataUsageContract ()

Added in API level 5