fix(gpsrelaysentinel): 修复MainActivity访问MainService常量的权限问题
- 将PREF_NAME和KEY_SERVICE_ENABLED字段从private改为包内可见 - 允许MainActivity访问SP相关常量以设置服务状态标记 - 修复编译错误:KEY_SERVICE_ENABLED has private access
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Wed May 06 20:58:30 CST 2026
|
#Thu May 07 02:57:52 CST 2026
|
||||||
stageCount=27
|
stageCount=27
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.11
|
baseVersion=15.11
|
||||||
publishVersion=15.11.26
|
publishVersion=15.11.26
|
||||||
buildCount=26
|
buildCount=30
|
||||||
baseBetaVersion=15.11.27
|
baseBetaVersion=15.11.27
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ public class MainService extends Service {
|
|||||||
private NotificationCompat.Builder mNotificationBuilder;
|
private NotificationCompat.Builder mNotificationBuilder;
|
||||||
private static final String CHANNEL_ID = "gps_relay_channel";
|
private static final String CHANNEL_ID = "gps_relay_channel";
|
||||||
private static final int NOTIFICATION_ID = 1;
|
private static final int NOTIFICATION_ID = 1;
|
||||||
private static final String PREF_NAME = "gps_relay_service_prefs";
|
static final String PREF_NAME = "gps_relay_service_prefs";
|
||||||
private static final String KEY_SERVICE_ENABLED = "service_enabled";
|
static final String KEY_SERVICE_ENABLED = "service_enabled";
|
||||||
private int mGpsCount = 0;
|
private int mGpsCount = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user