Skip to content

Commit

Permalink
Fix screen update after DFU error
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwork committed Jul 21, 2024
1 parent e501467 commit f48ca73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 14 additions & 14 deletions app/src/main/java/com/samsung/microbit/MBApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,30 @@ public void logi(String message) {

@Override
public void onCreate() {
if (DEBUG) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
// .penaltyFlashScreen()
// if (DEBUG) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
// StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
// .detectAll()
// .permitDiskReads()
// .penaltyLog()
// .penaltyListener(Executors.newSingleThreadExecutor(), new StrictMode.OnThreadViolationListener() {
// @Override
// public void onThreadViolation(Violation v) {
// }
// })
.build());

StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
// .build());
//
// StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
// .detectAll()
// .penaltyLog()
// .penaltyListener(Executors.newSingleThreadExecutor(), new StrictMode.OnVmViolationListener() {
// @Override
// public void onVmViolation(Violation v) {
// }
// })
.build());
}
}
// .build());
// }
// }
super.onCreate();
app = this;
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2337,6 +2337,8 @@ public void onClick(View v) {
final int errorType = intent.getIntExtra(DfuBaseService.EXTRA_ERROR_TYPE, 0);
String error_message = "";

PopUp.hide();

switch (errorType) {
case DfuBaseService.ERROR_TYPE_COMMUNICATION_STATE:
if ( errorCode == 0x0085) {
Expand Down

0 comments on commit f48ca73

Please sign in to comment.