Merge "Add new methods to activate/deactivate session" into tm-dev am: c9daa03269
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18156700 Change-Id: I504cc98172b61b4152939c8093a0461cd3fa523c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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