package test.pkg;

import android.app.Activity;
import android.os.Bundle;
import android.os.PowerManager;

public class WakelockActivity10 extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        PowerManager manager = (PowerManager) getSystemService(POWER_SERVICE);
        PowerManager.WakeLock wakeLock = manager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Test");

        try {
            wakeLock.acquire();
            throw new Exception();
        } catch (Exception e) {

        } finally {
            wakeLock.release();
        }
    }
}
