File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
app/src/main/java/com/todobom/opennotescanner Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1072,17 +1072,17 @@ private void statsOptInDialog() {
10721072 statsOptInDialog .setPositiveButton (R .string .answer_yes , new DialogInterface .OnClickListener () {
10731073 @ Override
10741074 public void onClick (DialogInterface dialog , int which ) {
1075- mSharedPref .edit ().putBoolean ("usage_stats" ,true );
1076- mSharedPref .edit ().putBoolean ("isFirstRun" ,false );
1075+ mSharedPref .edit ().putBoolean ("usage_stats" ,true ). commit () ;
1076+ mSharedPref .edit ().putBoolean ("isFirstRun" ,false ). commit () ;
10771077 dialog .dismiss ();
10781078 }
10791079 });
10801080
10811081 statsOptInDialog .setNegativeButton (R .string .answer_no , new DialogInterface .OnClickListener () {
10821082 @ Override
10831083 public void onClick (DialogInterface dialog , int which ) {
1084- mSharedPref .edit ().putBoolean ("usage_stats" ,false );
1085- mSharedPref .edit ().putBoolean ("isFirstRun" ,false );
1084+ mSharedPref .edit ().putBoolean ("usage_stats" ,false ). commit () ;
1085+ mSharedPref .edit ().putBoolean ("isFirstRun" ,false ). commit () ;
10861086 dialog .dismiss ();
10871087 }
10881088 });
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ private void initPiwik() {
5151
5252 // enable usage stats on google play
5353 if (BuildConfig .FLAVOR .equals ("gplay" ) && mSharedPref .getBoolean ("isFirstRun" ,true )) {
54- mSharedPref .edit ().putBoolean ("usage_stats" , true );
55- mSharedPref .edit ().putBoolean ("isFirstRun" , false );
54+ mSharedPref .edit ().putBoolean ("usage_stats" , true ). commit () ;
55+ mSharedPref .edit ().putBoolean ("isFirstRun" , false ). commit () ;
5656 }
5757
5858 // usage stats is optional and only when not debugging
You can’t perform that action at this time.
0 commit comments