Android Open Source - PTScreenOff Main Receiver






From Project

Back to project page PTScreenOff.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

eu.chainfire.libsuperuser.Application.java
eu.chainfire.libsuperuser.Debug.java
eu.chainfire.libsuperuser.HideOverlaysReceiver.java
eu.chainfire.libsuperuser.ShellNotClosedException.java
eu.chainfire.libsuperuser.ShellOnMainThreadException.java
eu.chainfire.libsuperuser.Shell.java
eu.chainfire.libsuperuser.StreamGobbler.java
org.liberty.android.ptplugin.screenoff.MainActivityTest.java
org.liberty.android.ptplugin.screenoff.MainActivity.java
org.liberty.android.ptplugin.screenoff.MainReceiver.java
org.liberty.android.ptplugin.screenoff.PowerTogglesPlugin.java
org.liberty.android.ptplugin.screenoff.ScreenOffUtil.java