add WakeLock#isHeld()
This commit is contained in:
parent
162389a7e0
commit
1417410dbb
|
@ -206,7 +206,8 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
if (mWakeLock != null)
|
||||
mWakeLock.release();
|
||||
if (mWakeLock.isHeld())
|
||||
mWakeLock.release();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue