mirror of https://github.com/termux/termux-app
Added: Add `KEY_LAST_PENDING_INTENT_REQUEST_CODE` to `TermuxAPIAppSharedPreferences`
This commit is contained in:
parent
3f7a939313
commit
5bc3d2db8d
|
@ -72,4 +72,13 @@ public class TermuxAPIAppSharedPreferences extends AppSharedPreferences {
|
|||
SharedPreferenceUtils.setInt(mSharedPreferences, TERMUX_API_APP.KEY_LOG_LEVEL, logLevel, commitToFile);
|
||||
}
|
||||
|
||||
|
||||
public int getLastPendingIntentRequestCode() {
|
||||
return SharedPreferenceUtils.getInt(mSharedPreferences, TERMUX_API_APP.KEY_LAST_PENDING_INTENT_REQUEST_CODE, TERMUX_API_APP.DEFAULT_VALUE_KEY_LAST_PENDING_INTENT_REQUEST_CODE);
|
||||
}
|
||||
|
||||
public void setLastPendingIntentRequestCode(int lastPendingIntentRequestCode) {
|
||||
SharedPreferenceUtils.setInt(mSharedPreferences, TERMUX_API_APP.KEY_LAST_PENDING_INTENT_REQUEST_CODE, lastPendingIntentRequestCode, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -194,6 +194,13 @@ public final class TermuxPreferenceConstants {
|
|||
*/
|
||||
public static final String KEY_LOG_LEVEL = "log_level";
|
||||
|
||||
|
||||
/**
|
||||
* Defines the key for last used PendingIntent request code.
|
||||
*/
|
||||
public static final String KEY_LAST_PENDING_INTENT_REQUEST_CODE = "last_pending_intent_request_code";
|
||||
public static final int DEFAULT_VALUE_KEY_LAST_PENDING_INTENT_REQUEST_CODE = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue