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

Commit 065f27b1 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

Merge "Fix leaks" into nyc-dev

am: ea8ee685

* commit 'ea8ee685':
  Fix leaks

Change-Id: I5fffa584a7e265533c17b341636421ee99d4812c
parents bf96779c ea8ee685
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1259,24 +1259,25 @@ public class ManageApplications extends InstrumentedFragment
        private final SummaryLoader mLoader;
        // TODO: Can probably hack together with less than full app state.
        private final ApplicationsState mAppState;
        private final ApplicationsState.Session mSession;
        private final Handler mHandler;
        private ApplicationsState.Session mSession;

        private SummaryProvider(Context context, SummaryLoader loader) {
            mContext = context;
            mLoader = loader;
            mAppState =
                    ApplicationsState.getInstance((Application) context.getApplicationContext());
            mSession = mAppState.newSession(this);
            mHandler = new Handler(mAppState.getBackgroundLooper());
        }

        @Override
        public void setListening(boolean listening) {
            if (listening) {
                mSession = mAppState.newSession(this);
                mSession.resume();
            } else {
                mSession.pause();
                mSession.release();
            }
        }

+7 −5
Original line number Diff line number Diff line
@@ -42,31 +42,33 @@ public class NotificationApps extends ManageApplications {
        private final SummaryLoader mLoader;

        private final ApplicationsState mAppState;
        private final ApplicationsState.Session mSession;
        private final NotificationBackend mNotifBackend;
        private final AppStateNotificationBridge mExtraInfoBridge;
        private final Handler mHandler;
        private AppStateNotificationBridge mExtraInfoBridge;
        private ApplicationsState.Session mSession;

        private SummaryProvider(Context context, SummaryLoader loader) {
            mContext = context;
            mLoader = loader;
            mAppState =
                    ApplicationsState.getInstance((Application) context.getApplicationContext());
            mSession = mAppState.newSession(this);
            mNotifBackend = new NotificationBackend();
            mExtraInfoBridge = new AppStateNotificationBridge(mContext,
                    mAppState, this, mNotifBackend);
            mHandler = new Handler(mAppState.getBackgroundLooper());
        }

        @Override
        public void setListening(boolean listening) {
            if (listening) {
                mSession = mAppState.newSession(this);
                mExtraInfoBridge = new AppStateNotificationBridge(mContext,
                        mAppState, this, mNotifBackend);
                mSession.resume();
                mExtraInfoBridge.resume();
            } else {
                mSession.pause();
                mExtraInfoBridge.pause();
                mSession.release();
                mExtraInfoBridge.release();
            }
        }

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public class SuggestionsChecks {
    private final Context mContext;

    public SuggestionsChecks(Context context) {
        mContext = context;
        mContext = context.getApplicationContext();
    }

    public boolean isSuggestionComplete(Tile suggestion) {