Merge "Replace hidden API startForegroundServiceAsUser"

This commit is contained in:
Jin Seok Park
2020-07-31 04:46:51 +00:00
committed by Android (Google) Code Review

View File

@@ -221,8 +221,8 @@ final class MediaButtonReceiverHolder {
context.startActivityAsUser(mediaButtonIntent, userHandle);
break;
case COMPONENT_TYPE_SERVICE:
context.startForegroundServiceAsUser(mediaButtonIntent,
userHandle);
context.createContextAsUser(userHandle, 0).startForegroundService(
mediaButtonIntent);
break;
default:
// Legacy behavior for other cases.