这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 4f66786

Browse files
Changed: Store termux-widget token synchronously to the SharedPreferences file on creation
Attempt to solve termux/termux-widget#16
1 parent fefbf2e commit 4f66786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

termux-shared/src/main/java/com/termux/shared/settings/preferences/TermuxWidgetAppSharedPreferences.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public String getGeneratedToken() {
8484
String token = SharedPreferenceUtils.getString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, null, true);
8585
if (token == null) {
8686
token = UUID.randomUUID().toString();
87-
SharedPreferenceUtils.setString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, token, false);
87+
SharedPreferenceUtils.setString(mSharedPreferences, TERMUX_WIDGET_APP.KEY_TOKEN, token, true);
8888
}
8989
return token;
9090
}

0 commit comments

Comments
 (0)