TrackerControl
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
net.kollnig.missioncontrol.data.TrackerBlocklist Class Reference

Public Member Functions

void loadSettings (Context c)
 
Set< Integer > getBlocklist ()
 
Set< String > getSubset (int uid)
 
void clear ()
 
void clear (int uid)
 
synchronized void block (int uid, String t)
 
synchronized void unblock (int uid, String t)
 
synchronized void block (int uid, Tracker t)
 
synchronized void unblock (int uid, Tracker t)
 
boolean blocked (int uid, String key)
 
boolean blockedTracker (int uid, Tracker t)
 

Static Public Member Functions

static TrackerBlocklist getInstance (Context c)
 
static String getBlockingKey (Tracker t)
 

Static Public Attributes

static final String SHARED_PREFS_BLOCKLIST_APPS_KEY = "APPS_BLOCKLIST_APPS_KEY"
 
final static String PREF_BLOCKLIST = "blocklist"
 
static String NECESSARY_CATEGORY = "Content"
 

Detailed Description

Stores what trackers are blocked, for each app.

Member Function Documentation

◆ block() [1/2]

synchronized void net.kollnig.missioncontrol.data.TrackerBlocklist.block ( int  uid,
String  t 
)

Block a given tracker for a given app

Parameters
uidUid of the app
tKey of the tracker to be blocked

◆ block() [2/2]

synchronized void net.kollnig.missioncontrol.data.TrackerBlocklist.block ( int  uid,
Tracker  t 
)

Block a given tracker for a given app

Parameters
uidUid of the app
tTracker to be blocked

◆ blocked()

boolean net.kollnig.missioncontrol.data.TrackerBlocklist.blocked ( int  uid,
String  key 
)

Check if a given app can access a given tracker

Parameters
uidUid of the app
keyKey of the tracker
Returns
Whether access to this tracker is blocked

◆ blockedTracker()

boolean net.kollnig.missioncontrol.data.TrackerBlocklist.blockedTracker ( int  uid,
Tracker  t 
)

Check if a given app can access a given tracker

Parameters
uidUid of the app
tTracker
Returns
Whether access to this tracker is blocked

◆ clear() [1/2]

void net.kollnig.missioncontrol.data.TrackerBlocklist.clear ( )

Completely clear blocklist.

◆ clear() [2/2]

void net.kollnig.missioncontrol.data.TrackerBlocklist.clear ( int  uid)

Clear all blocked trackers for a specific app

Parameters
uidUid of app

◆ getBlockingKey()

static String net.kollnig.missioncontrol.data.TrackerBlocklist.getBlockingKey ( Tracker  t)
static

For a given tracker company, this computes a key to store the blocking state of this tracker.

Parameters
tTracker company
Returns
The key for storage of the blocking state

◆ getBlocklist()

Set< Integer > net.kollnig.missioncontrol.data.TrackerBlocklist.getBlocklist ( )

Get set of apps' uids which have information about blocked trackers

Returns
Set of apps' uids

◆ getInstance()

static TrackerBlocklist net.kollnig.missioncontrol.data.TrackerBlocklist.getInstance ( Context  c)
static

Singleton getter for TrackerBlocklist

Parameters
ccontext used to access TrackerBlocklist from
Returns
The current instance of the TrackerBlocklist, if none, a new instance is created.

◆ getSubset()

Set< String > net.kollnig.missioncontrol.data.TrackerBlocklist.getSubset ( int  uid)

Get information about what specific trackers are blocked for a given app

Parameters
uidUid of the app
Returns
Information about what specific trackers are blocked

◆ loadSettings()

void net.kollnig.missioncontrol.data.TrackerBlocklist.loadSettings ( Context  c)

Load past settings

Parameters
cContext

◆ unblock() [1/2]

synchronized void net.kollnig.missioncontrol.data.TrackerBlocklist.unblock ( int  uid,
String  t 
)

Unlock a given tracker for a given app

Parameters
uidUid of the app
tKey of the tracker to be unblocked

◆ unblock() [2/2]

synchronized void net.kollnig.missioncontrol.data.TrackerBlocklist.unblock ( int  uid,
Tracker  t 
)

Unblock a given tracker for a given app

Parameters
uidUid of the app
tTracker to be unblocked

The documentation for this class was generated from the following file: