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

Public Member Functions

void loadSettings (Context c)
 
Set< Integer > getBlocklist ()
 
void clear ()
 
synchronized void block (int uid)
 
synchronized void unblock (int uid)
 
boolean blockedInternet (int uid)
 

Static Public Member Functions

static InternetBlocklist getInstance (Context c)
 

Static Public Attributes

static final String SHARED_PREFS_INTERNET_BLOCKLIST_APPS_KEY = "INTERNET_BLOCKLIST_APPS_KEY"
 

Detailed Description

Stores those apps whose access to internet is blocked.

Analogous implementation to TrackerBlocklist.

Member Function Documentation

◆ block()

synchronized void net.kollnig.missioncontrol.data.InternetBlocklist.block ( int  uid)

Block internet for a given app

Parameters
uidUid of app to block internet

◆ blockedInternet()

boolean net.kollnig.missioncontrol.data.InternetBlocklist.blockedInternet ( int  uid)

Check if internet is blocked for given app

Parameters
uidUid of app to check
Returns
If internet is blocked for given app

◆ clear()

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

Clear blocklist

◆ getBlocklist()

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

Get set of apps' uids which shan't access internet

Returns
Set of uids

◆ getInstance()

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

Singleton getter for InternetBlocklist

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

◆ loadSettings()

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

Load past settings

Parameters
cContext

◆ unblock()

synchronized void net.kollnig.missioncontrol.data.InternetBlocklist.unblock ( int  uid)

Unblock internet for a given app

Parameters
uidUid of app to unblock internet

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