OSDN Git Service

SystemUI: Use new USB notifications to detect USB disconnect.
authorMike Lockwood <lockwood@android.com>
Tue, 21 Sep 2010 15:17:27 +0000 (11:17 -0400)
committerMike Lockwood <lockwood@android.com>
Tue, 21 Sep 2010 15:17:27 +0000 (11:17 -0400)
commit77bc30d232633eb36323245bc5d0cbf144a3bd26
treecd60f87d76ca54af908a405c96ebe558d0c2646f
parent307aef01257cbba42f095f7020a4a3b753f3807b
SystemUI: Use new USB notifications to detect USB disconnect.

This fixes a bug that prevented the USB mass storage activity from closing
when USB is disconnected.
The bug was actually due to using == for a string compare instead of equals(),
but using the new notifications is a better solution than using battery events
since it will work for devices that do not charge over USB.

BUG: 3018954

Change-Id: Ia447974726a52cd865e59df5af79e828b5134b6c
Signed-off-by: Mike Lockwood <lockwood@android.com>
packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java