Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0853082b7 | ||
|
|
4673bc2289 | ||
|
|
3f28e7b2bc | ||
|
|
64936ce75a | ||
|
|
56a766d03c | ||
|
|
5b86d57857 |
+5
-5
@@ -3,16 +3,16 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 36
|
compileSdkVersion 37
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.jens.automation2"
|
applicationId "com.jens.automation2"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
compileSdkVersion 36
|
compileSdkVersion 37
|
||||||
buildToolsVersion '36.0.0'
|
buildToolsVersion '36.0.0'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
versionCode 149
|
versionCode 150
|
||||||
versionName "1.8.8"
|
versionName "1.8.9"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ android {
|
|||||||
{
|
{
|
||||||
dimension "version"
|
dimension "version"
|
||||||
versionNameSuffix "-googlePlay"
|
versionNameSuffix "-googlePlay"
|
||||||
targetSdkVersion 36
|
targetSdkVersion 37
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+5
-1
@@ -403,7 +403,11 @@ public class ActivityDetectionReceiver extends IntentService implements Automati
|
|||||||
private PendingIntent getActivityDetectionPendingIntent()
|
private PendingIntent getActivityDetectionPendingIntent()
|
||||||
{
|
{
|
||||||
Intent intent = new Intent(AutomationService.getInstance(), ActivityDetectionReceiver.class);
|
Intent intent = new Intent(AutomationService.getInstance(), ActivityDetectionReceiver.class);
|
||||||
PendingIntent returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent returnValue;
|
||||||
|
if(Miscellaneous.getTargetSDK(AutomationService.getInstance()) >= 31)
|
||||||
|
returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
else
|
||||||
|
returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -799,4 +799,16 @@ public class Action
|
|||||||
myAction.useDownloadedWebpage(result);
|
myAction.useDownloadedWebpage(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Action getClone()
|
||||||
|
{
|
||||||
|
Action clone = new Action();
|
||||||
|
|
||||||
|
clone.setAction(this.getAction());
|
||||||
|
clone.setParentRule(this.getParentRule());
|
||||||
|
clone.setParameter1(this.getParameter1());
|
||||||
|
clone.setParameter2(this.getParameter2());
|
||||||
|
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ public class ActivityManageActionSetSystemSetting extends Activity
|
|||||||
selectedDataType.equalsIgnoreCase("Long")
|
selectedDataType.equalsIgnoreCase("Long")
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!Miscellaneous.isNumeric(etSettingValue.getText().toString()) || Miscellaneous.isNonDecimalNumber(etSettingValue.getText().toString()))
|
if(!Miscellaneous.isNumeric(etSettingValue.getText().toString()) || !Miscellaneous.isNumericNonDecimal(etSettingValue.getText().toString()))
|
||||||
{
|
{
|
||||||
Toast.makeText(ActivityManageActionSetSystemSetting.this, getResources().getString(R.string.enter_a_number), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageActionSetSystemSetting.this, getResources().getString(R.string.enter_a_number), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -670,6 +670,8 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.subsystemstate));
|
items.add(new Item(typesLong[i].toString(), R.drawable.subsystemstate));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.checkVariable.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.checkVariable.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.variable));
|
items.add(new Item(typesLong[i].toString(), R.drawable.variable));
|
||||||
|
else if(types[i].toString().equals(Trigger_Enum.proximity.toString()))
|
||||||
|
items.add(new Item(typesLong[i].toString(), R.drawable.proximity));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.calendarEvent.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.calendarEvent.toString()))
|
||||||
{
|
{
|
||||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.READ_CALENDAR))
|
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.READ_CALENDAR))
|
||||||
@@ -753,7 +755,17 @@ public class ActivityManageRule extends Activity
|
|||||||
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||||
else if(triggerType == Trigger_Enum.usb_host_connection)
|
else if(triggerType == Trigger_Enum.usb_host_connection)
|
||||||
booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
|
booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
|
||||||
else if(triggerType == Trigger_Enum.speed || triggerType == Trigger_Enum.noiseLevel || triggerType == Trigger_Enum.batteryLevel)
|
else if(triggerType == Trigger_Enum.speed)
|
||||||
|
{
|
||||||
|
if(Miscellaneous.googleToBlameForLocation(false))
|
||||||
|
{
|
||||||
|
ActivityMainScreen.openGoogleBlamingWindow();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
booleanChoices = new String[]{getResources().getString(R.string.exceeds), getResources().getString(R.string.dropsBelow)};
|
||||||
|
}
|
||||||
|
else if(triggerType == Trigger_Enum.noiseLevel || triggerType == Trigger_Enum.batteryLevel)
|
||||||
booleanChoices = new String[]{getResources().getString(R.string.exceeds), getResources().getString(R.string.dropsBelow)};
|
booleanChoices = new String[]{getResources().getString(R.string.exceeds), getResources().getString(R.string.dropsBelow)};
|
||||||
else if(triggerType == Trigger_Enum.wifiConnection)
|
else if(triggerType == Trigger_Enum.wifiConnection)
|
||||||
{
|
{
|
||||||
@@ -2613,17 +2625,24 @@ public class ActivityManageRule extends Activity
|
|||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
private AlertDialog getTriggerDeleteDialog(Context myContext, final Trigger triggerToBeDeleted)
|
private AlertDialog getTriggerDeleteDialog(Context myContext, final Trigger selectedTrigger)
|
||||||
{
|
{
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||||
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithTrigger));
|
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithTrigger));
|
||||||
alertDialogBuilder.setItems(new String[]{getResources().getString(R.string.delete)}, new DialogInterface.OnClickListener()
|
alertDialogBuilder.setItems(new String[]{getResources().getString(R.string.delete), getResources().getString(R.string.clone)}, new DialogInterface.OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which)
|
public void onClick(DialogInterface dialog, int which)
|
||||||
{
|
{
|
||||||
// Only 1 choice at the moment, no need to check
|
switch(which)
|
||||||
ruleToEdit.getTriggerSet().remove(triggerToBeDeleted);
|
{
|
||||||
|
case 0:
|
||||||
|
ruleToEdit.getTriggerSet().remove(selectedTrigger);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ruleToEdit.getTriggerSet().add(selectedTrigger.getClone());
|
||||||
|
break;
|
||||||
|
}
|
||||||
refreshTriggerList();
|
refreshTriggerList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -2635,7 +2654,7 @@ public class ActivityManageRule extends Activity
|
|||||||
{
|
{
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||||
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithAction));
|
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithAction));
|
||||||
alertDialogBuilder.setItems(new String[] { getResources().getString(R.string.delete), getResources().getString(R.string.moveUp), getResources().getString(R.string.moveDown)}, new DialogInterface.OnClickListener()
|
alertDialogBuilder.setItems(new String[] { getResources().getString(R.string.delete), getResources().getString(R.string.moveUp), getResources().getString(R.string.moveDown), getResources().getString(R.string.clone)}, new DialogInterface.OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which)
|
public void onClick(DialogInterface dialog, int which)
|
||||||
@@ -2680,6 +2699,11 @@ public class ActivityManageRule extends Activity
|
|||||||
Toast.makeText(ActivityManageRule.this, getResources().getString(R.string.cantMoveDown), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageRule.this, getResources().getString(R.string.cantMoveDown), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
// create clone
|
||||||
|
ruleToEdit.getActionSet().add(actionToBeDeleted.getClone());
|
||||||
|
refreshActionList();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -171,10 +171,10 @@ public class Miscellaneous extends Service
|
|||||||
URL urlObject = new URL(url);
|
URL urlObject = new URL(url);
|
||||||
HttpURLConnection connection;
|
HttpURLConnection connection;
|
||||||
|
|
||||||
if(url.toLowerCase().contains("https"))
|
if (url.toLowerCase().contains("https"))
|
||||||
{
|
{
|
||||||
connection = (HttpsURLConnection) urlObject.openConnection();
|
connection = (HttpsURLConnection) urlObject.openConnection();
|
||||||
if(Settings.httpAcceptAllCertificates)
|
if (Settings.httpAcceptAllCertificates)
|
||||||
{
|
{
|
||||||
SSLContext sslContext = SSLContext.getInstance("TLS"); // Use "TLS" (not "SSL" which is outdated)
|
SSLContext sslContext = SSLContext.getInstance("TLS"); // Use "TLS" (not "SSL" which is outdated)
|
||||||
sslContext.init(
|
sslContext.init(
|
||||||
@@ -182,8 +182,8 @@ public class Miscellaneous extends Service
|
|||||||
new TrustManager[]{new TrustAllCertificates()}, // Use our trust manager
|
new TrustManager[]{new TrustAllCertificates()}, // Use our trust manager
|
||||||
new SecureRandom() // Secure random number generator
|
new SecureRandom() // Secure random number generator
|
||||||
);
|
);
|
||||||
((HttpsURLConnection)connection).setSSLSocketFactory(sslContext.getSocketFactory());
|
((HttpsURLConnection) connection).setSSLSocketFactory(sslContext.getSocketFactory());
|
||||||
((HttpsURLConnection)connection).setHostnameVerifier((hostname, session) -> true); // Trust all hostnames
|
((HttpsURLConnection) connection).setHostnameVerifier((hostname, session) -> true); // Trust all hostnames
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,17 +191,17 @@ public class Miscellaneous extends Service
|
|||||||
connection = (HttpURLConnection) urlObject.openConnection();
|
connection = (HttpURLConnection) urlObject.openConnection();
|
||||||
|
|
||||||
// Add http simple authentication if specified
|
// Add http simple authentication if specified
|
||||||
if(username != null && password != null)
|
if (username != null && password != null)
|
||||||
{
|
{
|
||||||
String encodedCredentials = Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.DEFAULT);
|
String encodedCredentials = Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.DEFAULT);
|
||||||
connection.setRequestMethod("POST");
|
connection.setRequestMethod("POST");
|
||||||
connection.setDoOutput(true);
|
connection.setDoOutput(true);
|
||||||
connection.setRequestProperty ("Authorization", "Basic " + encodedCredentials);
|
connection.setRequestProperty("Authorization", "Basic " + encodedCredentials);
|
||||||
}
|
}
|
||||||
else if(method.equals(ActivityManageActionTriggerUrl.methodPost))
|
else if (method.equals(ActivityManageActionTriggerUrl.methodPost))
|
||||||
connection.setRequestMethod("POST");
|
connection.setRequestMethod("POST");
|
||||||
|
|
||||||
if(httpParams.size() > 0)
|
if (httpParams != null && httpParams.size() > 0)
|
||||||
{
|
{
|
||||||
connection.setRequestMethod("POST");
|
connection.setRequestMethod("POST");
|
||||||
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||||
@@ -210,7 +210,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
List<NameValuePair> paramPairs = new ArrayList<NameValuePair>();
|
List<NameValuePair> paramPairs = new ArrayList<NameValuePair>();
|
||||||
|
|
||||||
for(String key : httpParams.keySet())
|
for (String key : httpParams.keySet())
|
||||||
paramPairs.add(new BasicNameValuePair(key, httpParams.get(key)));
|
paramPairs.add(new BasicNameValuePair(key, httpParams.get(key)));
|
||||||
|
|
||||||
OutputStream os = connection.getOutputStream();
|
OutputStream os = connection.getOutputStream();
|
||||||
@@ -220,13 +220,13 @@ public class Miscellaneous extends Service
|
|||||||
writer.close();
|
writer.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream content = (InputStream)connection.getInputStream();
|
InputStream content = (InputStream) connection.getInputStream();
|
||||||
BufferedReader in = new BufferedReader (new InputStreamReader (content));
|
BufferedReader in = new BufferedReader(new InputStreamReader(content));
|
||||||
String line;
|
String line;
|
||||||
while ((line = in.readLine()) != null)
|
while ((line = in.readLine()) != null)
|
||||||
responseBody.append(line + Miscellaneous.lineSeparator);
|
responseBody.append(line + Miscellaneous.lineSeparator);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
|
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
|
||||||
errorFound = true;
|
errorFound = true;
|
||||||
@@ -238,7 +238,7 @@ public class Miscellaneous extends Service
|
|||||||
// shut down the connection manager to ensure
|
// shut down the connection manager to ensure
|
||||||
// immediate deallocation of all system resources
|
// immediate deallocation of all system resources
|
||||||
httpclient.getConnectionManager().shutdown();
|
httpclient.getConnectionManager().shutdown();
|
||||||
if(errorFound)
|
if (errorFound)
|
||||||
return http_error_string;
|
return http_error_string;
|
||||||
else
|
else
|
||||||
return responseBody.toString();
|
return responseBody.toString();
|
||||||
@@ -307,7 +307,7 @@ public class Miscellaneous extends Service
|
|||||||
httpclient = Actions.getInsecureSslClient(httpclient);
|
httpclient = Actions.getInsecureSslClient(httpclient);
|
||||||
|
|
||||||
HttpRequestBase httpRequest;
|
HttpRequestBase httpRequest;
|
||||||
if(
|
if (
|
||||||
method.equals(ActivityManageActionTriggerUrl.methodPost)
|
method.equals(ActivityManageActionTriggerUrl.methodPost)
|
||||||
||
|
||
|
||||||
(username != null && password != null)
|
(username != null && password != null)
|
||||||
@@ -319,20 +319,20 @@ public class Miscellaneous extends Service
|
|||||||
httpRequest = new HttpGet(url);
|
httpRequest = new HttpGet(url);
|
||||||
|
|
||||||
// Add http simple authentication if specified
|
// Add http simple authentication if specified
|
||||||
if(username != null && password != null)
|
if (username != null && password != null)
|
||||||
{
|
{
|
||||||
String encodedCredentials = Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.DEFAULT);
|
String encodedCredentials = Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.DEFAULT);
|
||||||
httpRequest.addHeader("Authorization", "Basic " + encodedCredentials);
|
httpRequest.addHeader("Authorization", "Basic " + encodedCredentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(httpParams.size() > 0)
|
if (httpParams.size() > 0)
|
||||||
{
|
{
|
||||||
List<NameValuePair> paramPairs = new ArrayList<NameValuePair>();
|
List<NameValuePair> paramPairs = new ArrayList<NameValuePair>();
|
||||||
|
|
||||||
for(String key : httpParams.keySet())
|
for (String key : httpParams.keySet())
|
||||||
paramPairs.add(new BasicNameValuePair(key, httpParams.get(key)));
|
paramPairs.add(new BasicNameValuePair(key, httpParams.get(key)));
|
||||||
|
|
||||||
((HttpPost)httpRequest).setEntity(new UrlEncodedFormEntity(paramPairs, "UTF-8"));
|
((HttpPost) httpRequest).setEntity(new UrlEncodedFormEntity(paramPairs, "UTF-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpResponse response = httpclient.execute(httpRequest);
|
HttpResponse response = httpclient.execute(httpRequest);
|
||||||
@@ -343,7 +343,7 @@ public class Miscellaneous extends Service
|
|||||||
return EntityUtils.toString(entity);
|
return EntityUtils.toString(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
|
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
|
||||||
return http_error_string;
|
return http_error_string;
|
||||||
@@ -362,7 +362,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static int boolToInt(boolean input)
|
public static int boolToInt(boolean input)
|
||||||
{
|
{
|
||||||
if(input)
|
if (input)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
@@ -380,12 +380,12 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
header = getAnyContext().getResources().getString(R.string.app_name);
|
header = getAnyContext().getResources().getString(R.string.app_name);
|
||||||
}
|
}
|
||||||
catch(NullPointerException e)
|
catch (NullPointerException e)
|
||||||
{
|
{
|
||||||
header = "Automation";
|
header = "Automation";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Settings.logToConsole)
|
if (Settings.logToConsole)
|
||||||
{
|
{
|
||||||
if (type.equals("e"))
|
if (type.equals("e"))
|
||||||
Log.e(header, description);
|
Log.e(header, description);
|
||||||
@@ -397,7 +397,7 @@ public class Miscellaneous extends Service
|
|||||||
Log.i(header, description);
|
Log.i(header, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Settings.writeLogFile && Settings.logLevel >= logLevel)
|
if (Settings.writeLogFile && Settings.logLevel >= logLevel)
|
||||||
{
|
{
|
||||||
writeToLogFile(type, header, description);
|
writeToLogFile(type, header, description);
|
||||||
|
|
||||||
@@ -409,13 +409,14 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean logCleanerRunning = false;
|
protected static boolean logCleanerRunning = false;
|
||||||
|
|
||||||
protected static void rotateLogFile(File logFile)
|
protected static void rotateLogFile(File logFile)
|
||||||
{
|
{
|
||||||
logCleanerRunning = true;
|
logCleanerRunning = true;
|
||||||
|
|
||||||
long maxSizeInBytes = (long)Settings.logFileMaxSize * 1024 * 1024;
|
long maxSizeInBytes = (long) Settings.logFileMaxSize * 1024 * 1024;
|
||||||
|
|
||||||
if(logFile.exists() && logFile.length() > (maxSizeInBytes))
|
if (logFile.exists() && logFile.length() > (maxSizeInBytes))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "Logfile", "Cleaning up log file.", 3);
|
Miscellaneous.logEvent("i", "Logfile", "Cleaning up log file.", 3);
|
||||||
File archivedLogFile = new File(getWriteableFolder() + "/" + logFileName + "-old");
|
File archivedLogFile = new File(getWriteableFolder() + "/" + logFileName + "-old");
|
||||||
@@ -433,15 +434,15 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(folder.exists() || folder.mkdirs())
|
if (folder.exists() || folder.mkdirs())
|
||||||
{
|
{
|
||||||
XmlFileInterface.migrateFilesFromRootToFolder(folderPath, folder.getAbsolutePath());
|
XmlFileInterface.migrateFilesFromRootToFolder(folderPath, folder.getAbsolutePath());
|
||||||
|
|
||||||
File testFile = new File(folder + "/" + testFileName);
|
File testFile = new File(folder + "/" + testFileName);
|
||||||
if(!testFile.exists())
|
if (!testFile.exists())
|
||||||
testFile.createNewFile();
|
testFile.createNewFile();
|
||||||
|
|
||||||
if(testFile.canRead() && testFile.canWrite())
|
if (testFile.canRead() && testFile.canWrite())
|
||||||
{
|
{
|
||||||
testFile.delete();
|
testFile.delete();
|
||||||
writeableFolderStringCache = testFile.getParent();
|
writeableFolderStringCache = testFile.getParent();
|
||||||
@@ -461,7 +462,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static String getWriteableFolder()
|
public static String getWriteableFolder()
|
||||||
{
|
{
|
||||||
if(writeableFolderStringCache == null)
|
if (writeableFolderStringCache == null)
|
||||||
{
|
{
|
||||||
// Use the app-specific folder as new default.
|
// Use the app-specific folder as new default.
|
||||||
writeableFolderStringCache = Miscellaneous.getAnyContext().getFilesDir().getAbsolutePath();
|
writeableFolderStringCache = Miscellaneous.getAnyContext().getFilesDir().getAbsolutePath();
|
||||||
@@ -512,7 +513,7 @@ public class Miscellaneous extends Service
|
|||||||
mount points. That's why we have to copy it and delete the src if successful.
|
mount points. That's why we have to copy it and delete the src if successful.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(copyFileUsingStream(fileToBeMoved, dstFile))
|
if (copyFileUsingStream(fileToBeMoved, dstFile))
|
||||||
fileToBeMoved.delete();
|
fileToBeMoved.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,7 +523,8 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} catch (Exception e)
|
}
|
||||||
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.w("getWritableFolder", folder + " not writable.");
|
Log.w("getWritableFolder", folder + " not writable.");
|
||||||
}
|
}
|
||||||
@@ -534,18 +536,19 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected final static String logFileName = "Automation_logfile.txt";
|
protected final static String logFileName = "Automation_logfile.txt";
|
||||||
|
|
||||||
protected static File getLogFile()
|
protected static File getLogFile()
|
||||||
{
|
{
|
||||||
File logFile = null;
|
File logFile = null;
|
||||||
logFile = new File(getWriteableFolder() + "/" + logFileName);
|
logFile = new File(getWriteableFolder() + "/" + logFileName);
|
||||||
if(!logFile.exists())
|
if (!logFile.exists())
|
||||||
{
|
{
|
||||||
Log.i("LogFile", "Creating new logfile: " + logFile.getAbsolutePath());
|
Log.i("LogFile", "Creating new logfile: " + logFile.getAbsolutePath());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
logFile.createNewFile();
|
logFile.createNewFile();
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.e("LogFile", "Error writing logs to file: " + e.getMessage());
|
Log.e("LogFile", "Error writing logs to file: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -553,6 +556,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
return logFile;
|
return logFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void writeToLogFile(String type, String header, String description)
|
private static void writeToLogFile(String type, String header, String description)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -566,7 +570,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
// Log.i("LogFile", "Log entry written.");
|
// Log.i("LogFile", "Log entry written.");
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Log.e("LogFile", "Error writing logs to file: " + e.getMessage());
|
Log.e("LogFile", "Error writing logs to file: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -591,17 +595,17 @@ public class Miscellaneous extends Service
|
|||||||
public static boolean compare(String direction, String needle, String haystack)
|
public static boolean compare(String direction, String needle, String haystack)
|
||||||
{
|
{
|
||||||
// If only one of needle or haystack is null
|
// If only one of needle or haystack is null
|
||||||
if(
|
if (
|
||||||
(needle == null && haystack != null)
|
(needle == null && haystack != null)
|
||||||
||
|
||
|
||||||
(needle != null && haystack == null)
|
(needle != null && haystack == null)
|
||||||
)
|
)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch(direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case Trigger.directionEquals:
|
case Trigger.directionEquals:
|
||||||
if(Miscellaneous.isRegularExpression(needle))
|
if (Miscellaneous.isRegularExpression(needle))
|
||||||
return haystack.matches(needle);
|
return haystack.matches(needle);
|
||||||
else
|
else
|
||||||
return haystack.equalsIgnoreCase(needle);
|
return haystack.equalsIgnoreCase(needle);
|
||||||
@@ -624,33 +628,33 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "To compare: " + time1.toString() + " / " + time2.toString());
|
// Miscellaneous.logEvent("i", "TimeCompare", "To compare: " + time1.toString() + " / " + time2.toString());
|
||||||
|
|
||||||
if(time1.getHours() == time2.getHours() && time1.getMinutes() == time2.getMinutes())
|
if (time1.getHours() == time2.getHours() && time1.getMinutes() == time2.getMinutes())
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Times are equal.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Times are equal.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(time1.getHours() > time2.getHours())
|
if (time1.getHours() > time2.getHours())
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time1 is bigger/later by hours.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Time1 is bigger/later by hours.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(time1.getHours() < time2.getHours())
|
if (time1.getHours() < time2.getHours())
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time2 is bigger/later by hours.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Time2 is bigger/later by hours.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(time1.getHours() == time2.getHours())
|
if (time1.getHours() == time2.getHours())
|
||||||
{
|
{
|
||||||
if(time1.getMinutes() < time2.getMinutes())
|
if (time1.getMinutes() < time2.getMinutes())
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time2 is bigger/later by minutes.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time2 is bigger/later by minutes.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(time1.getMinutes() > time2.getMinutes())
|
if (time1.getMinutes() > time2.getMinutes())
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time1 is bigger/later by minutes.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time1 is bigger/later by minutes.");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -664,33 +668,33 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static int compareTimes(Calendar calOne, Calendar calTwo)
|
public static int compareTimes(Calendar calOne, Calendar calTwo)
|
||||||
{
|
{
|
||||||
if(calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY) && calOne.get(Calendar.MINUTE) == calTwo.get((Calendar.MINUTE)))
|
if (calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY) && calOne.get(Calendar.MINUTE) == calTwo.get((Calendar.MINUTE)))
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Times are equal.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Times are equal.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calOne.get(Calendar.HOUR_OF_DAY) > calTwo.get(Calendar.HOUR_OF_DAY))
|
if (calOne.get(Calendar.HOUR_OF_DAY) > calTwo.get(Calendar.HOUR_OF_DAY))
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time1 is bigger/later by hours.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Time1 is bigger/later by hours.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calOne.get(Calendar.HOUR_OF_DAY) < calTwo.get(Calendar.HOUR_OF_DAY))
|
if (calOne.get(Calendar.HOUR_OF_DAY) < calTwo.get(Calendar.HOUR_OF_DAY))
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time2 is bigger/later by hours.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Time2 is bigger/later by hours.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY))
|
if (calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY))
|
||||||
{
|
{
|
||||||
if(calOne.get(Calendar.MINUTE) < calTwo.get(Calendar.MINUTE))
|
if (calOne.get(Calendar.MINUTE) < calTwo.get(Calendar.MINUTE))
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time2 is bigger/later by minutes.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time2 is bigger/later by minutes.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calOne.get(Calendar.MINUTE) > calTwo.get(Calendar.MINUTE))
|
if (calOne.get(Calendar.MINUTE) > calTwo.get(Calendar.MINUTE))
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time1 is bigger/later by minutes.");
|
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time1 is bigger/later by minutes.");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -712,18 +716,18 @@ public class Miscellaneous extends Service
|
|||||||
Context returnContext;
|
Context returnContext;
|
||||||
|
|
||||||
returnContext = AutomationService.getInstance();
|
returnContext = AutomationService.getInstance();
|
||||||
if(returnContext != null)
|
if (returnContext != null)
|
||||||
return returnContext;
|
return returnContext;
|
||||||
|
|
||||||
returnContext = ActivityMainScreen.getActivityMainScreenInstance();
|
returnContext = ActivityMainScreen.getActivityMainScreenInstance();
|
||||||
if(returnContext != null)
|
if (returnContext != null)
|
||||||
return returnContext;
|
return returnContext;
|
||||||
|
|
||||||
returnContext = ActivityPermissions.getInstance().getApplicationContext();
|
returnContext = ActivityPermissions.getInstance().getApplicationContext();
|
||||||
if(returnContext != null)
|
if (returnContext != null)
|
||||||
return returnContext;
|
return returnContext;
|
||||||
|
|
||||||
if(startupContext != null)
|
if (startupContext != null)
|
||||||
return startupContext;
|
return startupContext;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -732,7 +736,7 @@ public class Miscellaneous extends Service
|
|||||||
public static boolean isDarkModeEnabled(Context context)
|
public static boolean isDarkModeEnabled(Context context)
|
||||||
{
|
{
|
||||||
int mode = context.getResources().getConfiguration().uiMode;
|
int mode = context.getResources().getConfiguration().uiMode;
|
||||||
switch(mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case 33:
|
case 33:
|
||||||
case Configuration.UI_MODE_NIGHT_YES:
|
case Configuration.UI_MODE_NIGHT_YES:
|
||||||
@@ -750,12 +754,12 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
// Replace variable with actual content
|
// Replace variable with actual content
|
||||||
// Miscellaneous.logEvent("i", "Raw source", source);
|
// Miscellaneous.logEvent("i", "Raw source", source);
|
||||||
if(source.contains("[uniqueid]"))
|
if (source.contains("[uniqueid]"))
|
||||||
source = source.replace("[uniqueid]", Secure.getString(context.getContentResolver(), Secure.ANDROID_ID));
|
source = source.replace("[uniqueid]", Secure.getString(context.getContentResolver(), Secure.ANDROID_ID));
|
||||||
|
|
||||||
if(source.contains("[latitude]") | source.contains("[longitude]"))
|
if (source.contains("[latitude]") | source.contains("[longitude]"))
|
||||||
{
|
{
|
||||||
if(LocationProvider.getLastKnownLocation() != null)
|
if (LocationProvider.getLastKnownLocation() != null)
|
||||||
{
|
{
|
||||||
source = source.replace("[latitude]", String.valueOf(LocationProvider.getLastKnownLocation().getLatitude()));
|
source = source.replace("[latitude]", String.valueOf(LocationProvider.getLastKnownLocation().getLatitude()));
|
||||||
source = source.replace("[longitude]", String.valueOf(LocationProvider.getLastKnownLocation().getLongitude()));
|
source = source.replace("[longitude]", String.valueOf(LocationProvider.getLastKnownLocation().getLongitude()));
|
||||||
@@ -766,17 +770,17 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[phonenr]"))
|
if (source.contains("[phonenr]"))
|
||||||
{
|
{
|
||||||
String lastPhoneNr = PhoneStatusListener.getLastPhoneNumber();
|
String lastPhoneNr = PhoneStatusListener.getLastPhoneNumber();
|
||||||
|
|
||||||
if(lastPhoneNr != null && lastPhoneNr.length() > 0)
|
if (lastPhoneNr != null && lastPhoneNr.length() > 0)
|
||||||
source = source.replace("[phonenr]", PhoneStatusListener.getLastPhoneNumber());
|
source = source.replace("[phonenr]", PhoneStatusListener.getLastPhoneNumber());
|
||||||
else
|
else
|
||||||
Miscellaneous.logEvent("w", "TriggerURL", context.getResources().getString(R.string.triggerUrlReplacementPositionError), 3);
|
Miscellaneous.logEvent("w", "TriggerURL", context.getResources().getString(R.string.triggerUrlReplacementPositionError), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[serialnr]"))
|
if (source.contains("[serialnr]"))
|
||||||
{
|
{
|
||||||
if (Build.VERSION.SDK_INT > 8)
|
if (Build.VERSION.SDK_INT > 8)
|
||||||
source = source.replace("[serialnr]", Secure.getString(context.getContentResolver(), Build.SERIAL));
|
source = source.replace("[serialnr]", Secure.getString(context.getContentResolver(), Build.SERIAL));
|
||||||
@@ -784,7 +788,7 @@ public class Miscellaneous extends Service
|
|||||||
source = source.replace("[serialnr]", "serialUnknown");
|
source = source.replace("[serialnr]", "serialUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(
|
if (
|
||||||
source.contains("[d]") ||
|
source.contains("[d]") ||
|
||||||
source.contains("[m]") ||
|
source.contains("[m]") ||
|
||||||
source.contains("[Y]") ||
|
source.contains("[Y]") ||
|
||||||
@@ -799,71 +803,71 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
|
|
||||||
if(source.contains("[d]"))
|
if (source.contains("[d]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
String result = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[d]", result);
|
source = source.replace("[d]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[m]"))
|
if (source.contains("[m]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.MONTH) +1);
|
String result = String.valueOf(cal.get(Calendar.MONTH) + 1);
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[m]", result);
|
source = source.replace("[m]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[Y]"))
|
if (source.contains("[Y]"))
|
||||||
{
|
{
|
||||||
source = source.replace("[Y]", String.valueOf(cal.get(Calendar.YEAR)));
|
source = source.replace("[Y]", String.valueOf(cal.get(Calendar.YEAR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[h]"))
|
if (source.contains("[h]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.HOUR));
|
String result = String.valueOf(cal.get(Calendar.HOUR));
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[h]", result);
|
source = source.replace("[h]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[H]"))
|
if (source.contains("[H]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.HOUR_OF_DAY));
|
String result = String.valueOf(cal.get(Calendar.HOUR_OF_DAY));
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[H]", result);
|
source = source.replace("[H]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[i]"))
|
if (source.contains("[i]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.MINUTE));
|
String result = String.valueOf(cal.get(Calendar.MINUTE));
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[i]", result);
|
source = source.replace("[i]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[s]"))
|
if (source.contains("[s]"))
|
||||||
{
|
{
|
||||||
String result = String.valueOf(cal.get(Calendar.SECOND));
|
String result = String.valueOf(cal.get(Calendar.SECOND));
|
||||||
if(result.length() < 2)
|
if (result.length() < 2)
|
||||||
result = "0" + result;
|
result = "0" + result;
|
||||||
|
|
||||||
source = source.replace("[s]", result);
|
source = source.replace("[s]", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[ms]"))
|
if (source.contains("[ms]"))
|
||||||
{
|
{
|
||||||
source = source.replace("[ms]", String.valueOf(cal.get(Calendar.MILLISECOND)));
|
source = source.replace("[ms]", String.valueOf(cal.get(Calendar.MILLISECOND)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[w]"))
|
if (source.contains("[w]"))
|
||||||
{
|
{
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
|
SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
|
||||||
Date d = new Date();
|
Date d = new Date();
|
||||||
@@ -872,7 +876,7 @@ public class Miscellaneous extends Service
|
|||||||
source = source.replace("[w]", dayOfTheWeek);
|
source = source.replace("[w]", dayOfTheWeek);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[F]"))
|
if (source.contains("[F]"))
|
||||||
{
|
{
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("MMMM");
|
SimpleDateFormat sdf = new SimpleDateFormat("MMMM");
|
||||||
Date d = new Date();
|
Date d = new Date();
|
||||||
@@ -882,9 +886,9 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[notificationTitle]"))
|
if (source.contains("[notificationTitle]"))
|
||||||
{
|
{
|
||||||
if(NotificationListener.getLastNotification() != null)
|
if (NotificationListener.getLastNotification() != null)
|
||||||
{
|
{
|
||||||
String notificationTitle = NotificationListener.getLastNotification().getTitle();
|
String notificationTitle = NotificationListener.getLastNotification().getTitle();
|
||||||
|
|
||||||
@@ -903,9 +907,9 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[notificationText]"))
|
if (source.contains("[notificationText]"))
|
||||||
{
|
{
|
||||||
if(NotificationListener.getLastNotification() != null)
|
if (NotificationListener.getLastNotification() != null)
|
||||||
{
|
{
|
||||||
String notificationText = NotificationListener.getLastNotification().getText();
|
String notificationText = NotificationListener.getLastNotification().getText();
|
||||||
|
|
||||||
@@ -925,7 +929,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[" + last_trigger_url_result_string + "]"))
|
if (source.contains("[" + last_trigger_url_result_string + "]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -937,7 +941,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[last_run_executable_exit_code]"))
|
if (source.contains("[last_run_executable_exit_code]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -949,7 +953,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[last_run_executable_output]"))
|
if (source.contains("[last_run_executable_output]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -961,7 +965,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[last_calendar_title]"))
|
if (source.contains("[last_calendar_title]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -973,7 +977,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[last_calendar_description]"))
|
if (source.contains("[last_calendar_description]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -985,7 +989,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[last_calendar_location]"))
|
if (source.contains("[last_calendar_location]"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -997,7 +1001,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while(source.contains("[variable-"))
|
while (source.contains("[variable-"))
|
||||||
{
|
{
|
||||||
int pos1 = source.indexOf("[variable-");
|
int pos1 = source.indexOf("[variable-");
|
||||||
int pos2 = source.indexOf("]", pos1);
|
int pos2 = source.indexOf("]", pos1);
|
||||||
@@ -1009,12 +1013,12 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
String replacement;
|
String replacement;
|
||||||
|
|
||||||
if(AutomationService.getInstance().variableMap.containsKey(variableName))
|
if (AutomationService.getInstance().variableMap.containsKey(variableName))
|
||||||
replacement = AutomationService.getInstance().variableMap.get(variableName);
|
replacement = AutomationService.getInstance().variableMap.get(variableName);
|
||||||
else
|
else
|
||||||
replacement = "unknownVariable";
|
replacement = "unknownVariable";
|
||||||
|
|
||||||
source = source.substring(0, pos1) + escapeStringForUrl(replacement) + source.substring(pos2 +1);
|
source = source.substring(0, pos1) + escapeStringForUrl(replacement) + source.substring(pos2 + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Miscellaneous.logEvent("i", "URL after replace", source);
|
// Miscellaneous.logEvent("i", "URL after replace", source);
|
||||||
@@ -1061,7 +1065,8 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
NetworkInfo[] netInfo = cm.getAllNetworkInfo();
|
NetworkInfo[] netInfo = cm.getAllNetworkInfo();
|
||||||
for (NetworkInfo ni : netInfo) {
|
for (NetworkInfo ni : netInfo)
|
||||||
|
{
|
||||||
if (ni.getTypeName().equalsIgnoreCase("WIFI"))
|
if (ni.getTypeName().equalsIgnoreCase("WIFI"))
|
||||||
if (ni.isConnected())
|
if (ni.isConnected())
|
||||||
haveConnectedWifi = true;
|
haveConnectedWifi = true;
|
||||||
@@ -1083,7 +1088,7 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
return Shell.SU.available();
|
return Shell.SU.available();
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// get from build info
|
// get from build info
|
||||||
String buildTags = Build.TAGS;
|
String buildTags = Build.TAGS;
|
||||||
@@ -1154,12 +1159,24 @@ public class Miscellaneous extends Service
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNonDecimalNumber(String number)
|
public static boolean isNumericNonDecimal(String number)
|
||||||
{
|
{
|
||||||
if (number == null)
|
if (number == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !number.contains(String.valueOf(getDecimalSeparator()));
|
try
|
||||||
|
{
|
||||||
|
int temp = Integer.parseInt(number);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (number.contains(String.valueOf(getDecimalSeparator())))
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNumeric(String str)
|
public static boolean isNumeric(String str)
|
||||||
@@ -1282,8 +1299,9 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
Thread.sleep(delay);
|
Thread.sleep(delay);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
createDismissibleNotification(title, textToDisplay, notificationId, true, notificationChannelId, pendingIntent);
|
createDismissibleNotification(title, textToDisplay, notificationId, true, notificationChannelId, pendingIntent);
|
||||||
|
|
||||||
@@ -1298,7 +1316,7 @@ public class Miscellaneous extends Service
|
|||||||
private static void setDefaultBehaviour(AsyncTask asyncTask)
|
private static void setDefaultBehaviour(AsyncTask asyncTask)
|
||||||
{
|
{
|
||||||
// without this line debugger will - for some reason - skip all breakpoints in this class
|
// without this line debugger will - for some reason - skip all breakpoints in this class
|
||||||
if(android.os.Debug.isDebuggerConnected())
|
if (android.os.Debug.isDebuggerConnected())
|
||||||
android.os.Debug.waitForDebugger();
|
android.os.Debug.waitForDebugger();
|
||||||
|
|
||||||
// Thread.setDefaultUncaughtExceptionHandler(Miscellaneous.getUncaughtExceptionHandler(activityMainRef, true));
|
// Thread.setDefaultUncaughtExceptionHandler(Miscellaneous.getUncaughtExceptionHandler(activityMainRef, true));
|
||||||
@@ -1308,7 +1326,7 @@ public class Miscellaneous extends Service
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void createDismissibleNotification(String title, String textToDisplay, int notificationId, boolean vibrate, String notificationChannelId, PendingIntent pendingIntent)
|
public static void createDismissibleNotification(String title, String textToDisplay, int notificationId, boolean vibrate, String notificationChannelId, PendingIntent pendingIntent)
|
||||||
{
|
{
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
{
|
{
|
||||||
createDismissibleNotificationSdk26(title, textToDisplay, notificationId, vibrate, notificationChannelId, pendingIntent);
|
createDismissibleNotificationSdk26(title, textToDisplay, notificationId, vibrate, notificationChannelId, pendingIntent);
|
||||||
return;
|
return;
|
||||||
@@ -1318,7 +1336,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
NotificationCompat.Builder dismissibleNotificationBuilder = createDismissibleNotificationBuilder(vibrate, notificationChannelId, pendingIntent);
|
NotificationCompat.Builder dismissibleNotificationBuilder = createDismissibleNotificationBuilder(vibrate, notificationChannelId, pendingIntent);
|
||||||
|
|
||||||
if(title == null)
|
if (title == null)
|
||||||
dismissibleNotificationBuilder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
dismissibleNotificationBuilder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
||||||
else
|
else
|
||||||
dismissibleNotificationBuilder.setContentTitle(title);
|
dismissibleNotificationBuilder.setContentTitle(title);
|
||||||
@@ -1328,7 +1346,7 @@ public class Miscellaneous extends Service
|
|||||||
dismissibleNotificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
dismissibleNotificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||||
dismissibleNotificationBuilder.setAutoCancel(true);
|
dismissibleNotificationBuilder.setAutoCancel(true);
|
||||||
|
|
||||||
if(notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_RULES))
|
if (notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_RULES))
|
||||||
dismissibleNotificationBuilder.setSmallIcon(R.drawable.info);
|
dismissibleNotificationBuilder.setSmallIcon(R.drawable.info);
|
||||||
|
|
||||||
Notification dismissibleNotification = dismissibleNotificationBuilder.build();
|
Notification dismissibleNotification = dismissibleNotificationBuilder.build();
|
||||||
@@ -1339,25 +1357,26 @@ public class Miscellaneous extends Service
|
|||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
static NotificationChannel findExistingChannel(List<NotificationChannel> channels, String channelId)
|
static NotificationChannel findExistingChannel(List<NotificationChannel> channels, String channelId)
|
||||||
{
|
{
|
||||||
for(NotificationChannel c : channels)
|
for (NotificationChannel c : channels)
|
||||||
{
|
{
|
||||||
if(c.getId().equals(channelId))
|
if (c.getId().equals(channelId))
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
static NotificationChannel getNotificationChannel(String channelId)
|
static NotificationChannel getNotificationChannel(String channelId)
|
||||||
{
|
{
|
||||||
NotificationManager nm = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
List<NotificationChannel> channels = nm.getNotificationChannels();
|
List<NotificationChannel> channels = nm.getNotificationChannels();
|
||||||
|
|
||||||
if(!Settings.hasBeenDone(Settings.constNotificationChannelCleanupApk118) && BuildConfig.VERSION_CODE < 120)
|
if (!Settings.hasBeenDone(Settings.constNotificationChannelCleanupApk118) && BuildConfig.VERSION_CODE < 120)
|
||||||
{
|
{
|
||||||
// Perform a one-time cleanup of notification channels as they have been redesigned.
|
// Perform a one-time cleanup of notification channels as they have been redesigned.
|
||||||
|
|
||||||
for(NotificationChannel c : channels)
|
for (NotificationChannel c : channels)
|
||||||
nm.deleteNotificationChannel(c.getId());
|
nm.deleteNotificationChannel(c.getId());
|
||||||
|
|
||||||
Settings.considerDone(Settings.constNotificationChannelCleanupApk118);
|
Settings.considerDone(Settings.constNotificationChannelCleanupApk118);
|
||||||
@@ -1366,7 +1385,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
NotificationChannel channel = findExistingChannel(channels, channelId);
|
NotificationChannel channel = findExistingChannel(channels, channelId);
|
||||||
|
|
||||||
if(channel == null)
|
if (channel == null)
|
||||||
{
|
{
|
||||||
switch (channelId)
|
switch (channelId)
|
||||||
{
|
{
|
||||||
@@ -1422,7 +1441,7 @@ public class Miscellaneous extends Service
|
|||||||
builder.setWhen(System.currentTimeMillis());
|
builder.setWhen(System.currentTimeMillis());
|
||||||
builder.setContentIntent(pendingIntent);
|
builder.setContentIntent(pendingIntent);
|
||||||
|
|
||||||
if(title == null)
|
if (title == null)
|
||||||
builder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
builder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
||||||
else
|
else
|
||||||
builder.setContentTitle(title);
|
builder.setContentTitle(title);
|
||||||
@@ -1430,14 +1449,14 @@ public class Miscellaneous extends Service
|
|||||||
builder.setOnlyAlertOnce(true);
|
builder.setOnlyAlertOnce(true);
|
||||||
|
|
||||||
//if(Settings.showIconWhenServiceIsRunning && notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
//if(Settings.showIconWhenServiceIsRunning && notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
||||||
if(notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
if (notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
||||||
{
|
{
|
||||||
if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
if (BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
||||||
builder.setSmallIcon(R.drawable.crane);
|
builder.setSmallIcon(R.drawable.crane);
|
||||||
else
|
else
|
||||||
builder.setSmallIcon(R.drawable.ic_launcher);
|
builder.setSmallIcon(R.drawable.ic_launcher);
|
||||||
}
|
}
|
||||||
else if(!notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
else if (!notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
||||||
builder.setSmallIcon(R.drawable.info);
|
builder.setSmallIcon(R.drawable.info);
|
||||||
|
|
||||||
builder.setContentText(textToDisplay);
|
builder.setContentText(textToDisplay);
|
||||||
@@ -1487,7 +1506,7 @@ public class Miscellaneous extends Service
|
|||||||
else
|
else
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||||
builder.setCategory(Notification.CATEGORY_SERVICE);
|
builder.setCategory(Notification.CATEGORY_SERVICE);
|
||||||
|
|
||||||
builder.setAutoCancel(true);
|
builder.setAutoCancel(true);
|
||||||
@@ -1508,7 +1527,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static String explode(String glue, ArrayList<String> arrayList)
|
public static String explode(String glue, ArrayList<String> arrayList)
|
||||||
{
|
{
|
||||||
if(arrayList != null)
|
if (arrayList != null)
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (String s : arrayList)
|
for (String s : arrayList)
|
||||||
@@ -1525,7 +1544,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static String explode(String glue, String[] inputArray)
|
public static String explode(String glue, String[] inputArray)
|
||||||
{
|
{
|
||||||
if(inputArray != null)
|
if (inputArray != null)
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (String s : inputArray)
|
for (String s : inputArray)
|
||||||
@@ -1573,7 +1592,7 @@ public class Miscellaneous extends Service
|
|||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String[] proj = { MediaStore.Images.Media.DATA, MediaStore.Audio.Media.DATA };
|
String[] proj = {MediaStore.Images.Media.DATA, MediaStore.Audio.Media.DATA};
|
||||||
cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
|
cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
|
||||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
@@ -1643,7 +1662,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String selection = "_id=?";
|
final String selection = "_id=?";
|
||||||
final String[] selectionArgs = new String[] { split[1] };
|
final String[] selectionArgs = new String[]{split[1]};
|
||||||
|
|
||||||
return getDataColumn(context, contentUri, selection, selectionArgs);
|
return getDataColumn(context, contentUri, selection, selectionArgs);
|
||||||
}
|
}
|
||||||
@@ -1666,7 +1685,7 @@ public class Miscellaneous extends Service
|
|||||||
{
|
{
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
final String column = "_data";
|
final String column = "_data";
|
||||||
final String[] projection = { column };
|
final String[] projection = {column};
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1707,9 +1726,9 @@ public class Miscellaneous extends Service
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
foundClass = Class.forName(className);
|
foundClass = Class.forName(className);
|
||||||
for(Method m : foundClass.getDeclaredMethods())
|
for (Method m : foundClass.getDeclaredMethods())
|
||||||
{
|
{
|
||||||
if(m.getName().equalsIgnoreCase(methodName))
|
if (m.getName().equalsIgnoreCase(methodName))
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
@@ -1729,18 +1748,18 @@ public class Miscellaneous extends Service
|
|||||||
Object result = null;
|
Object result = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(params == null)
|
if (params == null)
|
||||||
result = m.invoke((Object[]) null);
|
result = m.invoke((Object[]) null);
|
||||||
else
|
else
|
||||||
result = m.invoke(null, params);
|
result = m.invoke(null, params);
|
||||||
}
|
}
|
||||||
catch (IllegalAccessException e)
|
catch (IllegalAccessException e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e),5 );
|
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e), 5);
|
||||||
}
|
}
|
||||||
catch (InvocationTargetException e)
|
catch (InvocationTargetException e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e),5 );
|
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -1748,7 +1767,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static boolean restrictedFeaturesConfiguredFdroid()
|
public static boolean restrictedFeaturesConfiguredFdroid()
|
||||||
{
|
{
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
|
if (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1765,9 +1784,9 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static boolean restrictedFeaturesConfiguredGoogle()
|
public static boolean restrictedFeaturesConfiguredGoogle()
|
||||||
{
|
{
|
||||||
if(Rule.isAnyRuleUsing(Action.Action_Enum.startPhoneCall) || Rule.isAnyRuleUsing(Action.Action_Enum.stopPhoneCall))
|
if (Rule.isAnyRuleUsing(Action.Action_Enum.startPhoneCall) || Rule.isAnyRuleUsing(Action.Action_Enum.stopPhoneCall))
|
||||||
{
|
{
|
||||||
if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
if (BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2002,11 +2021,11 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static boolean googleToBlameForLocation(boolean checkExistingRules)
|
public static boolean googleToBlameForLocation(boolean checkExistingRules)
|
||||||
{
|
{
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||||
{
|
{
|
||||||
if (BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_googleplay))
|
if (BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_googleplay))
|
||||||
{
|
{
|
||||||
if(checkExistingRules)
|
if (checkExistingRules)
|
||||||
{
|
{
|
||||||
if (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.pointOfInterest))
|
if (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.pointOfInterest))
|
||||||
{
|
{
|
||||||
@@ -2111,7 +2130,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
{
|
{
|
||||||
Toast.makeText(context, "Request failed try again: "+ t.toString(), Toast.LENGTH_LONG).show();
|
Toast.makeText(context, "Request failed try again: " + t.toString(), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2127,7 +2146,7 @@ public class Miscellaneous extends Service
|
|||||||
"compareString".matches(regex); //will cause expection if no valid regex
|
"compareString".matches(regex); //will cause expection if no valid regex
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch(java.util.regex.PatternSyntaxException e)
|
catch (java.util.regex.PatternSyntaxException e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2137,9 +2156,9 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static boolean comparePhoneNumbers(String number1, String number2)
|
public static boolean comparePhoneNumbers(String number1, String number2)
|
||||||
{
|
{
|
||||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.S)
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.S)
|
||||||
{
|
{
|
||||||
TelephonyManager tm = (TelephonyManager)Miscellaneous.getAnyContext().getSystemService(Context.TELEPHONY_SERVICE);
|
TelephonyManager tm = (TelephonyManager) Miscellaneous.getAnyContext().getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
return PhoneNumberUtils.areSamePhoneNumber(number1, number2, tm.getNetworkCountryIso());
|
return PhoneNumberUtils.areSamePhoneNumber(number1, number2, tm.getNetworkCountryIso());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2151,11 +2170,11 @@ public class Miscellaneous extends Service
|
|||||||
DateFormat sdf = null;
|
DateFormat sdf = null;
|
||||||
SimpleDateFormat fallBackFormatter = new SimpleDateFormat(Settings.dateFormat);
|
SimpleDateFormat fallBackFormatter = new SimpleDateFormat(Settings.dateFormat);
|
||||||
|
|
||||||
if(sdf == null && Settings.dateFormat != null)
|
if (sdf == null && Settings.dateFormat != null)
|
||||||
sdf = new SimpleDateFormat(Settings.dateFormat);
|
sdf = new SimpleDateFormat(Settings.dateFormat);
|
||||||
|
|
||||||
String formattedDate;
|
String formattedDate;
|
||||||
if(sdf != null)
|
if (sdf != null)
|
||||||
formattedDate = sdf.format(input);
|
formattedDate = sdf.format(input);
|
||||||
else
|
else
|
||||||
formattedDate = fallBackFormatter.format(input);
|
formattedDate = fallBackFormatter.format(input);
|
||||||
@@ -2165,9 +2184,9 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static int arraySearchIndexOf(String[] haystack, String needle, boolean caseSensitive, boolean matchFullLine)
|
public static int arraySearchIndexOf(String[] haystack, String needle, boolean caseSensitive, boolean matchFullLine)
|
||||||
{
|
{
|
||||||
if(matchFullLine)
|
if (matchFullLine)
|
||||||
{
|
{
|
||||||
if(caseSensitive)
|
if (caseSensitive)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < haystack.length; i++)
|
for (int i = 0; i < haystack.length; i++)
|
||||||
{
|
{
|
||||||
@@ -2186,7 +2205,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(caseSensitive)
|
if (caseSensitive)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < haystack.length; i++)
|
for (int i = 0; i < haystack.length; i++)
|
||||||
{
|
{
|
||||||
@@ -2209,9 +2228,9 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static boolean arraySearch(String[] haystack, String needle, boolean caseSensitive, boolean matchFullLine)
|
public static boolean arraySearch(String[] haystack, String needle, boolean caseSensitive, boolean matchFullLine)
|
||||||
{
|
{
|
||||||
if(matchFullLine)
|
if (matchFullLine)
|
||||||
{
|
{
|
||||||
if(caseSensitive)
|
if (caseSensitive)
|
||||||
{
|
{
|
||||||
for (String s : haystack)
|
for (String s : haystack)
|
||||||
{
|
{
|
||||||
@@ -2230,7 +2249,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(caseSensitive)
|
if (caseSensitive)
|
||||||
{
|
{
|
||||||
for (String s : haystack)
|
for (String s : haystack)
|
||||||
{
|
{
|
||||||
@@ -2258,6 +2277,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get ISO 3166-1 alpha-2 country code for this device (or null if not available)
|
* Get ISO 3166-1 alpha-2 country code for this device (or null if not available)
|
||||||
|
*
|
||||||
* @param context Context reference to get the TelephonyManager instance from
|
* @param context Context reference to get the TelephonyManager instance from
|
||||||
* @return country code or null
|
* @return country code or null
|
||||||
*/
|
*/
|
||||||
@@ -2285,7 +2305,8 @@ public class Miscellaneous extends Service
|
|||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{ }
|
{
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -2328,7 +2349,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static void setUiTheme(Context context)
|
public static void setUiTheme(Context context)
|
||||||
{
|
{
|
||||||
switch(Settings.uiTheme)
|
switch (Settings.uiTheme)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
context.setTheme(R.style.AppTheme);
|
context.setTheme(R.style.AppTheme);
|
||||||
@@ -2344,11 +2365,22 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
public static void setDisplayLanguage(Context context)
|
public static void setDisplayLanguage(Context context)
|
||||||
{
|
{
|
||||||
if(!Settings.displayLanguage.equals(Settings.default_displayLanguage))
|
String targetLanguage = null;
|
||||||
|
|
||||||
|
if (Settings.displayLanguage == null)
|
||||||
|
{
|
||||||
|
targetLanguage = Settings.default_displayLanguage;
|
||||||
|
}
|
||||||
|
else if (!Settings.displayLanguage.equals(Settings.default_displayLanguage))
|
||||||
|
{
|
||||||
|
targetLanguage = Settings.default_displayLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetLanguage != null)
|
||||||
{
|
{
|
||||||
Locale myLocale;
|
Locale myLocale;
|
||||||
|
|
||||||
if(Settings.displayLanguage.contains("_"))
|
if (Settings.displayLanguage.contains("_"))
|
||||||
{
|
{
|
||||||
String[] parts = Settings.displayLanguage.split("_");
|
String[] parts = Settings.displayLanguage.split("_");
|
||||||
myLocale = new Locale(parts[0], parts[1]);
|
myLocale = new Locale(parts[0], parts[1]);
|
||||||
|
|||||||
@@ -2092,4 +2092,16 @@ public class Trigger
|
|||||||
{
|
{
|
||||||
this.parentRule = parentRule;
|
this.parentRule = parentRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Trigger getClone()
|
||||||
|
{
|
||||||
|
Trigger clone = new Trigger();
|
||||||
|
|
||||||
|
clone.setTriggerType(this.getTriggerType());
|
||||||
|
clone.setParentRule(this.getParentRule());
|
||||||
|
clone.setTriggerParameter(this.getTriggerParameter());
|
||||||
|
clone.setTriggerParameter2(this.getTriggerParameter2());
|
||||||
|
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import android.content.IntentFilter;
|
|||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
import android.net.wifi.WifiManager;
|
import android.net.wifi.WifiManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jens.automation2.AutomationService;
|
import com.jens.automation2.AutomationService;
|
||||||
@@ -213,7 +214,12 @@ public class WifiBroadcastReceiver extends BroadcastReceiver
|
|||||||
wifiBrInstance = new WifiBroadcastReceiver();
|
wifiBrInstance = new WifiBroadcastReceiver();
|
||||||
WifiBroadcastReceiver.parentLocationProvider = loc;
|
WifiBroadcastReceiver.parentLocationProvider = loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
loc.getParentService().registerReceiver(wifiBrInstance, wifiListenerIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
loc.getParentService().registerReceiver(wifiBrInstance, wifiListenerIntentFilter);
|
loc.getParentService().registerReceiver(wifiBrInstance, wifiListenerIntentFilter);
|
||||||
|
|
||||||
wifiListenerActive = true;
|
wifiListenerActive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jens.automation2.ActivityPermissions;
|
import com.jens.automation2.ActivityPermissions;
|
||||||
@@ -30,7 +31,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
|||||||
static boolean usbHostConnected = false;
|
static boolean usbHostConnected = false;
|
||||||
static boolean batteryReceiverActive = false;
|
static boolean batteryReceiverActive = false;
|
||||||
static IntentFilter batteryIntentFilter = null;
|
static IntentFilter batteryIntentFilter = null;
|
||||||
static Intent batteryStatus = null;
|
static Intent batteryStatusReceiverIntent = null;
|
||||||
|
|
||||||
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
|
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
|
||||||
private static int currentChargingType = 0; //AC, wireless, USB
|
private static int currentChargingType = 0; //AC, wireless, USB
|
||||||
@@ -52,7 +53,10 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
|||||||
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_LOW);
|
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
batteryStatus = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter);
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
batteryStatusReceiverIntent = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
|
batteryStatusReceiverIntent = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter);
|
||||||
|
|
||||||
batteryReceiverActive = true;
|
batteryReceiverActive = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package com.jens.automation2.receivers;
|
package com.jens.automation2.receivers;
|
||||||
|
|
||||||
|
import static android.content.Context.RECEIVER_EXPORTED;
|
||||||
|
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@@ -57,6 +60,10 @@ public class BluetoothReceiver extends BroadcastReceiver implements AutomationLi
|
|||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "BluetoothReceiver", "Starting BluetoothReceiver", 4);
|
Miscellaneous.logEvent("i", "BluetoothReceiver", "Starting BluetoothReceiver", 4);
|
||||||
bluetoothReceiverActive = true;
|
bluetoothReceiverActive = true;
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
AutomationService.getInstance().registerReceiver(bluetoothReceiverInstance, bluetoothReceiverIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
AutomationService.getInstance().registerReceiver(bluetoothReceiverInstance, bluetoothReceiverIntentFilter);
|
AutomationService.getInstance().registerReceiver(bluetoothReceiverInstance, bluetoothReceiverIntentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,9 +56,16 @@ public class BroadcastListener extends android.content.BroadcastReceiver impleme
|
|||||||
if(intent.getExtras() != null && intent.getExtras().size() > 0)
|
if(intent.getExtras() != null && intent.getExtras().size() > 0)
|
||||||
{
|
{
|
||||||
for (String key : intent.getExtras().keySet())
|
for (String key : intent.getExtras().keySet())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4);
|
Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4);
|
||||||
}
|
}
|
||||||
|
catch(NullPointerException e)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + "unknown class", 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived);
|
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived);
|
||||||
@@ -133,6 +140,7 @@ public class BroadcastListener extends android.content.BroadcastReceiver impleme
|
|||||||
broadcastStatus = automationServiceRef.registerReceiver(broadcastReceiverInstance, broadcastIntentFilter, Context.RECEIVER_EXPORTED);
|
broadcastStatus = automationServiceRef.registerReceiver(broadcastReceiverInstance, broadcastIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
else
|
else
|
||||||
broadcastStatus = automationServiceRef.registerReceiver(broadcastReceiverInstance, broadcastIntentFilter);
|
broadcastStatus = automationServiceRef.registerReceiver(broadcastReceiverInstance, broadcastIntentFilter);
|
||||||
|
|
||||||
broadcastReceiverActive = true;
|
broadcastReceiverActive = true;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ public class ConnectivityReceiver extends BroadcastReceiver implements Automatio
|
|||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "Wifi Listener", "Starting connectivityReceiver", 4);
|
Miscellaneous.logEvent("i", "Wifi Listener", "Starting connectivityReceiver", 4);
|
||||||
connectivityReceiverActive = true;
|
connectivityReceiverActive = true;
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
automationServiceRef.registerReceiver(connectivityReceiverInstance, connectivityIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
automationServiceRef.registerReceiver(connectivityReceiverInstance, connectivityIntentFilter);
|
automationServiceRef.registerReceiver(connectivityReceiverInstance, connectivityIntentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jens.automation2.ActivityPermissions;
|
import com.jens.automation2.ActivityPermissions;
|
||||||
@@ -105,6 +106,10 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
|
|||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "HeadsetJackListener", "Starting HeadsetJackListener", 4);
|
Miscellaneous.logEvent("i", "HeadsetJackListener", "Starting HeadsetJackListener", 4);
|
||||||
headphoneJackListenerActive = true;
|
headphoneJackListenerActive = true;
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
automationService.registerReceiver(this, headphoneJackListenerIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
automationService.registerReceiver(this, headphoneJackListenerIntentFilter);
|
automationService.registerReceiver(this, headphoneJackListenerIntentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,7 +285,12 @@ public class PhoneStatusListener implements AutomationListenerInterface
|
|||||||
if(!outgoingCallsReceiverActive)
|
if(!outgoingCallsReceiverActive)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "PhoneStatusListener", "Starting PhoneStatusListener->outgoingCallsReceiver", 4);
|
Miscellaneous.logEvent("i", "PhoneStatusListener", "Starting PhoneStatusListener->outgoingCallsReceiver", 4);
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
automationService.registerReceiver(outgoingCallsReceiverInstance, outgoingCallsIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
automationService.registerReceiver(outgoingCallsReceiverInstance, outgoingCallsIntentFilter);
|
automationService.registerReceiver(outgoingCallsReceiverInstance, outgoingCallsIntentFilter);
|
||||||
|
|
||||||
outgoingCallsReceiverActive = true;
|
outgoingCallsReceiverActive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
// Intent.ACTION_USER_UNLOCKED
|
// Intent.ACTION_USER_UNLOCKED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter);
|
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter);
|
||||||
|
|
||||||
screenStateReceiverActive = true;
|
screenStateReceiverActive = true;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.net.wifi.WifiManager;
|
import android.net.wifi.WifiManager;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
import com.jens.automation2.AutomationService;
|
import com.jens.automation2.AutomationService;
|
||||||
import com.jens.automation2.Miscellaneous;
|
import com.jens.automation2.Miscellaneous;
|
||||||
@@ -116,6 +117,9 @@ public class SubSystemStateReceiver extends BroadcastReceiver implements Automat
|
|||||||
subSystemStateIntentFilter.addAction(stateBluetooth);
|
subSystemStateIntentFilter.addAction(stateBluetooth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
subSystemStatusIntent = automationServiceRef.registerReceiver(subSystemStateReceiverInstance, subSystemStateIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
subSystemStatusIntent = automationServiceRef.registerReceiver(subSystemStateReceiverInstance, subSystemStateIntentFilter);
|
subSystemStatusIntent = automationServiceRef.registerReceiver(subSystemStateReceiverInstance, subSystemStateIntentFilter);
|
||||||
|
|
||||||
subSystemStateReceiverActive = true;
|
subSystemStateReceiverActive = true;
|
||||||
|
|||||||
@@ -162,7 +162,11 @@ public class TetheringReceiver extends android.content.BroadcastReceiver impleme
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
automationServiceRef.registerReceiver(receiverInstance, intentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
automationServiceRef.registerReceiver(receiverInstance, intentFilter);
|
automationServiceRef.registerReceiver(receiverInstance, intentFilter);
|
||||||
|
|
||||||
receiverActive = true;
|
receiverActive = true;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.jens.automation2.AutomationService;
|
import com.jens.automation2.AutomationService;
|
||||||
@@ -44,6 +45,9 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
|||||||
timezoneListenerIntentFilter.addAction(Intent.ACTION_TIME_CHANGED);
|
timezoneListenerIntentFilter.addAction(Intent.ACTION_TIME_CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT >= 26)
|
||||||
|
automationService.registerReceiver(timeZoneListenerInstance, timezoneListenerIntentFilter, Context.RECEIVER_EXPORTED);
|
||||||
|
else
|
||||||
automationService.registerReceiver(timeZoneListenerInstance, timezoneListenerIntentFilter);
|
automationService.registerReceiver(timeZoneListenerInstance, timezoneListenerIntentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -349,10 +349,10 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Fehler beim Lesen von Orten und Regeln aus Datei.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Fehler beim Lesen von Orten und Regeln aus Datei.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Es scheint als wären keine Datenänderungen gespeichert worden. Allerdings könnten Änderungen im Speicher sein, die zurückgenommen werden müssen. Daher wird die Einstellungsdatei neu geladen.</string>
|
<string name="noDataChangedReadingAnyway">Es scheint als wären keine Datenänderungen gespeichert worden. Allerdings könnten Änderungen im Speicher sein, die zurückgenommen werden müssen. Daher wird die Einstellungsdatei neu geladen.</string>
|
||||||
<string name="bluetoothConnection">Bluetooth Verbindung</string>
|
<string name="bluetoothConnection">Bluetooth Verbindung</string>
|
||||||
<string name="bluetoothConnectionTo">Bluetooth Verbindung zu %1$s</string>
|
<string name="bluetoothConnectionTo">Bluetooth Verbindung zu \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">Bluetooth Verbindung getrennt von %1$s</string>
|
<string name="bluetoothDisconnectFrom">Bluetooth Verbindung getrennt von \"%1$s\"</string>
|
||||||
<string name="bluetoothDeviceInRange">Bluetooth Gerät %1$s in Reichweite.</string>
|
<string name="bluetoothDeviceInRange">Bluetooth Gerät \"%1$s\" in Reichweite.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Bluetooth Gerät %1$s außer Reichweite.</string>
|
<string name="bluetoothDeviceOutOfRange">Bluetooth Gerät \"%1$s\" außer Reichweite.</string>
|
||||||
<string name="anyDevice">irgendeinem Gerät</string>
|
<string name="anyDevice">irgendeinem Gerät</string>
|
||||||
<string name="noDevice">kein Gerät</string>
|
<string name="noDevice">kein Gerät</string>
|
||||||
<string name="selectDeviceFromList">Gerät aus Liste</string>
|
<string name="selectDeviceFromList">Gerät aus Liste</string>
|
||||||
@@ -697,7 +697,7 @@
|
|||||||
<string name="screenIs">Bildschirm ist %1$s</string>
|
<string name="screenIs">Bildschirm ist %1$s</string>
|
||||||
<string name="sendEmailToDev">Email an Entwickler schicken</string>
|
<string name="sendEmailToDev">Email an Entwickler schicken</string>
|
||||||
<string name="controlCenter">Steuerungszentrale</string>
|
<string name="controlCenter">Steuerungszentrale</string>
|
||||||
<string name="contactNotice">Email ist mein bevorzugtes Kommunikationsmittel, um Fehler zu melden, Fragen zu stellen or Vorschläge zu machen. Bitte gehen Sie für weitere Infos in die Steuerungszentrale.\nViele Fragen können nicht einfach gleich beantwortet werden, sondern erfordern eine technische Prüfung. Haben Sie also bitte etwas Geduld.\n\nAlternativ können Sie Ihre Frage im <a href="https://forum.server47.de">Forum</a> stellen.</string>
|
<string name="contactNotice">Email ist mein bevorzugtes Kommunikationsmittel, um Fehler zu melden, Fragen zu stellen or Vorschläge zu machen. Bitte gehen Sie für weitere Infos in die Steuerungszentrale.\nViele Fragen können nicht einfach gleich beantwortet werden, sondern erfordern eine technische Prüfung. Haben Sie also bitte etwas Geduld.\nIch kann absolut nachvollziehen, wenn Sie Ihre Privatspäre schützen möchten, aber ich möchte Sie bitten, sich zumindest mit Ihrem Vornamen zu melden, um einen normalen freundlichen Austausch zu vereinfachen.\n\nAlternativ können Sie Ihre Frage im <a href="https://forum.server47.de">Forum</a> stellen.</string>
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Aufgrund Google\'s unendlicher Weisheit, ist die letzte Android Version, mit der diese Funktion noch funktioniert, die Version %1$s. Sie können es hier einrichten, aber vermutlich wird es keine Auswirkung haben.</string>
|
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Aufgrund Google\'s unendlicher Weisheit, ist die letzte Android Version, mit der diese Funktion noch funktioniert, die Version %1$s. Sie können es hier einrichten, aber vermutlich wird es keine Auswirkung haben.</string>
|
||||||
<string name="musicPlaying">Musik läuft</string>
|
<string name="musicPlaying">Musik läuft</string>
|
||||||
<string name="selectParameters">Wählen Sie die Parameter</string>
|
<string name="selectParameters">Wählen Sie die Parameter</string>
|
||||||
|
|||||||
@@ -228,7 +228,7 @@
|
|||||||
<string name="startOtherActivity">Iniciar otra app</string>
|
<string name="startOtherActivity">Iniciar otra app</string>
|
||||||
<string name="settings">Ajustes</string>
|
<string name="settings">Ajustes</string>
|
||||||
<string name="bluetoothConnection">Conexión Bluetooth</string>
|
<string name="bluetoothConnection">Conexión Bluetooth</string>
|
||||||
<string name="bluetoothConnectionTo">Conexión Bluetooth con %1$s</string>
|
<string name="bluetoothConnectionTo">Conexión Bluetooth con \"%1$s\"</string>
|
||||||
<string name="anyDevice">cualquier dispositivo</string>
|
<string name="anyDevice">cualquier dispositivo</string>
|
||||||
<string name="noDevice">ningun dispositivo</string>
|
<string name="noDevice">ningun dispositivo</string>
|
||||||
<string name="actionPlayMusic">Abrir reproductor de música</string>
|
<string name="actionPlayMusic">Abrir reproductor de música</string>
|
||||||
@@ -509,9 +509,9 @@
|
|||||||
<string name="toggleNotAllowed">Reversibilidad solo esta permitida para reglas que tienen tags NFC por condición. Consulte la ayuda para mas información.</string>
|
<string name="toggleNotAllowed">Reversibilidad solo esta permitida para reglas que tienen tags NFC por condición. Consulte la ayuda para mas información.</string>
|
||||||
<string name="errorReadingPoisAndRulesFromFile">Error en la lectura sitios y reglas del archivo.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Error en la lectura sitios y reglas del archivo.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Aparece no hay cambios. Pero puede haber cambios en la memoria que pueden ser recogidos. Leyendo archivo de nuevo.</string>
|
<string name="noDataChangedReadingAnyway">Aparece no hay cambios. Pero puede haber cambios en la memoria que pueden ser recogidos. Leyendo archivo de nuevo.</string>
|
||||||
<string name="bluetoothDisconnectFrom">Conexión Bluetooth de %1$s desconectada</string>
|
<string name="bluetoothDisconnectFrom">Conexión Bluetooth de \"%1$s\" desconectada</string>
|
||||||
<string name="bluetoothDeviceInRange">Dispositivo Bluetooth %1$s en alcance.</string>
|
<string name="bluetoothDeviceInRange">Dispositivo Bluetooth \"%1$s\" en alcance.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Dispositivo Bluetooth %1$s fuera de alcance.</string>
|
<string name="bluetoothDeviceOutOfRange">Dispositivo Bluetooth \"%1$s\" fuera de alcance.</string>
|
||||||
<string name="deviceInRange">dispositivo en alcance</string>
|
<string name="deviceInRange">dispositivo en alcance</string>
|
||||||
<string name="deviceOutOfRange">dispositivo fuera de alcance</string>
|
<string name="deviceOutOfRange">dispositivo fuera de alcance</string>
|
||||||
<string name="selectDeviceOption">Elija una opción de dispositivo.</string>
|
<string name="selectDeviceOption">Elija una opción de dispositivo.</string>
|
||||||
@@ -696,7 +696,7 @@
|
|||||||
<string name="screenIs">pantalla esta %1$s</string>
|
<string name="screenIs">pantalla esta %1$s</string>
|
||||||
<string name="sendEmailToDev">Enviar email al desrollador</string>
|
<string name="sendEmailToDev">Enviar email al desrollador</string>
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Debido a la infinita sabiduría de Google, la última versión de Android en la que se sabe que funciona esta función es %1$s. Puede configurarlo, pero probablemente no tendrá ningún efecto.</string>
|
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Debido a la infinita sabiduría de Google, la última versión de Android en la que se sabe que funciona esta función es %1$s. Puede configurarlo, pero probablemente no tendrá ningún efecto.</string>
|
||||||
<string name="contactNotice">El correo electrónico es mi método preferido de contacto para informar errores, hacer preguntas o hacer propuestas. Vaya al centro de control para obtener más información.\nMuchas preguntas no se pueden responder de inmediato, pero requieren cierta investigación técnica. Así que, por favor, tengan un poco de paciencia. \n\nAlternativamente, tiene la opción de hacer sus preguntas en el <a href="https://forum.server47.de">foro</a>.</string>
|
<string name="contactNotice">El correo electrónico es mi método preferido de contacto para informar errores, hacer preguntas o hacer propuestas. Vaya al centro de control para obtener más información.\nMuchas preguntas no se pueden responder de inmediato, pero requieren cierta investigación técnica. Así que, por favor, tengan un poco de paciencia.\nEntiendo perfectamente el impulso de proteger tu privacidad, pero te pido que reveles al menos tu nombre de pila para permitir una conversación amistosa.\n\nAlternativamente, tiene la opción de hacer sus preguntas en el <a href="https://forum.server47.de">foro</a>.</string>
|
||||||
<string name="actionMediaControlNotice">Ten en cuenta que esta acción puede no funcionar con TODOS los jugadores. E incluso si lo hace, no todos los botones funcionan necesariamente.</string>
|
<string name="actionMediaControlNotice">Ten en cuenta que esta acción puede no funcionar con TODOS los jugadores. E incluso si lo hace, no todos los botones funcionan necesariamente.</string>
|
||||||
<string name="musicPlaying">Musica esta reproduciendo</string>
|
<string name="musicPlaying">Musica esta reproduciendo</string>
|
||||||
<string name="selectParameters">Elije parametros</string>
|
<string name="selectParameters">Elije parametros</string>
|
||||||
|
|||||||
@@ -352,8 +352,8 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Erreur de lecture des positions et règles depuis le fichier.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Erreur de lecture des positions et règles depuis le fichier.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Les modifications n’ont pas éte enregistrées. Cependant, il peut y avoir eu des changements dans la mémoire qui doit être rechargée. Relecture du fichier.</string>
|
<string name="noDataChangedReadingAnyway">Les modifications n’ont pas éte enregistrées. Cependant, il peut y avoir eu des changements dans la mémoire qui doit être rechargée. Relecture du fichier.</string>
|
||||||
<string name="bluetoothConnection">connexion Bluetooth</string>
|
<string name="bluetoothConnection">connexion Bluetooth</string>
|
||||||
<string name="bluetoothConnectionTo">connexion Bluetooth à %1$s</string>
|
<string name="bluetoothConnectionTo">connexion Bluetooth à \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">connexion Bluetooth à %1$s perdue</string>
|
<string name="bluetoothDisconnectFrom">connexion Bluetooth à \"%1$s\" perdue</string>
|
||||||
<string name="bluetoothDeviceInRange">Dispositif Bluetooth %1$s à portée.</string>
|
<string name="bluetoothDeviceInRange">Dispositif Bluetooth %1$s à portée.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Dispositif Bluetooth %1$s hors de portée.</string>
|
<string name="bluetoothDeviceOutOfRange">Dispositif Bluetooth %1$s hors de portée.</string>
|
||||||
<string name="anyDevice">n’importe quel appareil</string>
|
<string name="anyDevice">n’importe quel appareil</string>
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">La coparaisonn est sensible à la casse du texte</string>
|
<string name="comparisonCaseInsensitive">La coparaisonn est sensible à la casse du texte</string>
|
||||||
<string name="profileWarning">Les paramètres que vous pouvez régler ici affectent les évènements audio sur votre télephone. Ils peuvent même annuler votre alarme de réveil. Donc, quoi que vous fassiez, il est fortement recommandé de le tester, même après les mises à jour d’Android.</string>
|
<string name="profileWarning">Les paramètres que vous pouvez régler ici affectent les évènements audio sur votre télephone. Ils peuvent même annuler votre alarme de réveil. Donc, quoi que vous fassiez, il est fortement recommandé de le tester, même après les mises à jour d’Android.</string>
|
||||||
<string name="ifString">si</string>
|
<string name="ifString">si</string>
|
||||||
<string name="contactNotice">L’e-mail est mon moyen de contact préféré pour signaler les bogues, poser des questions ou faire des propositions. Rendez-vous sur le centre de contrôle pour en savoir plus. Des questions multiples peuvent ne pas recevoir de réponse immédiate, mais nécessitent des recherches techniques. Veuillez donc faire preuve de patience. \n\nSinon, vous avez la possibilité de poser vos questions dans le <a href="https://forum.server47.de">forum</a>.</string>
|
<string name="contactNotice">L’e-mail est mon moyen de contact préféré pour signaler les bogues, poser des questions ou faire des propositions. Rendez-vous sur le centre de contrôle pour en savoir plus. Des questions multiples peuvent ne pas recevoir de réponse immédiate, mais nécessitent des recherches techniques. Veuillez donc faire preuve de patience.\nJe comprends parfaitement l\'envie de protéger votre vie privée, mais je vous demande de révéler au moins votre prénom pour permettre une conversation amicale.\n\nSinon, vous avez la possibilité de poser vos questions dans le <a href="https://forum.server47.de">forum</a>.</string>
|
||||||
<string name="controlCenter">Centre de contrôle</string>
|
<string name="controlCenter">Centre de contrôle</string>
|
||||||
<string name="sendEmailToDev">Envoyer un email au développeur</string>
|
<string name="sendEmailToDev">Envoyer un email au développeur</string>
|
||||||
<string name="screenIs">l’écran est %1$s</string>
|
<string name="screenIs">l’écran est %1$s</string>
|
||||||
|
|||||||
@@ -105,8 +105,8 @@
|
|||||||
<string name="autoBrightnessNotice">Se usi la luminosità automatica, il valore di luminosità scelto in seguito probabilmente non sarà in uso per molto.</string>
|
<string name="autoBrightnessNotice">Se usi la luminosità automatica, il valore di luminosità scelto in seguito probabilmente non sarà in uso per molto.</string>
|
||||||
<string name="batteryLevel">Livello della batteria</string>
|
<string name="batteryLevel">Livello della batteria</string>
|
||||||
<string name="bluetoothConnection">Connessione Bluetooth</string>
|
<string name="bluetoothConnection">Connessione Bluetooth</string>
|
||||||
<string name="bluetoothConnectionTo">Connessione Bluetooth con %1$s</string>
|
<string name="bluetoothConnectionTo">Connessione Bluetooth con \"%1$s\"</string>
|
||||||
<string name="bluetoothDeviceInRange">Dispositivo Bluetooth %1$s rilevato.</string>
|
<string name="bluetoothDeviceInRange">Dispositivo Bluetooth \"%1$s\" rilevato.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Dispositivo Bluetooth %1$s non raggiungibile.</string>
|
<string name="bluetoothDeviceOutOfRange">Dispositivo Bluetooth %1$s non raggiungibile.</string>
|
||||||
<string name="bluetoothDisconnectFrom">Connessione Bluetooth con %1$s interrotta</string>
|
<string name="bluetoothDisconnectFrom">Connessione Bluetooth con %1$s interrotta</string>
|
||||||
<string name="bluetoothFailed">Impossibile attivare il Bluetooth. Questo dispositivo ne è dotato?</string>
|
<string name="bluetoothFailed">Impossibile attivare il Bluetooth. Questo dispositivo ne è dotato?</string>
|
||||||
@@ -698,7 +698,7 @@
|
|||||||
<string name="screenIs">lo schermo è %1$s</string>
|
<string name="screenIs">lo schermo è %1$s</string>
|
||||||
<string name="sendEmailToDev">Invia email allo sviluppatore</string>
|
<string name="sendEmailToDev">Invia email allo sviluppatore</string>
|
||||||
<string name="controlCenter">Centro di controllo</string>
|
<string name="controlCenter">Centro di controllo</string>
|
||||||
<string name="contactNotice">L\'e-mail è il mio metodo di contatto preferito per segnalare bug, porre domande o fare proposte. Vai al centro di controllo per saperne di più.\nMolte domande non possono essere risolte immediatamente, ma richiedono alcune ricerche tecniche. Quindi, per favore, abbiate un po\' di pazienza. \n\nIn alternativa hai la possibilità di porre le tue domande nel <a href="https://forum.server47.de">forum</a>.</string>
|
<string name="contactNotice">L\'e-mail è il mio metodo di contatto preferito per segnalare bug, porre domande o fare proposte. Vai al centro di controllo per saperne di più.\nMolte domande non possono essere risolte immediatamente, ma richiedono alcune ricerche tecniche. Quindi, per favore, abbiate un po\' di pazienza.\nCapisco perfettamente l\'impulso a proteggere la tua privacy, ma ti chiedo di rivelare almeno il tuo nome di battesimo per permettere una conversazione amichevole.\n\nIn alternativa hai la possibilità di porre le tue domande nel <a href="https://forum.server47.de">forum</a>.</string>
|
||||||
<string name="musicPlaying">La musica è in riproduzione</string>
|
<string name="musicPlaying">La musica è in riproduzione</string>
|
||||||
<string name="musicIsPlaying">la musica è in riproduzione</string>
|
<string name="musicIsPlaying">la musica è in riproduzione</string>
|
||||||
<string name="musicIsNotPlaying">la musica non viene riprodotta</string>
|
<string name="musicIsNotPlaying">la musica non viene riprodotta</string>
|
||||||
|
|||||||
@@ -347,8 +347,8 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Fout bij het lezen van locaties en regels uit bestand.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Fout bij het lezen van locaties en regels uit bestand.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Het lijkt erop dat er geen gegevenswijziging is opgeslagen. Er kunnen echter wijzigingen in het geheugen zijn geweest die moeten worden teruggedraaid. Herlezen van bestand.</string>
|
<string name="noDataChangedReadingAnyway">Het lijkt erop dat er geen gegevenswijziging is opgeslagen. Er kunnen echter wijzigingen in het geheugen zijn geweest die moeten worden teruggedraaid. Herlezen van bestand.</string>
|
||||||
<string name="bluetoothConnection">Bluetooth connection</string>
|
<string name="bluetoothConnection">Bluetooth connection</string>
|
||||||
<string name="bluetoothConnectionTo">Bluetooth-verbinding met %1$s</string>
|
<string name="bluetoothConnectionTo">Bluetooth-verbinding met \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">Bluetooth-verbinding met %1$s verbroken</string>
|
<string name="bluetoothDisconnectFrom">Bluetooth-verbinding met \"%1$s\" verbroken</string>
|
||||||
<string name="bluetoothDeviceInRange">Bluetooth-apparaat %1$s binnen bereik.</string>
|
<string name="bluetoothDeviceInRange">Bluetooth-apparaat %1$s binnen bereik.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Bluetooth-apparaat %1$s buiten bereik.</string>
|
<string name="bluetoothDeviceOutOfRange">Bluetooth-apparaat %1$s buiten bereik.</string>
|
||||||
<string name="anyDevice">elk apparaat</string>
|
<string name="anyDevice">elk apparaat</string>
|
||||||
@@ -676,7 +676,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">Vergelijkingen worden gedaan case-INsensitief</string>
|
<string name="comparisonCaseInsensitive">Vergelijkingen worden gedaan case-INsensitief</string>
|
||||||
<string name="profileWarning">De instellingen die je hier maakt kunnen ervoor zorgen dat je bepaalde dingen niet meer van je telefoon merkt. Ze kunnen zelfs je wekker dempen. Dus wat je ook doet - het wordt aanbevolen om het te testen - ook na Android upgrades.</string>
|
<string name="profileWarning">De instellingen die je hier maakt kunnen ervoor zorgen dat je bepaalde dingen niet meer van je telefoon merkt. Ze kunnen zelfs je wekker dempen. Dus wat je ook doet - het wordt aanbevolen om het te testen - ook na Android upgrades.</string>
|
||||||
<string name="ifString">als</string>
|
<string name="ifString">als</string>
|
||||||
<string name="contactNotice">E-mail is mijn favoriete contactmethode om bugs te melden, vragen te stellen of voorstellen te doen. Ga naar het controlecentrum voor meer informatie.\nVeel vragen kunnen niet meteen worden beantwoord, maar vereisen wel wat technisch onderzoek. Dus heb alsjeblieft wat geduld. \n\nJe hebt ook de mogelijkheid om je vragen te stellen in het <a href="https://forum.server47.de">forum</a>.</string>
|
<string name="contactNotice">E-mail is mijn favoriete contactmethode om bugs te melden, vragen te stellen of voorstellen te doen. Ga naar het controlecentrum voor meer informatie.\nVeel vragen kunnen niet meteen worden beantwoord, maar vereisen wel wat technisch onderzoek. Dus heb alsjeblieft wat geduld.\nIk begrijp absoluut de drang om je privacy te beschermen, maar ik vraag je om ten minste je voornaam te onthullen om een vriendelijk gesprek mogelijk te maken.\n\nJe hebt ook de mogelijkheid om je vragen te stellen in het <a href="https://forum.server47.de">forum</a>.</string>
|
||||||
<string name="controlCenter">Controlecentrum</string>
|
<string name="controlCenter">Controlecentrum</string>
|
||||||
<string name="sendEmailToDev">Stuur een e-mail naar de ontwikkelaar</string>
|
<string name="sendEmailToDev">Stuur een e-mail naar de ontwikkelaar</string>
|
||||||
<string name="screenIs">scherm is %1$s</string>
|
<string name="screenIs">scherm is %1$s</string>
|
||||||
|
|||||||
@@ -420,8 +420,8 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Błąd odczytu lokalizacji i reguł z pliku.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Błąd odczytu lokalizacji i reguł z pliku.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Wygląda na to, że nie zapisano żadnych zmian danych. Mogły jednak wystąpić zmiany w pamięci, które należy cofnąć. Ponowne czytanie pliku.</string>
|
<string name="noDataChangedReadingAnyway">Wygląda na to, że nie zapisano żadnych zmian danych. Mogły jednak wystąpić zmiany w pamięci, które należy cofnąć. Ponowne czytanie pliku.</string>
|
||||||
<string name="bluetoothConnection">Połączenie Bluetooth</string>
|
<string name="bluetoothConnection">Połączenie Bluetooth</string>
|
||||||
<string name="bluetoothConnectionTo">Połączenie Bluetooth do %1$s</string>
|
<string name="bluetoothConnectionTo">Połączenie Bluetooth do \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">Połączenie Bluetooth z %1$s utracone</string>
|
<string name="bluetoothDisconnectFrom">Połączenie Bluetooth z \"%1$s\" utracone</string>
|
||||||
<string name="bluetoothDeviceInRange">Bluetooth device %1$s in range.</string>
|
<string name="bluetoothDeviceInRange">Bluetooth device %1$s in range.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Urządzenie Bluetooth %1$s w zasięgu.</string>
|
<string name="bluetoothDeviceOutOfRange">Urządzenie Bluetooth %1$s w zasięgu.</string>
|
||||||
<string name="anyDevice">dowolne urządzenie</string>
|
<string name="anyDevice">dowolne urządzenie</string>
|
||||||
@@ -768,7 +768,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">Porównania nie uwzględniają wielkości liter</string>
|
<string name="comparisonCaseInsensitive">Porównania nie uwzględniają wielkości liter</string>
|
||||||
<string name="profileWarning">Ustawienia, które możesz tutaj dostosować, mogą sprawić, że nie będziesz już zauważać pewnych rzeczy w swoim telefonie. Mogą nawet wyciszyć budzik. Więc cokolwiek robisz - zdecydowanie zalecamy przetestowanie tego - także po aktualizacjach Androida.</string>
|
<string name="profileWarning">Ustawienia, które możesz tutaj dostosować, mogą sprawić, że nie będziesz już zauważać pewnych rzeczy w swoim telefonie. Mogą nawet wyciszyć budzik. Więc cokolwiek robisz - zdecydowanie zalecamy przetestowanie tego - także po aktualizacjach Androida.</string>
|
||||||
<string name="ifString">jeśli</string>
|
<string name="ifString">jeśli</string>
|
||||||
<string name="contactNotice">E-mail to moja preferowana metoda kontaktu w celu zgłaszania błędów, zadawania pytań lub składania propozycji. Przejdź do centrum sterowania, aby dowiedzieć się więcej.\nNa wiele pytań nie można odpowiedzieć od razu, ale wymagają one pewnych działań technicznych. Prosimy więc o odrobinę cierpliwości. \n\nAlternatywnie masz możliwość zadawania pytań na <a href="https://forum.server47.de">forum</a>.</string>
|
<string name="contactNotice">E-mail to moja preferowana metoda kontaktu w celu zgłaszania błędów, zadawania pytań lub składania propozycji. Przejdź do centrum sterowania, aby dowiedzieć się więcej.\nNa wiele pytań nie można odpowiedzieć od razu, ale wymagają one pewnych działań technicznych. Prosimy więc o odrobinę cierpliwości.\Całkowicie rozumiem chęć ochrony prywatności, ale proszę, byś przynajmniej ujawnił swoje imię, żeby móc przeprowadzić przyjazną rozmowę.\n\nAlternatywnie masz możliwość zadawania pytań na <a href="https://forum.server47.de">forum</a>.</string>
|
||||||
<string name="controlCenter">Centrum kontroli</string>
|
<string name="controlCenter">Centrum kontroli</string>
|
||||||
<string name="sendEmailToDev">Wyślij wiadomość e-mail do programisty</string>
|
<string name="sendEmailToDev">Wyślij wiadomość e-mail do programisty</string>
|
||||||
<string name="screenIs">ekran to %1$s</string>
|
<string name="screenIs">ekran to %1$s</string>
|
||||||
|
|||||||
@@ -389,8 +389,8 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Ошибка чтения местоположений и правил из файла.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Ошибка чтения местоположений и правил из файла.</string>
|
||||||
<string name="noDataChangedReadingAnyway">Похоже, что изменения данных не были сохранены. Однако в памяти могут быть изменения, которые необходимо откатить. Перечитываю файл.</string>
|
<string name="noDataChangedReadingAnyway">Похоже, что изменения данных не были сохранены. Однако в памяти могут быть изменения, которые необходимо откатить. Перечитываю файл.</string>
|
||||||
<string name="bluetoothConnection">Подключение по Bluetooth</string>
|
<string name="bluetoothConnection">Подключение по Bluetooth</string>
|
||||||
<string name="bluetoothConnectionTo">Подключение Bluetooth к %1$s</string>
|
<string name="bluetoothConnectionTo">Подключение Bluetooth к \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">Подключение Bluetooth к %1$s разорвано</string>
|
<string name="bluetoothDisconnectFrom">Подключение Bluetooth к \%1$s\" разорвано</string>
|
||||||
<string name="bluetoothDeviceInRange">Устройство Bluetooth %1$s в диапазоне.</string>
|
<string name="bluetoothDeviceInRange">Устройство Bluetooth %1$s в диапазоне.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Устройство Bluetooth %1$s вне диапазона.</string>
|
<string name="bluetoothDeviceOutOfRange">Устройство Bluetooth %1$s вне диапазона.</string>
|
||||||
<string name="anyDevice">любое устройство</string>
|
<string name="anyDevice">любое устройство</string>
|
||||||
@@ -735,7 +735,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">Сравнения проводятся без учета регистра</string>
|
<string name="comparisonCaseInsensitive">Сравнения проводятся без учета регистра</string>
|
||||||
<string name="profileWarning">Настройки, которые вы можете изменить здесь, могут привести к тому, что вы больше не заметите определенных вещей с вашего телефона. Они могут даже отключить будильник. Так что что бы вы ни делали - рекомендуется это проверять.</string>
|
<string name="profileWarning">Настройки, которые вы можете изменить здесь, могут привести к тому, что вы больше не заметите определенных вещей с вашего телефона. Они могут даже отключить будильник. Так что что бы вы ни делали - рекомендуется это проверять.</string>
|
||||||
<string name="ifString">если</string>
|
<string name="ifString">если</string>
|
||||||
<string name="contactNotice">Электронная почта - мой предпочтительный способ связи, для сообщений об ошибках, вопросов или предложений. Перейдите в центр управления, чтобы узнать больше.\nМногие вопросы не могут быть решены сразу, но требуют некоторых технических исследований. Поэтому, пожалуйста, наберитесь терпения. \n\nВ качестве альтернативы у вас есть возможность задать свои вопросы на <a href="https://forum.server47.de">форуме</a>.</string>
|
<string name="contactNotice">Электронная почта - мой предпочтительный способ связи, для сообщений об ошибках, вопросов или предложений. Перейдите в центр управления, чтобы узнать больше.\nМногие вопросы не могут быть решены сразу, но требуют некоторых технических исследований. Поэтому, пожалуйста, наберитесь терпения.\nЯ полностью понимаю желание защитить вашу приватность, но прошу вас хотя бы раскрыть своё имя для дружеской беседы.\n\nВ качестве альтернативы у вас есть возможность задать свои вопросы на <a href="https://forum.server47.de">форуме</a>.</string>
|
||||||
<string name="controlCenter">Центр управления</string>
|
<string name="controlCenter">Центр управления</string>
|
||||||
<string name="sendEmailToDev">Отправить электронное письмо разработчику</string>
|
<string name="sendEmailToDev">Отправить электронное письмо разработчику</string>
|
||||||
<string name="screenIs">экран %1$s</string>
|
<string name="screenIs">экран %1$s</string>
|
||||||
|
|||||||
@@ -343,7 +343,7 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">从文件中读取位置和规则时出错。</string>
|
<string name="errorReadingPoisAndRulesFromFile">从文件中读取位置和规则时出错。</string>
|
||||||
<string name="noDataChangedReadingAnyway">似乎没有保存过数据更改。但内存中可能有更改需要回滚。正在重新读取文件。</string>
|
<string name="noDataChangedReadingAnyway">似乎没有保存过数据更改。但内存中可能有更改需要回滚。正在重新读取文件。</string>
|
||||||
<string name="bluetoothConnection">蓝牙连接</string>
|
<string name="bluetoothConnection">蓝牙连接</string>
|
||||||
<string name="bluetoothConnectionTo">蓝牙连接到 %1$s</string>
|
<string name="bluetoothConnectionTo">蓝牙连接到 \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">与 %1$s 断开蓝牙连接</string>
|
<string name="bluetoothDisconnectFrom">与 %1$s 断开蓝牙连接</string>
|
||||||
<string name="bluetoothDeviceInRange">蓝牙设备 %1$s 在范围内。</string>
|
<string name="bluetoothDeviceInRange">蓝牙设备 %1$s 在范围内。</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">蓝牙设备 %1$s 不在范围内。</string>
|
<string name="bluetoothDeviceOutOfRange">蓝牙设备 %1$s 不在范围内。</string>
|
||||||
@@ -670,7 +670,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">比较不区分大小写</string>
|
<string name="comparisonCaseInsensitive">比较不区分大小写</string>
|
||||||
<string name="profileWarning">此处的设置可能会导致您无法再注意到手机中的某些内容,甚至可以让您的起床闹钟静音。所以无论怎样设置——强烈建议测试,在 Android 更新之后也要再测试。</string>
|
<string name="profileWarning">此处的设置可能会导致您无法再注意到手机中的某些内容,甚至可以让您的起床闹钟静音。所以无论怎样设置——强烈建议测试,在 Android 更新之后也要再测试。</string>
|
||||||
<string name="ifString">如果</string>
|
<string name="ifString">如果</string>
|
||||||
<string name="contactNotice">电子邮件是向我报告错误、提出问题或建议的首选联系方式。前往控制中心了解更多信息。\n许多问题无法立即解答,需要进行一些技术研究。所以请耐心等待。 \n\n或者,您可以选择在 <a href="https://forum.server47.de">论坛</a>中提问 。</string>
|
<string name="contactNotice">电子邮件是向我报告错误、提出问题或建议的首选联系方式。前往控制中心了解更多信息。\n许多问题无法立即解答,需要进行一些技术研究。所以请耐心等待。\n我完全理解你想保护隐私的冲动,但我请求你至少透露你的名字,以便友好交流。\n\n或者,您可以选择在 <a href="https://forum.server47.de">论坛</a>中提问 。</string>
|
||||||
<string name="controlCenter">控制中心</string>
|
<string name="controlCenter">控制中心</string>
|
||||||
<string name="sendEmailToDev">向开发者发送电子邮件</string>
|
<string name="sendEmailToDev">向开发者发送电子邮件</string>
|
||||||
<string name="screenIs">屏幕 %1$s</string>
|
<string name="screenIs">屏幕 %1$s</string>
|
||||||
|
|||||||
@@ -422,10 +422,10 @@
|
|||||||
<string name="errorReadingPoisAndRulesFromFile">Error reading locations and rules from file.</string>
|
<string name="errorReadingPoisAndRulesFromFile">Error reading locations and rules from file.</string>
|
||||||
<string name="noDataChangedReadingAnyway">It appears no data change has been saved. However there may have been changes in memory that need to be rolled back. Rereading file.</string>
|
<string name="noDataChangedReadingAnyway">It appears no data change has been saved. However there may have been changes in memory that need to be rolled back. Rereading file.</string>
|
||||||
<string name="bluetoothConnection">Bluetooth connection</string>
|
<string name="bluetoothConnection">Bluetooth connection</string>
|
||||||
<string name="bluetoothConnectionTo">Bluetooth connection to %1$s</string>
|
<string name="bluetoothConnectionTo">Bluetooth connection to \"%1$s\"</string>
|
||||||
<string name="bluetoothDisconnectFrom">Bluetooth connection from %1$s torn</string>
|
<string name="bluetoothDisconnectFrom">Bluetooth connection from \"%1$s\" torn</string>
|
||||||
<string name="bluetoothDeviceInRange">Bluetooth device %1$s in range.</string>
|
<string name="bluetoothDeviceInRange">Bluetooth device \"%1$s\" in range.</string>
|
||||||
<string name="bluetoothDeviceOutOfRange">Bluetooth device %1$s out of range.</string>
|
<string name="bluetoothDeviceOutOfRange">Bluetooth device \"%1$s\" out of range.</string>
|
||||||
<string name="anyDevice">any device</string>
|
<string name="anyDevice">any device</string>
|
||||||
<string name="ruleDoesntApplyNotTheCorrectDeviceName" translatable="false">Rule \"%1$s\" doesn\'t apply. Not the correct bluetooth device name.</string>
|
<string name="ruleDoesntApplyNotTheCorrectDeviceName" translatable="false">Rule \"%1$s\" doesn\'t apply. Not the correct bluetooth device name.</string>
|
||||||
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress" translatable="false">Rule \"%1$s\" doesn\'t apply. Not the correct bluetooth device address.</string>
|
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress" translatable="false">Rule \"%1$s\" doesn\'t apply. Not the correct bluetooth device address.</string>
|
||||||
@@ -770,7 +770,7 @@
|
|||||||
<string name="comparisonCaseInsensitive">Comparisons are done case-INsensitive</string>
|
<string name="comparisonCaseInsensitive">Comparisons are done case-INsensitive</string>
|
||||||
<string name="profileWarning">The settings you can adjust here, can cause that you don\'t notice certain things from your phone anymore. They may even silence your wakeup alarm. So whatever you do - it is highly recommended that you test it - also after Android updates.</string>
|
<string name="profileWarning">The settings you can adjust here, can cause that you don\'t notice certain things from your phone anymore. They may even silence your wakeup alarm. So whatever you do - it is highly recommended that you test it - also after Android updates.</string>
|
||||||
<string name="ifString">if</string>
|
<string name="ifString">if</string>
|
||||||
<string name="contactNotice">Email is my preferred method of contact to report bugs, ask questions or make proposals. Go to control center to learn more.\nMany questions cannot be answered straight away, but require some technical research. So please have some patience.\n\nAlternatively you have the option of asking your questions in the <a href="https://forum.server47.de">forum</a>.</string>
|
<string name="contactNotice">Email is my preferred method of contact to report bugs, ask questions or make proposals. Go to control center to learn more.\nMany questions cannot be answered straight away, but require some technical research. So please have some patience.\nI absolutely understand the urge to protect your privacy, but I think you can at least reveal your first name to allow for a friendly conversation.\n\nAlternatively you have the option of asking your questions in the <a href="https://forum.server47.de">forum</a>.</string>
|
||||||
<string name="controlCenter">Control center</string>
|
<string name="controlCenter">Control center</string>
|
||||||
<string name="sendEmailToDev">Send email to developer</string>
|
<string name="sendEmailToDev">Send email to developer</string>
|
||||||
<string name="screenIs">screen is %1$s</string>
|
<string name="screenIs">screen is %1$s</string>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
* Added: Triggers and actions can now be cloned
|
||||||
Reference in New Issue
Block a user