Merge "DO NOT MERGE Make mute/unmute work" into lmp-mr1-dev
This commit is contained in:
@@ -2576,7 +2576,7 @@ final class ActivityStack {
|
|||||||
if (r != null && r.app == app) {
|
if (r != null && r.app == app) {
|
||||||
// If the top running activity is from this crashing
|
// If the top running activity is from this crashing
|
||||||
// process, then terminate it to avoid getting in a loop.
|
// 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());
|
+ r.intent.getComponent().flattenToShortString());
|
||||||
int taskNdx = mTaskHistory.indexOf(r.task);
|
int taskNdx = mTaskHistory.indexOf(r.task);
|
||||||
int activityNdx = r.task.mActivities.indexOf(r);
|
int activityNdx = r.task.mActivities.indexOf(r);
|
||||||
@@ -2600,7 +2600,7 @@ final class ActivityStack {
|
|||||||
|| r.state == ActivityState.PAUSING
|
|| r.state == ActivityState.PAUSING
|
||||||
|| r.state == ActivityState.PAUSED) {
|
|| r.state == ActivityState.PAUSED) {
|
||||||
if (!r.isHomeActivity() || mService.mHomeProcess != r.app) {
|
if (!r.isHomeActivity() || mService.mHomeProcess != r.app) {
|
||||||
Slog.w(TAG, " Force finishing activity "
|
Slog.w(TAG, " Force finishing activity 2 "
|
||||||
+ r.intent.getComponent().flattenToShortString());
|
+ r.intent.getComponent().flattenToShortString());
|
||||||
finishActivityLocked(r, Activity.RESULT_CANCELED, null, "crashed", false);
|
finishActivityLocked(r, Activity.RESULT_CANCELED, null, "crashed", false);
|
||||||
}
|
}
|
||||||
@@ -3850,7 +3850,7 @@ final class ActivityStack {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
didSomething = true;
|
didSomething = true;
|
||||||
Slog.i(TAG, " Force finishing activity " + r);
|
Slog.i(TAG, " Force finishing activity 3 " + r);
|
||||||
if (samePackage) {
|
if (samePackage) {
|
||||||
if (r.app != null) {
|
if (r.app != null) {
|
||||||
r.app.removed = true;
|
r.app.removed = true;
|
||||||
@@ -3960,7 +3960,7 @@ final class ActivityStack {
|
|||||||
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
|
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
|
||||||
final ActivityRecord r = activities.get(activityNdx);
|
final ActivityRecord r = activities.get(activityNdx);
|
||||||
if (r.app == app) {
|
if (r.app == app) {
|
||||||
Slog.w(TAG, " Force finishing activity "
|
Slog.w(TAG, " Force finishing activity 4 "
|
||||||
+ r.intent.getComponent().flattenToShortString());
|
+ r.intent.getComponent().flattenToShortString());
|
||||||
// Force the destroy to skip right to removal.
|
// Force the destroy to skip right to removal.
|
||||||
r.app = null;
|
r.app = null;
|
||||||
|
|||||||
@@ -836,7 +836,9 @@ public class MediaSessionService extends SystemService implements Monitor {
|
|||||||
mAudioService.setMasterMute(!isMasterMute, flags, packageName, mICallback);
|
mAudioService.setMasterMute(!isMasterMute, flags, packageName, mICallback);
|
||||||
} else {
|
} else {
|
||||||
mAudioService.adjustMasterVolume(direction, flags, packageName);
|
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);
|
mAudioService.setMasterMute(false, flags, packageName, mICallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -847,7 +849,9 @@ public class MediaSessionService extends SystemService implements Monitor {
|
|||||||
} else {
|
} else {
|
||||||
mAudioService.adjustSuggestedStreamVolume(direction, suggestedStream,
|
mAudioService.adjustSuggestedStreamVolume(direction, suggestedStream,
|
||||||
flags, packageName);
|
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);
|
mAudioService.setStreamMute(suggestedStream, false, mICallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user