Android Ó **********************************************************************

Source: Internet
Author: User

Android Ó **********************************************************************

~Únö° ê ² Ê {µä¡ ¶ JAVA ónä£ ;{}}» ************************************************ Ê ö'úáí£°proxy £ä£ä£;%**£°

¡¡¡¡'Úáí䣻 möö~~~ó máámíámíámámírámámámāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāmāzz ¶ zookeeper has been added to the zookeeper and zookeeper has been released.

'Úáíä£ ;***************************************************

Please refer to the following documents for more information: 'úáí£» ~öè Ë ¿í» § 2» zookeeper» ~~ß ²» äüö±» ö± Ó ó~óó Ó» Ö ö~~~~ó£%%^â â À í~~~~óré Ò Ú úramí» § ¶ Ë ° íä± ± ê Ô ó µ? ×ó Ó have £.

Please refer to the following link for more information:

<Symbol · blank "http://www.bkjia.com/kf/ware/vc/" target = "_ blank" class = "keylink"> vcD4KPHA + kernel/O21M/kernel + yfnD98HLxL + x6rbUz/O6zbT6wO221M/kernel/2qOs1eLR + kernel/kernel /seq21M/release/zoaM8L3A + release + xL + x6rbUz/release + release/PL + bT6se21xMS/seq21M/zoaM8L3A + release/release + L/release/seq21M /zo7u0 + keys/PNqLOj1Nq/keys + x6rbUz/PWrsewu/keys + MS/seq21M/zoaM8L3A + keys + 0tb2jnauy/keys + keys /keys/O + zb/JoaPPwsPmv7S/tMv8tcS087jFyrXP1joKPHA + PHN0cm9uZz6z6c/keys + PC9wPgo8cHJlIGNsYXNzPQ = "brush: java; "> public interface Phone {..... /*** Get the current ServiceState. use *registerForServiceStateChangedTo be informed of * updates. */ServiceState getServiceState ();/*** Get the current CellLocation. */CellLocation getCellLocation ();/*** @ return all available cell information or null if none. */public List GetAllCellInfo ();......}
Ä¿ ± ê ¶ Ï ó óçé» (PhoneBase µä¾ Ì å µ µö ö~~~~ö~ú~ä×óà öööö )):

public class GSMPhone extends PhoneBase {    ......        @Override    public ServiceState    getServiceState() {        if (mSST != null) {            return mSST.mSS;        } else {            // avoid potential NPE in EmergencyCallHelper during Phone switch            return new ServiceState();        }    }    @Override    public CellLocation getCellLocation() {        return mSST.getCellLocation();    }    @Override    public PhoneConstants.State getState() {        return mCT.mState;    }    @Override    public int getPhoneType() {        return PhoneConstants.PHONE_TYPE_GSM;    }    ......}

'Úáí ¶ Ï óçé «(PhoneProxy ):

public class PhoneProxy extends Handler implements Phone {    ......    private Phone mActivePhone;    private CommandsInterface mCommandsInterface;    private IccSmsInterfaceManager mIccSmsInterfaceManager;    private IccPhoneBookInterfaceManagerProxy mIccPhoneBookInterfaceManagerProxy;    private PhoneSubInfoProxy mPhoneSubInfoProxy;    private IccCardProxy mIccCardProxy;    ......    public PhoneProxy(PhoneBase phone) {        ......        mActivePhone = phone; //¾ßÌå¶ÔÏó´«½øÀ´ÁË        ......        mCommandsInterface = ((PhoneBase)mActivePhone).mCi; //ʹÓþßÌå¶ÔÏó(ÕâÀïÊÇGSMPhoneµÄ¶ÔÏó)µÄ¶ÔÏó        .......    }    @Override    public ServiceState getServiceState() {        return mActivePhone.getServiceState(); //µ÷ÓþßÌå¶ÔÏó(ÕâÀïÊÇGSMPhoneµÄ¶ÔÏó)µÄ·½·¨Íê³É¹¦ÄÜ
    }
@Override public CellLocation getCellLocation() { return mActivePhone.getCellLocation(); } /** * @return all available cell information or null if none. */ @Override public List getAllCellInfo() { return mActivePhone.getAllCellInfo(); } /** * {@inheritDoc} */ @Override public void setCellInfoListRate(int rateInMillis) { mActivePhone.setCellInfoListRate(rateInMillis); } .....}


  ÎÒÃÇ¿´¿´¿Í»§¶ËÊÇÔõôʹÓõÄ:
  

public class PhoneFactory {    static private Phone sProxyPhone = null;    ......    public static void makeDefaultPhone(Context context) {    ......                int phoneType = TelephonyManager.getPhoneType(networkMode);                if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {                    Log.i(LOG_TAG, "Creating GSMPhone");                    sProxyPhone = new PhoneProxy(new GSMPhone(context,                            sCommandsInterface, sPhoneNotifier));//ÎÒÒªÖÆÔìGSMÊÖ»ú                } else if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {                    switch (TelephonyManager.getLteOnCdmaModeStatic()) {                        case PhoneConstants.LTE_ON_CDMA_TRUE:                            Log.i(LOG_TAG, "Creating CDMALTEPhone");                            sProxyPhone = new PhoneProxy(new CDMALTEPhone(context,                                sCommandsInterface, sPhoneNotifier));//ÎÒÒªÖÆÔì4G CDMAÊÖ»ú                            break;                        case PhoneConstants.LTE_ON_CDMA_FALSE:                        default:                            Log.i(LOG_TAG, "Creating CDMAPhone");                            sProxyPhone = new PhoneProxy(new CDMAPhone(context,                                    sCommandsInterface, sPhoneNotifier));//ÎÒÒªÖÆÔì3G CDMAÊÖ»ú                            break;                    }                }    ......}    ......}

δÍê´ýÐø£¬Óв»¶ÔµÄµØ·½£¬ÇëÖ¸Õý¡£

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.