Initial commit

This commit is contained in:
2021-02-17 19:44:55 +01:00
parent f379ab01ef
commit e90c4d3e38
8 changed files with 118 additions and 1223 deletions

View File

@@ -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)))