public class WifiLockManager extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
acquireWifiLock(int lockMode,
String tag,
IBinder binder,
WorkSource ws)
Method allowing a calling app to acquire a Wifi WakeLock in the supplied mode.
|
WorkSource |
createMergedWorkSource()
Method to create a WorkSource containing all active WifiLock WorkSources.
|
protected void |
dump(PrintWriter pw) |
protected void |
enableVerboseLogging(int verbose) |
int |
getStrongestLockMode()
Method used to get the strongest lock type currently held by the WifiLockManager.
|
boolean |
releaseWifiLock(IBinder binder)
Method used by applications to release a WiFi Wake lock.
|
void |
updateWifiLockWorkSource(IBinder binder,
WorkSource ws)
Method used to update WifiLocks with a new WorkSouce.
|
public boolean acquireWifiLock(int lockMode, String tag, IBinder binder, WorkSource ws)
lockMode
- int representation of the Wifi WakeLock type.tag
- String passed to WifiManager.WifiLockbinder
- IBinder for the calling appws
- WorkSource of the calling apppublic boolean releaseWifiLock(IBinder binder)
binder
- IBinder for the calling app.public int getStrongestLockMode()
public WorkSource createMergedWorkSource()
public void updateWifiLockWorkSource(IBinder binder, WorkSource ws)
binder
- IBinder for the calling application.ws
- WorkSource to add to the existing WifiLock(s).protected void dump(PrintWriter pw)
protected void enableVerboseLogging(int verbose)