projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added optional button to restart game (door, panel and touch variants)
[rocksndiamonds.git]
/
build-projects
/
android
/
app
/
src
/
main
/
java
/
org
/
libsdl
/
app
/
HIDDeviceUSB.java
diff --git
a/build-projects/android/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
b/build-projects/android/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
index 33816e34484d4f7242ff5fbb1f28d56af13b0d93..d20fe80bc692b30590ecff4dd9153b1a1f788c32 100644
(file)
--- a/
build-projects/android/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
+++ b/
build-projects/android/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
@@
-53,7
+53,12
@@
class HIDDeviceUSB implements HIDDevice {
public String getSerialNumber() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
public String getSerialNumber() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
- result = mDevice.getSerialNumber();
+ try {
+ result = mDevice.getSerialNumber();
+ }
+ catch (SecurityException exception) {
+ //Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
+ }
}
if (result == null) {
result = "";
}
if (result == null) {
result = "";