display audio dialog when connecting low end dock

Display a dialog to enable the use of the dock audio connection
when a low end dock is connected for the first time.

Modify DockService to process docked and undocked messages even if
the device indicated is null (meaning the dock is not a bluetooth dock)
only for low end docks.

Bug 7302106.

Change-Id: I331d83a74fecf5f26b24bfc178342df414bd8153
This commit is contained in:
Eric Laurent
2012-10-29 17:56:46 -07:00
parent c2c9d5bde1
commit f892bc856c
3 changed files with 147 additions and 75 deletions

View File

@@ -59,8 +59,11 @@ public final class DockEventReceiver extends BroadcastReceiver {
if (Intent.ACTION_DOCK_EVENT.equals(intent.getAction())
|| ACTION_DOCK_SHOW_UI.endsWith(intent.getAction())) {
if (device == null) {
if (DEBUG) Log.d(TAG, "Device is missing");
if ((device == null) && (ACTION_DOCK_SHOW_UI.endsWith(intent.getAction()) ||
((state != Intent.EXTRA_DOCK_STATE_UNDOCKED) &&
(state != Intent.EXTRA_DOCK_STATE_LE_DESK)))) {
if (DEBUG) Log.d(TAG,
"Wrong state: "+state+" or intent: "+intent.toString()+" with null device");
return;
}