在打開手電筒之后 機器休眠 客戶要求點擊電源鍵 手電筒需要關(guān)閉
目前創(chuàng)新互聯(lián)已為超過千家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)頁空間、成都網(wǎng)站托管、企業(yè)網(wǎng)站設(shè)計、古塔網(wǎng)站維護等服務(wù),公司將堅持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。frameworks\base\services\core\java\com\android\server\policy\PhoneWindowManager.java @Override public void screenTurnedOn() { synchronized (mLock) { if (mKeyguardDelegate != null) { mKeyguardDelegate.onScreenTurnedOn(); } //add start if (SystemProperties.getInt("persist.sys.screen_first_on", 1) == 0) { android.util.Log.d("chch", "turnOffFlashLightIfNeed"); turnOffFlashLightIfNeed(); }else{ SystemProperties.set("persist.sys.screen_first_on", "0"); } //end } } //chch add start private void turnOffFlashLightIfNeed(){ try{ mCameraManager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE); mCameraId = mCameraManager.getCameraIdList()[0]; mCameraManager.setTorchMode(mCameraId,false); }catch(Exception e){ android.util.Log.d("chch", "camera error"); } } //chch end