Compare commits

...
Author SHA1 Message Date
jens 72040b54ae send emails 2026-10-03 18:08:22 +02:00
jens ab2b0ce34c Removed contacts permission from Google Play version 2026-10-03 17:00:11 +02:00
7 changed files with 45 additions and 6 deletions
+4 -2
View File
@@ -61,12 +61,12 @@ android {
lint {
abortOnError false
checkReleaseBuilds false
}
dependencies }
namespace 'com.jens.automation2'
buildToolsVersion '36.0.0'
}
dependencies {
{
implementation 'org.jetbrains:annotations:26.1.0'
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:20.0.0'
@@ -77,6 +77,8 @@ dependencies {
implementation 'com.linkedin.dexmaker:dexmaker:2.28.6'
implementation 'org.apache.commons:commons-lang3:3.20.0'
implementation 'org.simplejavamail:simple-java-mail:9.3.5'
//implementation "androidx.security:security-crypto:1.0.0"
//implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
implementation 'androidx.appcompat:appcompat:1.4.2'
+3 -1
View File
@@ -60,7 +60,9 @@
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<!--
Removed due to latest threat mail from Google:
<uses-permission android:name="android.permission.READ_CONTACTS"/>-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
@@ -2675,4 +2675,32 @@ public class Actions
android.provider.Settings.Secure.putString(context.getContentResolver(), android.provider.Settings.Secure.LOCATION_MODE, String.valueOf(desiredState));
}
public static sendEmail()
{
Properties props = new Properties();
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.port", "587");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.connectiontimeout", "10000");
props.put("mail.smtp.timeout", "10000");
Session session = Session.getInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(fromAddress));
message.setRecipients(
Message.RecipientType.TO,
InternetAddress.parse(recipientAddress)
);
message.setSubject(subject);
message.setText(body);
Transport.send(message);
}
}
@@ -102,6 +102,12 @@ public class ActivityManageTriggerPhoneCall extends Activity
@Override
public void onClick(View view)
{
if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
{
Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.featureNotInGooglePlayVersion), ActivityManageTriggerPhoneCall.this).show();
return;
}
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !ActivityPermissions.havePermission("android.permission.READ_CONTACTS", ActivityManageTriggerPhoneCall.this))
{
requestPermissions("android.permission.READ_CONTACTS");
@@ -469,7 +469,7 @@ public class AutomationService extends Service implements OnInitListener
if(displayNotification)
{
Intent intent = new Intent(AutomationService.this, ActivityPermissions.class);
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, FLAG_IMMUTABLE);
Miscellaneous.logEvent("w", "Features disabled", "Features disabled because of rule " + rule, 5);
+1 -1
View File
@@ -698,7 +698,7 @@
<string name="bottom">Bottom</string>
<string name="tabsPlacement">Position of tab bar</string>
<string name="tabsPlacementSummary">Choose where the tabs bar should be placed.</string>
<string name="wifiApi30">Because Google screwed up yet another part of Android, starting with API 30 only the currently visible wifis can be displayed, not all the ones your device has connected to anymore.</string>
<string name="wifiApi30">Because Google screwed up yet another part of Android, starting with API 30 only the currently visible Wi-Fi can be displayed, not all the ones your device has connected to anymore.</string>
<string name="silentTriggersDnd">REMARK: The silent mode often triggers Do-Not-Disturb on newer devices. If that happens on your device, I recommend using the normal mode instead and lowering all volumes to zero.</string>
<string name="tones">Tones</string>
<string name="miscellaneous">Miscellaneous</string>
@@ -1,3 +1,4 @@
* Added: Triggers and actions can now be cloned
* Added: URL checker for triggerUrl action
* Fixed: Crash when starting to add/edit a triggerURL action while the app or the system are set to the German language
* Fixed: Crash when starting service in Google Play version