Skip to content

Commit

Permalink
fix: make Codacy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
AsCress committed Dec 27, 2024
1 parent daee97e commit 520ca24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/io/pslab/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public class MainActivity extends AppCompatActivity {
private PendingIntent mPermissionIntent;
private CommunicationHandler communicationHandler;
private USBDetachReceiver usbDetachReceiver;
private WifiDisconnectReceiver wifiDisconnectReceiver;
private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
private static final int TIME_INTERVAL = 2000;
private long mBackPressed;
Expand Down Expand Up @@ -142,7 +141,7 @@ protected void onCreate(Bundle savedInstanceState) {

IntentFilter wifiDisconnectFilter = new IntentFilter();
wifiDisconnectFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
wifiDisconnectReceiver = new WifiDisconnectReceiver(this);
WifiDisconnectReceiver wifiDisconnectReceiver = new WifiDisconnectReceiver(this);
registerReceiver(wifiDisconnectReceiver, wifiDisconnectFilter);

setSupportActionBar(toolbar);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/pslab/communication/PacketHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ public void close() {
} else {
socketClient.closeConnection();
}
} catch (IOException e) {
throw new RuntimeException(e);
} catch (Exception e) {
Log.e(TAG, "Error closing connection");
}
}
}
1 change: 0 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
<dimen name="separator_margin_top">30dp</dimen>
<dimen name="separator_width">1dp</dimen>
<dimen name="device_status_margin_bottom">40dp</dimen>
<dimen name="device_status_margin_top">20dp</dimen>
<dimen name="connect_inst_margin_b0ttom">20dp</dimen>
<dimen name="device_status_height_text">60dp</dimen>
<dimen name="progress_bar_height">8dp</dimen>
Expand Down

0 comments on commit 520ca24

Please sign in to comment.