Back to project page timestatistic.
The source code is released under:
GNU General Public License
If you think the Android project timestatistic 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 maximsblog.blogspot.com.timestatistic; //w w w .j a va 2 s. co m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.os.PowerManager; import android.preference.PreferenceManager; public class BootUpReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { Thread t = new Thread(new Runnable() { @Override public void run() { PowerManager pm = (PowerManager) context .getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wl = pm.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, "timestatistic"); // Acquire the lock wl.acquire(); app.loadRunningCounterAlarm(context); app.setStatusBar(context); // Release the lock wl.release(); } }); t.start(); } }