Merge "Add new methods to activate/deactivate session" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c9daa03269
@@ -863,6 +863,30 @@ public class ApplicationsState {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate session to enable a class that implements Callbacks to receive the callback.
|
||||
*/
|
||||
public void activateSession() {
|
||||
synchronized (mEntriesMap) {
|
||||
if (!mResumed) {
|
||||
mResumed = true;
|
||||
mSessionsChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deactivate session to disable a class that implements Callbacks to get the callback.
|
||||
*/
|
||||
public void deactivateSession() {
|
||||
synchronized (mEntriesMap) {
|
||||
if (mResumed) {
|
||||
mResumed = false;
|
||||
mSessionsChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<AppEntry> getAllApps() {
|
||||
synchronized (mEntriesMap) {
|
||||
return new ArrayList<>(mAppEntries);
|
||||
|
||||
Reference in New Issue
Block a user