forked from jens/Automation
Initial commit
This commit is contained in:
@@ -316,6 +316,7 @@ public class AutomationService extends Service implements OnInitListener
|
||||
{
|
||||
checkForTtsEngine();
|
||||
checkForPermissions();
|
||||
checkForRestrictedFeatures();
|
||||
|
||||
Actions.context = this;
|
||||
Actions.autoMationServerRef = this;
|
||||
@@ -370,6 +371,24 @@ public class AutomationService extends Service implements OnInitListener
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkForRestrictedFeatures()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class testClass = Class.forName(ActivityManageSpecificRule.activityDetectionClassPath);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Trigger_Enum.activityDetection))
|
||||
{
|
||||
Intent intent = new Intent(AutomationService.this, ActivityMainScreen.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
// Miscellaneous.createDismissableNotification(getResources().getString(R.string.settingsReferringToRestrictedFeatures), ActivityPermissions.notificationIdPermissions, pi);
|
||||
Miscellaneous.createDismissableNotification(getResources().getString(R.string.settingsReferringToRestrictedFeatures), 1, pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void startAutomationService(Context context, boolean startAtBoot)
|
||||
{
|
||||
if(!(isMyServiceRunning(context)))
|
||||
|
Reference in New Issue
Block a user