Partially fix bug 2111240 Detect docking / undocking event by reporting

to the AudioPolicyManager a new forced usage AudioSystem::FOR_DOCK
which can take the FORCE_NONE, FORCE_BT_DOCK or FORCE_WIRED_ACCESSORY
values. This CL is complemented by an update of the APM to take into
account the FOR_DOCK usage.
This commit is contained in:
Jean-Michel Trivi
2009-12-07 18:40:56 -08:00
parent 6d42d80653
commit 6154412ee8
3 changed files with 16 additions and 0 deletions

View File

@@ -271,12 +271,14 @@ public class AudioSystem
public static final int FORCE_BT_SCO = 3;
public static final int FORCE_BT_A2DP = 4;
public static final int FORCE_WIRED_ACCESSORY = 5;
public static final int FORCE_BT_DOCK = 6;
public static final int FORCE_DEFAULT = FORCE_NONE;
// usage for serForceUse
public static final int FOR_COMMUNICATION = 0;
public static final int FOR_MEDIA = 1;
public static final int FOR_RECORD = 2;
public static final int FOR_DOCK = 3;
public static native int setDeviceConnectionState(int device, int state, String device_address);
public static native int getDeviceConnectionState(int device, String device_address);