Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4ebf895 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add new methods to activate/deactivate session" into tm-dev am:...

Merge "Add new methods to activate/deactivate session" into tm-dev am: c9daa032 am: 5f48cb12 am: 114ff037

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18156700



Change-Id: Ie976404ffabe9e81d1023680f28bd93855a9940b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e12a865d 114ff037
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -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);