Skip to content

Commit

Permalink
ApplyOnBoot: Initialize Spectrum and Boeffla Wakelock blocker upon boot
Browse files Browse the repository at this point in the history
Signed-off-by: sunilpaulmathew <sunil.kde@gmail.com>
  • Loading branch information
sunilpaulmathew committed Nov 27, 2019
1 parent 563a23c commit 1423e16
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@

import com.grarak.kerneladiutor.R;
import com.grarak.kerneladiutor.utils.NotificationId;
import com.grarak.kerneladiutor.utils.Prefs;
import com.grarak.kerneladiutor.utils.Utils;
import com.grarak.kerneladiutor.utils.root.RootUtils;

import com.smartpack.kernelmanager.utils.Wakelocks;

import org.frap129.spectrum.Spectrum;

/**
* Created by willi on 03.05.16.
Expand Down Expand Up @@ -73,6 +79,18 @@ public void onCreate() {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
/**
* Initialize Spectrum Profiles & Wakelock Blocker
*/
if (RootUtils.rootAccess()) {
if (Spectrum.supported()) {
int Profile = Utils.strToInt(Spectrum.getProfile());
Prefs.saveInt("spectrum_profile", Profile, this);
}
if (Wakelocks.boefflawlsupported()) {
Wakelocks.CopyWakelockBlockerDefault();
}
}
Messenger messenger = null;
if (intent != null) {
Bundle extras = intent.getExtras();
Expand Down

0 comments on commit 1423e16

Please sign in to comment.