@@ -59,6 +59,7 @@ public class HomeActivity extends AppCompatActivity implements View.OnClickListe
59
59
60
60
public static final String FIRST_RUN = "firstrun" ;
61
61
public static final String FIRST_RUN_300 = "firstrun300" ;
62
+ public static final String FIRST_RUN_301 = "firstrun301" ;
62
63
63
64
// share stats checkbox
64
65
private CheckBox mShareStatsCheckBox ;
@@ -496,17 +497,27 @@ private void setFirstRun300( boolean yes) {
496
497
mPrefs .edit ().putBoolean (FIRST_RUN_300 , yes ).apply ();
497
498
}
498
499
500
+ private boolean isFirstRun301 () {
501
+ return mPrefs .getBoolean (FIRST_RUN_301 , true );
502
+ }
503
+
504
+ private void setFirstRun301 ( boolean yes ) {
505
+ mPrefs .edit ().putBoolean (FIRST_RUN_301 , yes ).apply ();
506
+ }
507
+
499
508
/**
500
509
* Loads standard samples provided by Samsung. The samples can be used to
501
510
* flash on a micro:bit board.
502
511
*/
503
512
private void installSamples ( boolean withThanks ) {
504
513
boolean firstRun = isFirstRun ();
505
514
boolean firstRun300 = isFirstRun300 ();
515
+ boolean firstRun301 = isFirstRun301 ();
506
516
if ( firstRun ) setFirstRun (false );
507
517
if ( firstRun300 ) setFirstRun300 (false );
518
+ if ( firstRun301 ) setFirstRun301 (false );
508
519
509
- if ( firstRun || firstRun300 && !ProjectsHelper .legacyStorage ()) {
520
+ if ( firstRun || firstRun301 || firstRun300 && !ProjectsHelper .legacyStorage ()) {
510
521
//First Run. Install the Sample applications
511
522
if ( withThanks ) {
512
523
new Thread (new Runnable () {
@@ -542,6 +553,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String permissi
542
553
} else {
543
554
setFirstRun (false );
544
555
setFirstRun300 (false );
556
+ setFirstRun301 (false );
545
557
PopUp .show (getString (R .string .storage_permission_for_samples_error ),
546
558
"" ,
547
559
R .drawable .error_face , R .drawable .red_btn ,
@@ -587,6 +599,7 @@ public void onClick(View v) {
587
599
null , null );
588
600
setFirstRun (false );
589
601
setFirstRun300 (false );
602
+ setFirstRun301 (false );
590
603
}
591
604
};
592
605
@@ -596,7 +609,7 @@ public void onClick(View v) {
596
609
*/
597
610
private void checkMinimumPermissionsForThisScreen () {
598
611
//Check reading permissions & writing permission to populate the HEX files & show program list
599
- if (isFirstRun () || isFirstRun300 () && !ProjectsHelper .legacyStorage ()) {
612
+ if ( isFirstRun () || isFirstRun301 () || isFirstRun300 () && !ProjectsHelper .legacyStorage ()) {
600
613
if ( !ProjectsHelper .havePermissions (this )) {
601
614
PopUp .show (getString (R .string .storage_permission_for_samples ),
602
615
getString (R .string .permissions_needed_title ),
0 commit comments