Merge "Fix usb service broadcasting for automotive." into qt-dev

This commit is contained in:
Ying Zheng
2019-05-23 18:04:23 +00:00
committed by Android (Google) Code Review

View File

@@ -20,6 +20,7 @@ import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
@@ -769,7 +770,7 @@ class UsbProfileGroupSettingsManager {
final Intent intent = createDeviceAttachedIntent(device);
// Send broadcast to running activity with registered intent
mContext.sendBroadcast(intent);
mContext.sendBroadcastAsUser(intent, UserHandle.of(ActivityManager.getCurrentUser()));
ApplicationInfo appInfo;
try {