Commit 346ba6b1 by cuiliang.shi

BUG 开机首次 未插卡导致执行后面逻辑 导致setting报错

1 parent 24a0da5c
...@@ -81,8 +81,7 @@ public class LocationService extends Service { ...@@ -81,8 +81,7 @@ public class LocationService extends Service {
* */ * */
if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){ if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){
Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show(); Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show();
} }else{
if (PreferencesUtil.getInstance(getApplicationContext()) if (PreferencesUtil.getInstance(getApplicationContext())
.getBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false)) { .getBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false)) {
...@@ -102,6 +101,7 @@ public class LocationService extends Service { ...@@ -102,6 +101,7 @@ public class LocationService extends Service {
.putBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false); .putBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false);
} }
} }
}
stopForeground(true); stopForeground(true);
stopSelf(); stopSelf();
......
...@@ -552,6 +552,8 @@ public class PhoneUtils { ...@@ -552,6 +552,8 @@ public class PhoneUtils {
if (sir != null) { if (sir != null) {
subId = sir.getSubscriptionId(); subId = sir.getSubscriptionId();
} }
Log.d(TAG, "getSubid slotid: " + slotId + ", subid: " + subId);
return subId; return subId;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!