Skip to content

Commit f48ca73

Browse files
committed
Fix screen update after DFU error
1 parent e501467 commit f48ca73

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

app/src/main/java/com/samsung/microbit/MBApp.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,30 @@ public void logi(String message) {
4444

4545
@Override
4646
public void onCreate() {
47-
if (DEBUG) {
48-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
49-
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
50-
.detectAll()
51-
.penaltyLog()
52-
// .penaltyFlashScreen()
47+
// if (DEBUG) {
48+
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
49+
// StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
50+
// .detectAll()
51+
// .permitDiskReads()
52+
// .penaltyLog()
5353
// .penaltyListener(Executors.newSingleThreadExecutor(), new StrictMode.OnThreadViolationListener() {
5454
// @Override
5555
// public void onThreadViolation(Violation v) {
5656
// }
5757
// })
58-
.build());
59-
60-
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
61-
.detectAll()
62-
.penaltyLog()
58+
// .build());
59+
//
60+
// StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
61+
// .detectAll()
62+
// .penaltyLog()
6363
// .penaltyListener(Executors.newSingleThreadExecutor(), new StrictMode.OnVmViolationListener() {
6464
// @Override
6565
// public void onVmViolation(Violation v) {
6666
// }
6767
// })
68-
.build());
69-
}
70-
}
68+
// .build());
69+
// }
70+
// }
7171
super.onCreate();
7272
app = this;
7373
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);

app/src/main/java/com/samsung/microbit/ui/activity/ProjectActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,8 @@ public void onClick(View v) {
23372337
final int errorType = intent.getIntExtra(DfuBaseService.EXTRA_ERROR_TYPE, 0);
23382338
String error_message = "";
23392339

2340+
PopUp.hide();
2341+
23402342
switch (errorType) {
23412343
case DfuBaseService.ERROR_TYPE_COMMUNICATION_STATE:
23422344
if ( errorCode == 0x0085) {

0 commit comments

Comments
 (0)