Bug 1499224 - p2: Keep remote decoder process alive when client record is good. r=jya

Differential Revision: https://phabricator.services.mozilla.com/D23738

--HG--
extra : moz-landing-system : lando
This commit is contained in:
John Lin 2019-03-20 22:26:31 +00:00
parent fdd8992351
commit 43ae2383c9

View File

@ -68,7 +68,11 @@ public final class MediaManager extends Service {
public boolean onUnbind(final Intent intent) {
Log.i(LOGTAG, "Media service has been unbound. Stopping.");
stopSelf();
Process.killProcess(Process.myPid());
if (mNumActiveRequests != 0) {
// Not unbound by RemoteManager -- caller process is dead.
Log.w(LOGTAG, "unbound while client still active.");
Process.killProcess(Process.myPid());
}
return false;
}
}