Java 类android.telephony.ServiceState 实例源码

项目:Android-IMSI-Catcher-Detector    文件:CellTracker.java   
/**
 * Start FemtoCell detection tracking (For CDMA Devices ONLY!)
 */
public void startTrackingFemto() {

    /* Check if it is a CDMA phone */
    if (device.getPhoneId() != TelephonyManager.PHONE_TYPE_CDMA) {
        Helpers.msgShort(context, context.getString(R.string.femtocell_only_on_cdma_devices));
        return;
    }

    trackingFemtocell = true;
    mPhoneStateListener = new PhoneStateListener() {
        public void onServiceStateChanged(ServiceState s) {
            log.debug(context.getString(R.string.service_state_changed));
            getServiceStateInfo(s);
        }
    };
    tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION);
    tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
    setNotification();
}
项目:android-QoS    文件:QosInfo.java   
public String getServiceStateName (int state)
{
    String name = "";
    if (state >= 10)
    {
        name = "roam ";
        if (state == 10)
            return name;
        else
            state = state - 10;
    }
    switch (state)
    {
        case ServiceState.STATE_OUT_OF_SERVICE:
            name += "no service"; break;
        case ServiceState.STATE_EMERGENCY_ONLY:
            name += "911 only"; break;
        case PhoneState.SERVICE_STATE_AIRPLANE:
            name += "airplane"; break;
        case ServiceState.STATE_IN_SERVICE:
            name += "in service"; break;
        case ServiceState.STATE_POWER_OFF:
            name += "power off"; break;
    }
    return name;
}
项目:android-QoS    文件:PhoneState.java   
public static int getVoiceNetworkType (ServiceState serviceState)
{
    Method m = null;
    try {
        // Java reflection to gain access to TelephonyManager's
        // ITelephony getter
        Class c = Class.forName(serviceState.getClass().getName());
        Method mI = c.getDeclaredMethod("getRilVoiceRadioTechnology");
        mI.setAccessible(true);
        int voiceTechRil = (Integer)mI.invoke(serviceState);
        int voiceTech = PhoneState.rilRadioTechnologyToNetworkType(voiceTechRil);
        return voiceTech;
    }
    catch (Exception e)
    {
        String s = e.toString();
        //LoggerUtil.logToFile(LoggerUtil.Level.ERROR, TAG, "getVoiceNetworkType", "exception", e);
    }
    return -1;
}
项目:PhoneProfilesPlus    文件:PhoneStateScanner.java   
@Override
public void onServiceStateChanged (ServiceState serviceState) {
    super.onServiceStateChanged(serviceState);

    PPApplication.logE("PhoneStateScanner.onServiceStateChanged", "telephonyManager=" + telephonyManager);
    CallsCounter.logCounter(context, "PhoneStateScanner.onServiceStateChanged", "PhoneStateScanner_onServiceStateChanged");

    getRegisteredCell();

    if (registeredCell != Integer.MAX_VALUE) {
        DatabaseHandler db = DatabaseHandler.getInstance(context);
        db.updateMobileCellLastConnectedTime(registeredCell, lastConnectedTime);
    }

    doAutoRegistration();
    sendBroadcast();
}
项目:NetInfo    文件:MobileDataStateListener.java   
@Override
public void onServiceStateChanged(ServiceState serviceState)
{
    switch (serviceState.getState())
    {
        case ServiceState.STATE_EMERGENCY_ONLY:
        case ServiceState.STATE_OUT_OF_SERVICE:
            NetworkStateService.setMobileOutOfService(true);
            LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(Constants.ACTION_SERVICE_STATE_CHANGED));
            break;

        default:
            {
                NetworkStateService.setMobileOutOfService(false);

                // If the device is network roaming but mobile data roaming is disabled, this
                // broadcast is necessary to properly update the widget on service state changes.
                if ((serviceState.getState() == ServiceState.STATE_IN_SERVICE) && serviceState.getRoaming())
                    LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(Constants.ACTION_SERVICE_STATE_CHANGED));
            }
            break;
    }
}
项目:SignalAnalysis    文件:PhoneStateHelper.java   
/**
 * Get the service state
 * 
 * @see ServiceState#STATE_EMERGENCY_ONLY
 * @see ServiceState#STATE_IN_SERVICE
 * @see ServiceState#STATE_OUT_OF_SERVICE
 * @see ServiceState#STATE_POWER_OFF
 * @return service state
 */
public String getServiceState() {
    if (DBG)
        Log.d(Config.TAG, TAG + "getServiceState called");
    switch (mServiceStage) {
    case ServiceState.STATE_EMERGENCY_ONLY:
        return "Emergency Only";
    case ServiceState.STATE_IN_SERVICE:
        return "In Service";
    case ServiceState.STATE_POWER_OFF:
        return "Power Off";
    case ServiceState.STATE_OUT_OF_SERVICE:
        return "Out Of Service";
    default:
        return "Unknown";
    }
}
项目:retrowatch    文件:RetroWatchService.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    Logs.d("# PhoneStateListener - onServiceStateChanged();");
    int state = serviceState.getState();

    switch (state) {
    case ServiceState.STATE_IN_SERVICE:
        Logs.d("# PhoneStateListener - onServiceStateChanged(); - reserve update");
        reserveRemoteUpdate(DEFAULT_UPDATE_DELAY);
        break;
    case ServiceState.STATE_OUT_OF_SERVICE:
    case ServiceState.STATE_EMERGENCY_ONLY:
    case ServiceState.STATE_POWER_OFF:
        ContentObject co = mContentManager.addRFStateObject(state);
        if(mActivityHandler != null)
            mActivityHandler.obtainMessage(Constants.MESSAGE_RF_STATE_RECEIVED, co).sendToTarget();
        // send to device
        if(co != null)
            sendContentsToDevice(co);
        else
            deleteEmergencyOfDevice(EmergencyObject.EMERGENCY_TYPE_RF_STATE);
        break;
    }
}
项目:retrowatch    文件:RetroWatchService.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    int state = serviceState.getState();

    switch (state) {
    case ServiceState.STATE_IN_SERVICE:
    case ServiceState.STATE_OUT_OF_SERVICE:
    case ServiceState.STATE_EMERGENCY_ONLY:
    case ServiceState.STATE_POWER_OFF:
        ContentObject co = mContentManager.addRFStateObject(state);
        if(mActivityHandler != null)
            mActivityHandler.obtainMessage(Constants.MESSAGE_RF_STATE_RECEIVED, co).sendToTarget();
        // send to device
        if(co != null)
            sendContentsToDevice(co);
        else
            deleteEmergencyOfDevice(EmergencyObject.EMERGENCY_TYPE_RF_STATE);
        break;
    }
}
项目:sms_DualCard    文件:DownloadManager.java   
@Override
public void onReceive(Context context, Intent intent) {
    if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(intent.getAction())) {
        if (LOCAL_LOGV) {
            Log.v(TAG, "Service state changed: " + intent.getExtras());
        }

        ServiceState state = ServiceState.newFromBundle(intent.getExtras());
        boolean isRoaming = state.getRoaming();
        if (LOCAL_LOGV) {
            Log.v(TAG, "roaming ------> " + isRoaming);
        }
        synchronized (sInstance) {
            mAutoDownload = getAutoDownloadState(mPreferences, isRoaming);
            if (LOCAL_LOGV) {
                Log.v(TAG, "mAutoDownload ------> " + mAutoDownload);
            }
        }
    }
}
项目:android-utilset    文件:NetworkMonitor.java   
public void listenRoamingState() {
    if (phoneStateListener == null) {
        phoneStateListener = new PhoneStateListener() {
            @Override
            public void onServiceStateChanged(ServiceState serviceState) {
                super.onServiceStateChanged(serviceState);

                final int state = serviceState.getState();
                if (state == ServiceState.STATE_IN_SERVICE
                        || state == ServiceState.STATE_POWER_OFF) {
                    final boolean roamingState = serviceState
                            .getRoaming();
                    if (roamingState != isRoamingOn()) {
                        setRoamingOn(roamingState);
                    }
                }
            }
        };
    }

    TelephonyManager telMgr = (TelephonyManager) context
            .getSystemService(Context.TELEPHONY_SERVICE);
    telMgr.listen(phoneStateListener,
            PhoneStateListener.LISTEN_SERVICE_STATE);
}
项目:femtocatcher    文件:MainActivity.java   
public void startTracking(){
       mTelephonyManager = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);

       /* Check if it is a CDMA phone */
       if(mTelephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
        tv1 = (TextView) findViewById(R.id.err_msg);
        tv1.setText("This application can detect a femtocell on a CDMA phone only.");
        return;
       }

       mListener = new PhoneStateListener() {
         public void onServiceStateChanged(ServiceState s){
             Log.d(TAG, "Service State changed!");
             getServiceStateInfo(s);
         }
    };
    mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_CELL_LOCATION);
    mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_SERVICE_STATE);
}
项目:android-aosp-mms    文件:DownloadManager.java   
@Override
public void onReceive(Context context, Intent intent) {
    if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(intent.getAction())) {
        if (LOCAL_LOGV) {
            Log.v(TAG, "Service state changed: " + intent.getExtras());
        }

        ServiceState state = ServiceState.newFromBundle(intent.getExtras());
        boolean isRoaming = state.getRoaming();
        if (LOCAL_LOGV) {
            Log.v(TAG, "roaming ------> " + isRoaming);
        }
        synchronized (sInstance) {
            mAutoDownload = getAutoDownloadState(mPreferences, isRoaming);
            if (LOCAL_LOGV) {
                Log.v(TAG, "mAutoDownload ------> " + mAutoDownload);
            }
        }
    }
}
项目:GravityBox    文件:PieController.java   
public String getOperatorState() {
    if (!mHasTelephony) {
        return null;
    }
    if (mServiceState == null || mServiceState.getState() == ServiceState.STATE_OUT_OF_SERVICE) {
        return mGbResources.getString(R.string.pie_phone_status_no_service);
    }
    if (mServiceState.getState() == ServiceState.STATE_POWER_OFF) {
        return mGbResources.getString(R.string.pie_phone_status_airplane_mode);
    }
    if ((Boolean)XposedHelpers.callMethod(mServiceState, "isEmergencyOnly")) {
        return mGbResources.getString(R.string.pie_phone_status_emergency_only);
    }
    return mServiceState.getOperatorAlphaLong();
}
项目:LibreTasks    文件:PhoneStateMonitor.java   
@Override
public void onServiceStateChanged(ServiceState serviceState){      
  if (serviceState.getState() == ServiceState.STATE_IN_SERVICE ) {
    Intent intent = new Intent(ServiceAvailableEvent.ACTION_NAME);
    context.sendBroadcast(intent);
    serviceAvailable = true;
  } else {
    serviceAvailable = false;
  }
}
项目:truth-android    文件:ServiceStateSubject.java   
public static SubjectFactory<ServiceStateSubject, ServiceState> type() {
  return new SubjectFactory<ServiceStateSubject, ServiceState>() {
    @Override
    public ServiceStateSubject getSubject(FailureStrategy fs, ServiceState that) {
      return new ServiceStateSubject(fs, that);
    }
  };
}
项目:Android-IMSI-Catcher-Detector    文件:CellTracker.java   
private void getServiceStateInfo(ServiceState s) {
    if (s != null) {
        if (IsConnectedToCdmaFemto(s)) {
            Helpers.msgShort(context, context.getString(R.string.alert_femtocell_tracking_detected));
            femtoDetected = true;
            setNotification();
            //toggleRadio();
        } else {
            femtoDetected = false;
            setNotification();
        }
    }
}
项目:mobility-logger    文件:MainActivity.java   
public void onServiceStateChanged(ServiceState serviceState)
{
    TextView myservicestate = (TextView)findViewById(R.id.myservicestate);
    int state = serviceState.getState();
    switch(state){
        case ServiceState.STATE_EMERGENCY_ONLY: myservicestate.setText("EMERGENCY ONLY"); break;
        case ServiceState.STATE_IN_SERVICE: myservicestate.setText("IN SERVICE"); break;
        case ServiceState.STATE_OUT_OF_SERVICE: myservicestate.setText("OUT OF SERVICE"); break;
        case ServiceState.STATE_POWER_OFF: myservicestate.setText("POWER OFF"); break;
    }
}
项目:iTester    文件:MobileNetActivity.java   
private void initUI()
{
    tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);  
    tv_mobile = (TextView)findViewById(R.id.textView_mobile);
    tv_mobile.setTextColor(Color.RED);
    tv_mobile.setTextSize(30);
    findViewById(R.id.button_pass).setOnClickListener(this);
    findViewById(R.id.button_fail).setOnClickListener(this);
    findViewById(R.id.button_pass).setEnabled(false);

       updateViews(tm);  
        //����SIM��״̬��������Ϣ��ʱ�����ܷ����仯�������Ҫע��PhoneStateListener   
        //��ʵʱ���½�����ʾ����Ϣ��������������¼���LISTEN_SERVICE_STATE��LISTEN_DATA_CONNECTION_STATE   
        //���Ƿֱ��Ӧ�ص�����onServiceStateChanged��onDataConnectionStateChanged   
        tm.listen(new PhoneStateListener() {  

            @Override  
            public void onDataConnectionStateChanged(int state, int networkType) {  
                //��������״̬�ı���ܵ����������͵ĸı�   
                updateViews(tm);  
            }  

            @Override  
            public void onServiceStateChanged(ServiceState serviceState) {  
                updateViews(tm);  
            }

            @Override
            public void onSignalStrengthsChanged(SignalStrength signalStrength) {
                // TODO Auto-generated method stub
                Stren=String.valueOf(-113+2*signalStrength.getGsmSignalStrength())+" dBm  "+String.valueOf(signalStrength.getGsmSignalStrength())+" asu";
                updateViews(tm);
                super.onSignalStrengthsChanged(signalStrength);
            } 


        }, PhoneStateListener.LISTEN_SERVICE_STATE   
                | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE|PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); 
 }
项目:SignalAnalysis    文件:PhoneStateHelper.java   
/**
 * Callback invoked when device service state changes.
 * 
 * @see ServiceState#STATE_EMERGENCY_ONLY
 * @see ServiceState#STATE_IN_SERVICE
 * @see ServiceState#STATE_OUT_OF_SERVICE
 * @see ServiceState#STATE_POWER_OFF
 */
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    if (DBG)
        Log.d(Config.TAG, TAG + "onServiceStateChanged called");
    if (mServiceStage != serviceState.getState()) {
        mServiceStage = serviceState.getState();
        isRoaming = serviceState.getRoaming();
    }
}
项目:VoLTE_Dialer    文件:CallMonitorReceiver.java   
@Override
   public void onServiceStateChanged(ServiceState serviceState) {
    super.onServiceStateChanged(serviceState);
    int state = serviceState.getState();
    int cmState = CallMonitorService.MSG_SERVER_STATE_OUTSERVICE;
    if(state == ServiceState.STATE_IN_SERVICE) {
        cmState = CallMonitorService.MSG_SERVER_STATE_INSERVICE;
    }
    mCmIf.csmif_ServiceState(cmState);
}
项目:Securecom-Text    文件:SystemStateListener.java   
@Override
public void onServiceStateChanged(ServiceState state) {
  if (state.getState() == ServiceState.STATE_IN_SERVICE) {
    Log.w("SystemStateListener", "In service, sending sms/mms outboxes...");
    sendSmsOutbox(context);
    sendMmsOutbox(context);
  }
}
项目:sms_DualCard    文件:SmsReceiverService.java   
private void handleServiceStateChanged(Intent intent) {
    // If service just returned, start sending out the queued messages
    ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras());
    int subscription = intent.getIntExtra(SUBSCRIPTION_KEY, 0);
    int prefSubscription = MSimSmsManager.getDefault().getPreferredSmsSubscription();
    // if service state is IN_SERVICE & current subscription is same as
    // preferred SMS subscription.i.e.as set under MultiSIM Settings,then
    // sendFirstQueuedMessage.
    if (serviceState.getState() == ServiceState.STATE_IN_SERVICE &&
        subscription == prefSubscription) {
        sendFirstQueuedMessage();
    }
}
项目:Mobilog    文件:MainActivity.java   
public void onServiceStateChanged(ServiceState serviceState)
{
    TextView myservicestate = (TextView)findViewById(R.id.myservicestate);
    int state = serviceState.getState();
    switch(state){
        case ServiceState.STATE_EMERGENCY_ONLY: myservicestate.setText("EMERGENCY ONLY"); break;
        case ServiceState.STATE_IN_SERVICE: myservicestate.setText("IN SERVICE"); break;
        case ServiceState.STATE_OUT_OF_SERVICE: myservicestate.setText("OUT OF SERVICE"); break;
        case ServiceState.STATE_POWER_OFF: myservicestate.setText("POWER OFF"); break;
    }
}
项目:EasyAccess    文件:CallManager.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    super.onServiceStateChanged(serviceState);
    String phonestate = "";
    // set the state of the service - serviceState according to the value in
    // serviceState
    switch (serviceState.getState()) {
    case ServiceState.STATE_EMERGENCY_ONLY:
        if (PhoneNumberUtils.isEmergencyNumber(this.number))
            phonestate = context.getResources().getString(
                    R.string.state_in_service);
        else
            phonestate = context.getResources().getString(
                    R.string.emergency_calls_only);
        setServiceState(phonestate);
        break;
    case ServiceState.STATE_OUT_OF_SERVICE:
        phonestate = context.getResources().getString(R.string.no_service);
        setServiceState(phonestate);
        break;
    case ServiceState.STATE_POWER_OFF:
        phonestate = context.getResources().getString(R.string.power_off);
        setServiceState(phonestate);
        break;
    case ServiceState.STATE_IN_SERVICE:
        phonestate = context.getResources().getString(
                R.string.state_in_service);
        setServiceState(phonestate);
        break;
    default:
        phonestate = context.getResources().getString(
                R.string.service_unknown_reason);
        setServiceState(phonestate);
    }
}
项目:Ptimulus    文件:TelephonyEvent.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    synchronized (lock) {
        lastServiceState = serviceState;
              lastServiceStateTime = System.currentTimeMillis();
           if(listening)
               ptimulusService.telephonyEvent(serviceState);
    }
}
项目:Open-Battery-Saver    文件:UMLoggerService.java   
public void onServiceStateChanged(ServiceState serviceState) {
    switch (serviceState.getState()) {
    case ServiceState.STATE_EMERGENCY_ONLY:
        powerEstimator.writeToLog("phone-service emergency-only\n");
        break;
    case ServiceState.STATE_IN_SERVICE:
        powerEstimator.writeToLog("phone-service in-service\n");
        switch (phoneManager.getNetworkType()) {
        case (TelephonyManager.NETWORK_TYPE_EDGE):
            powerEstimator.writeToLog("phone-network edge\n");
            break;
        case (TelephonyManager.NETWORK_TYPE_GPRS):
            powerEstimator.writeToLog("phone-network GPRS\n");
            break;
        case 8:
            powerEstimator.writeToLog("phone-network HSDPA\n");
            break;
        case (TelephonyManager.NETWORK_TYPE_UMTS):
            powerEstimator.writeToLog("phone-network UMTS\n");
            break;
        default:
            powerEstimator.writeToLog("phone-network "
                    + phoneManager.getNetworkType() + "\n");
        }
        break;
    case ServiceState.STATE_OUT_OF_SERVICE:
        powerEstimator.writeToLog("phone-service out-of-service\n");
        break;
    case ServiceState.STATE_POWER_OFF:
        powerEstimator.writeToLog("phone-service power-off\n");
        break;
    }
}
项目:femtocatcher    文件:MainActivity.java   
public void getServiceStateInfo(ServiceState s) {
    if(s!= null && IsConnectedToCdmaFemto(s)) {
        sendNotification();
        toggleRadio();
    }

}
项目:android-aosp-mms    文件:SmsReceiverService.java   
private void handleServiceStateChanged(Intent intent) {
    // If service just returned, start sending out the queued messages
    ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras());
    if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
        sendFirstQueuedMessage();
    }
}
项目:PeSanKita-android    文件:TelephonyServiceState.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
  this.connected = (serviceState.getState() == ServiceState.STATE_IN_SERVICE);
  looper.quit();
}
项目:PeSanKita-android    文件:ServiceRequirementProvider.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
  if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
    handleInService();
  }
}
项目:AIMSICDL    文件:CellTracker.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    handle();
}
项目:AIMSICDL    文件:MapFragment.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    loadEntries();
}
项目:AIMSICDL    文件:MapViewerOsmDroid.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    loadEntries();
}
项目:MKAPP    文件:ActivitySettings.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    updateTechnicalInfo();
}
项目:CineReminDay    文件:CRDAlarmReceiver.java   
public static void sendSms(final Context context) {
    Log.v(CRDAlarmReceiver.class.getName(), "sendSms() => Sending SMS...");

    CRDSharedPreferences.getInstance(context).setSendingSmsEpoch();

    final TelephonyManager telephonyManager = (TelephonyManager) context.getApplicationContext().getSystemService(TELEPHONY_SERVICE);
    final PhoneStateListener phoneStateListener = new PhoneStateListener() {
        // Fired when the service state changes or immediately after registration via .listen()
        @Override
        public void onServiceStateChanged(ServiceState serviceState) {
            super.onServiceStateChanged(serviceState);

            String serviceStateDebug;

            switch (serviceState.getState()) {
                case ServiceState.STATE_IN_SERVICE:
                    serviceStateDebug = "STATE_IN_SERVICE";
                    break;
                case ServiceState.STATE_OUT_OF_SERVICE:
                    serviceStateDebug = "OUT_OF_SERVICE";
                    break;
                case ServiceState.STATE_EMERGENCY_ONLY:
                    serviceStateDebug = "EMERGENCY_ONLY";
                    break;
                case ServiceState.STATE_POWER_OFF:
                    serviceStateDebug = "POWER_OFF";
                    break;
                default:
                    serviceStateDebug = "OTHER";
                    break;
            }

            Log.v(CRDAlarmReceiver.class.getName(), "onServiceStateChanged() => " + "serviceState = [" + serviceStateDebug + "]");

            if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
                CRDUtils.sendSmsToOrange(context);

                telephonyManager.listen(this, PhoneStateListener.LISTEN_NONE);
            }
        }
    };

    // We can't simply have the current state of the network. We have to register to its changes, then it will fire
    // immediately after the registration an event with the initial state. Super retarded imo.
    telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
}
项目:Cable-Android    文件:TelephonyServiceState.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
  this.connected = (serviceState.getState() == ServiceState.STATE_IN_SERVICE);
  looper.quit();
}
项目:Cable-Android    文件:ServiceRequirementProvider.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
  if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
    handleInService();
  }
}
项目:XPrivacy    文件:XTelephonyManager.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    mListener.onServiceStateChanged(serviceState);
}
项目:smarper    文件:XTelephonyManager.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    mListener.onServiceStateChanged(serviceState);
}
项目:NoRootFirewall-Custom    文件:ActivitySettings.java   
@Override
public void onServiceStateChanged(ServiceState serviceState) {
    updateTechnicalInfo();
}