mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Added: Add SharedPreferences KEY_LAST_PENDING_INTENT_REQUEST_CODE for termux-tasker
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package com.termux.shared.settings.preferences;
|
package com.termux.shared.settings.preferences;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Version: v0.14.0
|
* Version: v0.15.0
|
||||||
*
|
*
|
||||||
* Changelog
|
* Changelog
|
||||||
*
|
*
|
||||||
@@ -61,6 +61,10 @@ package com.termux.shared.settings.preferences;
|
|||||||
*
|
*
|
||||||
* - 0.14.0 (2021-09-04)
|
* - 0.14.0 (2021-09-04)
|
||||||
* - Added `TERMUX_WIDGET_APP.KEY_TOKEN`.
|
* - 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";
|
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);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user