Code cleanup, fixing thangs...

This commit is contained in:
d8ahazard
2016-09-25 01:16:08 -05:00
parent c56dd4172e
commit 17749bb14a
8 changed files with 64 additions and 102 deletions

View File

@@ -42,8 +42,13 @@ public class SplashActivity extends AppCompatActivity {
}
// Set up toggle states based on preferences, start services, disable root if set
if (Utils.autoToggleEnabled(getApplicationContext())) {
if (!Utils.hasServicePermission(getApplicationContext())) {
Utils.toggleAutoRoot(false,getApplicationContext());
}
}
if (Utils.autoToggleEnabled(getApplicationContext())) {
if (!Utils.isMyServiceRunning(MonitorService.class, getApplicationContext())) {
Intent myIntent = new Intent(getApplication(), MonitorService.class);
getApplication().startService(myIntent);