OSDN Git Service
(root)
/
android-x86
/
packages-apps-Bluetooth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6699ac
)
AVRCP: fix PlayItem NPE with no Addressed Player
author
Marie Janssen
<jamuraa@google.com>
Tue, 25 Apr 2017 18:17:03 +0000
(11:17 -0700)
committer
Andre Eisenbach
<eisenbach@google.com>
Thu, 27 Apr 2017 19:37:12 +0000
(19:37 +0000)
Test: connect to audi, note no crashes
Change-Id: I584244c98b5afbc697b491886e4205f3af9083ca
Fixes:
37657913
(cherry picked from commit
db2d487ba559f0e4de02bc2ad4cc7e275878b2fc
)
src/com/android/bluetooth/avrcp/Avrcp.java
patch
|
blob
|
history
diff --git
a/src/com/android/bluetooth/avrcp/Avrcp.java
b/src/com/android/bluetooth/avrcp/Avrcp.java
index
ca66152
..
186ff6a
100644
(file)
--- a/
src/com/android/bluetooth/avrcp/Avrcp.java
+++ b/
src/com/android/bluetooth/avrcp/Avrcp.java
@@
-2231,11
+2231,11
@@
public final class Avrcp {
}
MediaPlayerInfo info = getAddressedPlayerInfo();
- if (info != null || !info.getPackageName().equals(browsedPlayer)) {
- Log.w(TAG, browsedPlayer + " is not addressed player " + info.getPackageName());
+ String packageName = (info == null) ? "<none>" : info.getPackageName();
+ if (info == null || !packageName.equals(browsedPlayer)) {
+ if (DEBUG) Log.d(TAG, browsedPlayer + " is not addressed player " + packageName);
return false;
}
-
return true;
}