mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 10:45:23 +08:00
Added: Add KEY_LAST_PENDING_INTENT_REQUEST_CODE
to TermuxAPIAppSharedPreferences
This commit is contained in:
committed by
agnostic-apollo
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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user