fix(gpsrelaysentinel): 修复MainActivity访问MainService常量的权限问题
- 将PREF_NAME和KEY_SERVICE_ENABLED字段从private改为包内可见 - 允许MainActivity访问SP相关常量以设置服务状态标记 - 修复编译错误:KEY_SERVICE_ENABLED has private access
This commit is contained in:
@@ -26,8 +26,8 @@ public class MainService extends Service {
|
||||
private NotificationCompat.Builder mNotificationBuilder;
|
||||
private static final String CHANNEL_ID = "gps_relay_channel";
|
||||
private static final int NOTIFICATION_ID = 1;
|
||||
private static final String PREF_NAME = "gps_relay_service_prefs";
|
||||
private static final String KEY_SERVICE_ENABLED = "service_enabled";
|
||||
static final String PREF_NAME = "gps_relay_service_prefs";
|
||||
static final String KEY_SERVICE_ENABLED = "service_enabled";
|
||||
private int mGpsCount = 0;
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user