public final class

DataUsageContract

extends Object
java.lang.Object
   ↳ lineageos.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.lineageos.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