Skip to content

Commit

Permalink
Changed: Store termux-widget token synchronously to the SharedPrefere…
Browse files Browse the repository at this point in the history
…nces file on creation

Attempt to solve termux/termux-widget#16
  • Loading branch information
agnostic-apollo committed Sep 22, 2021
1 parent fefbf2e commit 4f66786
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public String getGeneratedToken() {
String token = SharedPreferenceUtils.getString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, null, true);
if (token == null) {
token = UUID.randomUUID().toString();
SharedPreferenceUtils.setString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, token, false);
SharedPreferenceUtils.setString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, token, true);
}
return token;
}
Expand Down

0 comments on commit 4f66786

Please sign in to comment.