Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit e0ab871

Browse files
committed
codeVersion: 83
1 parent 0110f26 commit e0ab871

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Smartphone/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
xmlns:android="http://schemas.android.com/apk/res/android"
2222
xmlns:tools="http://schemas.android.com/tools"
2323
package="eu.power_switch"
24-
android:versionCode="82"
24+
android:versionCode="83"
2525
android:versionName="@string/app_version">
2626

2727
<!-- Smartphone ONLY Permissions -->

Smartphone/src/main/java/eu/power_switch/gui/activity/MainActivity.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,18 @@ public void onReceive(Context context, Intent intent) {
251251

252252
@Override
253253
protected AsyncTaskResult<Gateway> doInBackground(Context... contexts) {
254-
Context context = contexts[0];
255-
NetworkHandler.init(context);
256-
List<Gateway> foundGateways = NetworkHandler.searchGateways();
254+
try {
255+
Context context = contexts[0];
256+
NetworkHandler.init(context);
257+
List<Gateway> foundGateways = NetworkHandler.searchGateways();
257258

258-
Gateway[] gatewaysArray = new Gateway[foundGateways.size()];
259-
foundGateways.toArray(gatewaysArray);
259+
Gateway[] gatewaysArray = new Gateway[foundGateways.size()];
260+
foundGateways.toArray(gatewaysArray);
260261

261-
return new AsyncTaskResult<>(gatewaysArray);
262+
return new AsyncTaskResult<>(gatewaysArray);
263+
} catch (Exception e) {
264+
return new AsyncTaskResult<>(e);
265+
}
262266
}
263267

264268
@Override

0 commit comments

Comments
 (0)