Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fm-commonsys
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
fm-commonsys
Commits
ba8d581c
Commit
ba8d581c
authored
9 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "FM: Take care of audio routing when BT is connected and disconnected."
parents
61bc467c
b7941f7f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fmapp2/src/com/caf/fmradio/FMRadioService.java
+3
-1
3 additions, 1 deletion
fmapp2/src/com/caf/fmradio/FMRadioService.java
fmapp2/src/com/caf/hc_utils/A2dpDeviceStatus.java
+9
-0
9 additions, 0 deletions
fmapp2/src/com/caf/hc_utils/A2dpDeviceStatus.java
with
12 additions
and
1 deletion
fmapp2/src/com/caf/fmradio/FMRadioService.java
+
3
−
1
View file @
ba8d581c
...
@@ -553,7 +553,9 @@ public class FMRadioService extends Service
...
@@ -553,7 +553,9 @@ public class FMRadioService extends Service
// audio policy manager switch audio to speaker.
// audio policy manager switch audio to speaker.
mHandler
.
removeCallbacks
(
mHeadsetPluginHandler
);
mHandler
.
removeCallbacks
(
mHeadsetPluginHandler
);
mHandler
.
post
(
mHeadsetPluginHandler
);
mHandler
.
post
(
mHeadsetPluginHandler
);
}
else
if
(
mA2dpDeviceState
.
isA2dpStateChange
(
action
)
)
{
}
else
if
(
mA2dpDeviceState
.
isA2dpStateChange
(
action
)
&&
(
mA2dpDeviceState
.
isConnected
(
intent
)
||
mA2dpDeviceState
.
isDisconnected
(
intent
)))
{
boolean
bA2dpConnected
=
boolean
bA2dpConnected
=
mA2dpDeviceState
.
isConnected
(
intent
);
mA2dpDeviceState
.
isConnected
(
intent
);
Log
.
d
(
LOGTAG
,
"bA2dpConnected:"
+
bA2dpConnected
);
Log
.
d
(
LOGTAG
,
"bA2dpConnected:"
+
bA2dpConnected
);
...
...
This diff is collapsed.
Click to expand it.
fmapp2/src/com/caf/hc_utils/A2dpDeviceStatus.java
+
9
−
0
View file @
ba8d581c
...
@@ -65,6 +65,15 @@ public class A2dpDeviceStatus {
...
@@ -65,6 +65,15 @@ public class A2dpDeviceStatus {
}
}
return
isConnected
;
return
isConnected
;
}
}
public
boolean
isDisconnected
(
Intent
intent
)
{
boolean
isDisconnected
=
false
;
int
state
=
intent
.
getIntExtra
(
BluetoothA2dp
.
EXTRA_STATE
,
BluetoothA2dp
.
STATE_CONNECTED
);
if
((
state
==
BluetoothA2dp
.
STATE_DISCONNECTED
))
{
isDisconnected
=
true
;
}
return
isDisconnected
;
}
public
boolean
isPlaying
(
Intent
intent
)
{
public
boolean
isPlaying
(
Intent
intent
)
{
boolean
isPlaying
=
false
;
boolean
isPlaying
=
false
;
int
state
=
intent
.
getIntExtra
(
BluetoothA2dp
.
EXTRA_STATE
,
int
state
=
intent
.
getIntExtra
(
BluetoothA2dp
.
EXTRA_STATE
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment