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

Commit

Permalink
codeVersion: 83
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel committed Mar 21, 2016
1 parent 0110f26 commit e0ab871
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Smartphone/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="eu.power_switch"
android:versionCode="82"
android:versionCode="83"
android:versionName="@string/app_version">

<!-- Smartphone ONLY Permissions -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,18 @@ public void onReceive(Context context, Intent intent) {

@Override
protected AsyncTaskResult<Gateway> doInBackground(Context... contexts) {
Context context = contexts[0];
NetworkHandler.init(context);
List<Gateway> foundGateways = NetworkHandler.searchGateways();
try {
Context context = contexts[0];
NetworkHandler.init(context);
List<Gateway> foundGateways = NetworkHandler.searchGateways();

Gateway[] gatewaysArray = new Gateway[foundGateways.size()];
foundGateways.toArray(gatewaysArray);
Gateway[] gatewaysArray = new Gateway[foundGateways.size()];
foundGateways.toArray(gatewaysArray);

return new AsyncTaskResult<>(gatewaysArray);
return new AsyncTaskResult<>(gatewaysArray);
} catch (Exception e) {
return new AsyncTaskResult<>(e);
}
}

@Override
Expand Down

0 comments on commit e0ab871

Please sign in to comment.