Merge "Send USB_STATE broadcast to manifest receivers"

This commit is contained in:
Chris Tate
2017-01-24 00:49:27 +00:00
committed by Android (Google) Code Review

View File

@@ -656,6 +656,7 @@ public class UsbDeviceManager {
// send a sticky broadcast containing current USB state
Intent intent = new Intent(UsbManager.ACTION_USB_STATE);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
| Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND
| Intent.FLAG_RECEIVER_FOREGROUND);
intent.putExtra(UsbManager.USB_CONNECTED, mConnected);
intent.putExtra(UsbManager.USB_HOST_CONNECTED, mHostConnected);