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

Commit 48248c80 authored by Sungsoo Lim's avatar Sungsoo Lim
Browse files

DO NOT MERGE Make mute/unmute work

Bug: 18844550
Change-Id: I431a223d55430aa8e1bb28f0275e11876ed0e0bb
(cherry picked from commit d1851e6e)
parent ad1e3d7d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2576,7 +2576,7 @@ final class ActivityStack {
        if (r != null && r.app == app) {
            // If the top running activity is from this crashing
            // process, then terminate it to avoid getting in a loop.
            Slog.w(TAG, "  Force finishing activity "
            Slog.w(TAG, "  Force finishing activity 1 "
                    + r.intent.getComponent().flattenToShortString());
            int taskNdx = mTaskHistory.indexOf(r.task);
            int activityNdx = r.task.mActivities.indexOf(r);
@@ -2600,7 +2600,7 @@ final class ActivityStack {
                        || r.state == ActivityState.PAUSING
                        || r.state == ActivityState.PAUSED) {
                    if (!r.isHomeActivity() || mService.mHomeProcess != r.app) {
                        Slog.w(TAG, "  Force finishing activity "
                        Slog.w(TAG, "  Force finishing activity 2 "
                                + r.intent.getComponent().flattenToShortString());
                        finishActivityLocked(r, Activity.RESULT_CANCELED, null, "crashed", false);
                    }
@@ -3850,7 +3850,7 @@ final class ActivityStack {
                        }
                    }
                    didSomething = true;
                    Slog.i(TAG, "  Force finishing activity " + r);
                    Slog.i(TAG, "  Force finishing activity 3 " + r);
                    if (samePackage) {
                        if (r.app != null) {
                            r.app.removed = true;
@@ -3960,7 +3960,7 @@ final class ActivityStack {
            for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
                final ActivityRecord r = activities.get(activityNdx);
                if (r.app == app) {
                    Slog.w(TAG, "  Force finishing activity "
                    Slog.w(TAG, "  Force finishing activity 4 "
                            + r.intent.getComponent().flattenToShortString());
                    // Force the destroy to skip right to removal.
                    r.app = null;
+6 −2
Original line number Diff line number Diff line
@@ -836,7 +836,9 @@ public class MediaSessionService extends SystemService implements Monitor {
                            mAudioService.setMasterMute(!isMasterMute, flags, packageName, mICallback);
                        } else {
                            mAudioService.adjustMasterVolume(direction, flags, packageName);
                            if (isMasterMute) {
                            // Do not call setStreamMute when direction = 0 which is just to show
                            // UI.
                            if (isMasterMute && direction != 0) {
                                mAudioService.setMasterMute(false, flags, packageName, mICallback);
                            }
                        }
@@ -847,7 +849,9 @@ public class MediaSessionService extends SystemService implements Monitor {
                        } else {
                            mAudioService.adjustSuggestedStreamVolume(direction, suggestedStream,
                                    flags, packageName);
                            if (isStreamMute) {
                            // Do not call setStreamMute when direction = 0 which is just to show
                            // UI.
                            if (isStreamMute && direction != 0) {
                                mAudioService.setStreamMute(suggestedStream, false, mICallback);
                            }
                        }