Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Bluetooth
Commits
613bae22
Commit
613bae22
authored
15 years ago
by
Nick Pelly
Browse files
Options
Download
Email Patches
Plain Diff
Update application for Bluetooth API change: deprecation of BluetoothError.
parent
f4a286ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
8 deletions
+4
-8
src/com/android/bluetooth/opp/BluetoothOppReceiver.java
src/com/android/bluetooth/opp/BluetoothOppReceiver.java
+1
-2
src/com/android/bluetooth/opp/BluetoothOppService.java
src/com/android/bluetooth/opp/BluetoothOppService.java
+1
-2
src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java
src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java
+1
-2
src/com/android/bluetooth/pbap/BluetoothPbapService.java
src/com/android/bluetooth/pbap/BluetoothPbapService.java
+1
-2
No files found.
src/com/android/bluetooth/opp/BluetoothOppReceiver.java
View file @
613bae22
...
...
@@ -37,7 +37,6 @@ import com.android.bluetooth.R;
import
android.app.NotificationManager
;
import
android.bluetooth.BluetoothAdapter
;
import
android.bluetooth.BluetoothDevice
;
import
android.bluetooth.BluetoothError
;
import
android.bluetooth.BluetoothIntent
;
import
android.content.BroadcastReceiver
;
import
android.content.ContentUris
;
...
...
@@ -67,7 +66,7 @@ public class BluetoothOppReceiver extends BroadcastReceiver {
context
.
startService
(
new
Intent
(
context
,
BluetoothOppService
.
class
));
}
else
if
(
action
.
equals
(
BluetoothAdapter
.
ACTION_STATE_CHANGED
))
{
if
(
BluetoothAdapter
.
STATE_ON
==
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Erro
r
.
ERROR
))
{
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Adapte
r
.
ERROR
))
{
if
(
V
)
Log
.
v
(
TAG
,
"Received BLUETOOTH_STATE_CHANGED_ACTION, BLUETOOTH_STATE_ON"
);
context
.
startService
(
new
Intent
(
context
,
BluetoothOppService
.
class
));
...
...
This diff is collapsed.
Click to expand it.
src/com/android/bluetooth/opp/BluetoothOppService.java
View file @
613bae22
...
...
@@ -38,7 +38,6 @@ import javax.obex.ObexTransport;
import
android.app.Service
;
import
android.bluetooth.BluetoothAdapter
;
import
android.bluetooth.BluetoothDevice
;
import
android.bluetooth.BluetoothError
;
import
android.bluetooth.BluetoothIntent
;
import
android.content.BroadcastReceiver
;
import
android.content.ContentUris
;
...
...
@@ -337,7 +336,7 @@ public class BluetoothOppService extends Service {
String
action
=
intent
.
getAction
();
if
(
action
.
equals
(
BluetoothAdapter
.
ACTION_STATE_CHANGED
))
{
switch
(
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Erro
r
.
ERROR
))
{
switch
(
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Adapte
r
.
ERROR
))
{
case
BluetoothAdapter
.
STATE_ON
:
if
(
V
)
Log
.
v
(
TAG
,
"Receiver BLUETOOTH_STATE_CHANGED_ACTION, BLUETOOTH_STATE_ON"
);
...
...
This diff is collapsed.
Click to expand it.
src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java
View file @
613bae22
...
...
@@ -33,7 +33,6 @@
package
com.android.bluetooth.pbap
;
import
android.bluetooth.BluetoothAdapter
;
import
android.bluetooth.BluetoothError
;
import
android.bluetooth.BluetoothIntent
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
...
...
@@ -57,7 +56,7 @@ public class BluetoothPbapReceiver extends BroadcastReceiver {
in
.
putExtra
(
"action"
,
action
);
boolean
startService
=
true
;
if
(
action
.
equals
(
BluetoothAdapter
.
ACTION_STATE_CHANGED
))
{
int
state
=
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Erro
r
.
ERROR
);
int
state
=
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Adapte
r
.
ERROR
);
in
.
putExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
state
);
if
((
state
==
BluetoothAdapter
.
STATE_TURNING_ON
)
||
(
state
==
BluetoothAdapter
.
STATE_TURNING_OFF
))
{
...
...
This diff is collapsed.
Click to expand it.
src/com/android/bluetooth/pbap/BluetoothPbapService.java
View file @
613bae22
...
...
@@ -43,7 +43,6 @@ import android.content.Intent;
import
android.content.res.Resources
;
import
android.bluetooth.BluetoothAdapter
;
import
android.bluetooth.BluetoothDevice
;
import
android.bluetooth.BluetoothError
;
import
android.bluetooth.BluetoothIntent
;
import
android.bluetooth.BluetoothPbap
;
import
android.bluetooth.BluetoothSocket
;
...
...
@@ -241,7 +240,7 @@ public class BluetoothPbapService extends Service {
// process the intent from receiver
private
void
parseIntent
(
final
Intent
intent
)
{
String
action
=
intent
.
getExtras
().
getString
(
"action"
);
int
state
=
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Erro
r
.
ERROR
);
int
state
=
intent
.
getIntExtra
(
BluetoothAdapter
.
EXTRA_STATE
,
Bluetooth
Adapte
r
.
ERROR
);
boolean
removeTimeoutMsg
=
true
;
if
(
action
.
equals
(
BluetoothAdapter
.
ACTION_STATE_CHANGED
))
{
removeTimeoutMsg
=
false
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment