Back to project page PTScreenOff.
The source code is released under:
GNU General Public License
If you think the Android project PTScreenOff listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.liberty.android.ptplugin.screenoff; // ww w .j av a 2 s.co m import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import eu.chainfire.libsuperuser.Shell; import android.util.Log; import java.util.List; public class MainReceiver extends PowerTogglesPlugin { @Override public void changeState(Context context, boolean newState) { ScreenOffUtil.screenOff(); Log.v("MainReceiver", "PT Screen off is changing state"); sendStateUpdate(this.getClass(), false, context); } }