Code example for PowerManager.WakeLock

Methods: isHeld, release

0
    } 
 
    @Override 
    public void onDestroy() { 
        mTeleManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
        if (mWakeLock.isHeld()) {
            mWakeLock.release();
        } 
        super.onDestroy(); 
    } 
 
    @Override 
    public IBinder onBind(Intent intent) {
        return null; 
    } 
 
    @Override 
    public void onLowMemory() { 
        localStopRecording(); 
        super.onLowMemory(); 
    }