mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Added: Add SharedPreferences KEY_LAST_PENDING_INTENT_REQUEST_CODE for termux-tasker
This commit is contained in:
parent
f00738fe3a
commit
ac32fbc53d
2 changed files with 22 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package com.termux.shared.settings.preferences;
|
||||
|
||||
/*
|
||||
* Version: v0.14.0
|
||||
* Version: v0.15.0
|
||||
*
|
||||
* Changelog
|
||||
*
|
||||
|
|
@ -61,6 +61,10 @@ package com.termux.shared.settings.preferences;
|
|||
*
|
||||
* - 0.14.0 (2021-09-04)
|
||||
* - Added `TERMUX_WIDGET_APP.KEY_TOKEN`.
|
||||
*
|
||||
* - 0.15.0 (2021-09-05)
|
||||
* - Added following to `TERMUX_TASKER_APP`:
|
||||
* `KEY_LAST_PENDING_INTENT_REQUEST_CODE` and `DEFAULT_VALUE_KEY_LAST_PENDING_INTENT_REQUEST_CODE`.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -259,6 +263,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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -84,4 +84,14 @@ public class TermuxTaskerAppSharedPreferences {
|
|||
SharedPreferenceUtils.setInt(mSharedPreferences, TERMUX_TASKER_APP.KEY_LOG_LEVEL, logLevel, commitToFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getLastPendingIntentRequestCode() {
|
||||
return SharedPreferenceUtils.getInt(mSharedPreferences, TERMUX_TASKER_APP.KEY_LAST_PENDING_INTENT_REQUEST_CODE, TERMUX_TASKER_APP.DEFAULT_VALUE_KEY_LAST_PENDING_INTENT_REQUEST_CODE);
|
||||
}
|
||||
|
||||
public void setLastPendingIntentRequestCode(int lastPendingIntentRequestCode) {
|
||||
SharedPreferenceUtils.setInt(mSharedPreferences, TERMUX_TASKER_APP.KEY_LAST_PENDING_INTENT_REQUEST_CODE, lastPendingIntentRequestCode, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue