亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

java - 關(guān)于android的UiAutomation求幫忙看下代碼
天蓬老師
天蓬老師 2017-04-17 17:43:25
0
0
201

在初始化UiAutomation的時候返回了一個null值 看API是通過Instrumentation.getUiAutomation()來獲取UiAutomation的實例的啊

 public UiAutomation getUiAutomation() {
        if (mUiAutomationConnection != null) {
            if (mUiAutomation == null) {
                mUiAutomation = new UiAutomation(getTargetContext().getMainLooper(),
                        mUiAutomationConnection);
                mUiAutomation.connect();
            }
            return mUiAutomation;
        }
        return null;
    }

這是API中的其中 一段返回null應(yīng)該是mUiAutomationConnection==null

mUiAutomationConnection是在

/*package*/ final void init(ActivityThread thread,
            Context instrContext, Context appContext, ComponentName component, 
            IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection) {
        mThread = thread;
        mMessageQueue = mThread.getLooper().myQueue();
        mInstrContext = instrContext;
        mAppContext = appContext;
        mComponent = component;
        mWatcher = watcher;
        mUiAutomationConnection = uiAutomationConnection;
    }

里面被賦值的到這里就不太明白了 這是怎么回事啊 有沒有大神給解釋下啊

天蓬老師
天蓬老師

歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template