Compare commits

..

No commits in common. "98b49036a7fd01bec5cbb6ac114524f268312932" and "cf500c740edf1a2b0487e274959611946e656b9b" have entirely different histories.

10 changed files with 23 additions and 81 deletions

View File

@ -65,6 +65,7 @@
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/> <uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/> <uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<application <application
android:allowBackup="true" android:allowBackup="true"

View File

@ -380,13 +380,7 @@ public class ActivityManageActionStartActivity extends Activity
int targetSdkVersion = getApplicationContext().getApplicationInfo().targetSdkVersion; int targetSdkVersion = getApplicationContext().getApplicationInfo().targetSdkVersion;
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && targetSdkVersion >= 30 && !ActivityPermissions.havePermission(Manifest.permission.QUERY_ALL_PACKAGES, ActivityManageActionStartActivity.this))// && shouldShowRequestPermissionRationale(Manifest.permission.QUERY_ALL_PACKAGES)) if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && targetSdkVersion >= 30 && !ActivityPermissions.havePermission(Manifest.permission.QUERY_ALL_PACKAGES, ActivityManageActionStartActivity.this))// && shouldShowRequestPermissionRationale(Manifest.permission.QUERY_ALL_PACKAGES))
{ {
if(BuildConfig.FLAVOR.equals("googlePlayFlavor")) requestPermissions(new String[] {Manifest.permission.QUERY_ALL_PACKAGES}, requestCodeForRequestQueryAllPackagesPermission);
{
// This ain't possible anymore.
Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.featureNotInGooglePlayVersion) + Miscellaneous.lineSeparator + Miscellaneous.lineSeparator + getResources().getString(R.string.startActivityInsertManually), ActivityManageActionStartActivity.this).show();
}
else
requestPermissions(new String[] {Manifest.permission.QUERY_ALL_PACKAGES}, requestCodeForRequestQueryAllPackagesPermission);
} }
else else
getAppList(); getAppList();

View File

@ -10,13 +10,13 @@ import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.EditText; import android.widget.EditText;
import android.widget.RadioButton; import android.widget.RadioButton;
import android.widget.TextView;
import android.widget.TimePicker; import android.widget.TimePicker;
import android.widget.Toast; import android.widget.Toast;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.sql.Time; import java.sql.Time;
import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
@ -27,7 +27,6 @@ public class ActivityManageTriggerTimeFrame extends Activity
CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday, chkRepeat; CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday, chkRepeat;
RadioButton radioTimeFrameEntering, radioTimeFrameLeaving; RadioButton radioTimeFrameEntering, radioTimeFrameLeaving;
EditText etRepeatEvery; EditText etRepeatEvery;
TextView tvDaysHint;
static Trigger editedTimeFrameTrigger = null; static Trigger editedTimeFrameTrigger = null;
@ -54,7 +53,6 @@ public class ActivityManageTriggerTimeFrame extends Activity
radioTimeFrameLeaving = (RadioButton)findViewById(R.id.radioTimeFrameLeaving); radioTimeFrameLeaving = (RadioButton)findViewById(R.id.radioTimeFrameLeaving);
chkRepeat = (CheckBox)findViewById(R.id.chkRepeat); chkRepeat = (CheckBox)findViewById(R.id.chkRepeat);
etRepeatEvery = (EditText)findViewById(R.id.etRepeatEvery); etRepeatEvery = (EditText)findViewById(R.id.etRepeatEvery);
tvDaysHint = (TextView)findViewById(R.id.tvDaysHint);
bSaveTimeFrame.setOnClickListener(new OnClickListener() bSaveTimeFrame.setOnClickListener(new OnClickListener()
{ {
@ -183,31 +181,6 @@ public class ActivityManageTriggerTimeFrame extends Activity
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(editedTimeFrameTrigger.getTriggerParameter2())); editedTimeFrameTrigger.setTimeFrame(new TimeFrame(editedTimeFrameTrigger.getTriggerParameter2()));
loadVariableIntoGui(); loadVariableIntoGui();
} }
TimePicker.OnTimeChangedListener pickerListener = new TimePicker.OnTimeChangedListener()
{
@Override
public void onTimeChanged(TimePicker timePicker, int i, int i1)
{
if(
startPicker.getCurrentHour() > stopPicker.getCurrentHour()
||
(
startPicker.getCurrentHour() == stopPicker.getCurrentHour()
&&
startPicker.getCurrentMinute() >= stopPicker.getCurrentMinute()
)
)
tvDaysHint.setText(getResources().getString(R.string.timeFrameDaysHint));
else
tvDaysHint.setText("");
}
};
startPicker.setOnTimeChangedListener(pickerListener);
stopPicker.setOnTimeChangedListener(pickerListener);
// Perform check once
pickerListener.onTimeChanged(null, 0, 0);
} }
private void loadVariableIntoGui() private void loadVariableIntoGui()

View File

@ -925,24 +925,20 @@ public class Trigger
if( if(
// Regular case, start time is lower than end time // Regular case, start time is lower than end time
( (
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0 Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
&& &&
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0 Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0
)
||
// Other case, start time higher than end time, timeframe goes over midnight
(
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) < 0
&&
(Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
||
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0)
)
||
// further case: start and end times are identical, meaning a 24h window
(
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) == 0
) )
|
// Other case, start time higher than end time, timeframe goes over midnight
(
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) < 0
&&
(Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
||
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0)
)
) )
{ {
// We are in the timeframe // We are in the timeframe

View File

@ -71,19 +71,12 @@
android:layout_margin="10dp" android:layout_margin="10dp"
android:background="#aa000000" /> android:background="#aa000000" />
<TextView <TextView
android:id="@+id/tvCurrentNfcIdValue" android:id="@+id/tvCurrentNfcIdValue"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/timeFrameWhichDays" android:text="@string/timeFrameWhichDays"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/tvDaysHint"
android:layout_marginVertical="@dimen/default_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/red" />
<CheckBox <CheckBox
android:id="@+id/checkMonday" android:id="@+id/checkMonday"

View File

@ -701,9 +701,6 @@
<string name="profileXrequiresThis">Profil \"%1$s\" benötigt dies.</string> <string name="profileXrequiresThis">Profil \"%1$s\" benötigt dies.</string>
<string name="lastProfile">Letztes Profil:</string> <string name="lastProfile">Letztes Profil:</string>
<string name="queryAllPackages">Liste von installierten Anwendungen auslesen</string> <string name="queryAllPackages">Liste von installierten Anwendungen auslesen</string>
<string name="timeFrameDaysHint">Wenn Sie ein Zeitfenster verwenden, das sich über Mitternacht erstreckt, müssen Sie auch den Folgetag auswählen, wenn der Auslöser auch nach Mitternacht noch auslösen soll.</string>
<string name="featureNotInGooglePlayVersion">Diese Funktion ist in der Google Play-Version nicht mehr verfügbar.\n\nHin und wieder schikaniert Google Entwickler. Wenn Sie bestimmte Funktionen weiterhin verwenden möchten, müssen Sie Unterlagen einreichen. Leider besteht eine 99% ige Chance, dass der Papierkram abgelehnt wird. Es ist so ziemlich wie im Asterix-Comic/Film.\n\nIch habe in der Vergangenheit Wochen damit verbracht, mit ihnen über solche Fälle zu streiten, aber ich bekam immer wieder Ablehnungen - entweder von Bots oder von Leuten, die ungefähr so intelligent sind wie Bots. Ich kann mich dann nur entscheiden, ob die App vollständig aus dem Play Store fliegen soll oder die Funktion aus der Play Store Version entfernen.\n\nBitte erwägen Sie, die APK-Version von meiner Website oder die von F-Droid zu verwenden, wenn Sie diese Funktionen benötigen.</string>
<string name="startActivityInsertManually">Diese Einschränkung betrifft nur die Auswahl einer App, nicht den eigentlichen Start. So können Sie den Namen einer Anwendung immer noch manuell eingeben, falls Sie ihn kennen.</string>
<string name="serviceStarts">Dienst startet</string> <string name="serviceStarts">Dienst startet</string>
<string name="deviceStarts">Gerät startet</string> <string name="deviceStarts">Gerät startet</string>
<string name="deviceHasJustStarted">Gerät ist gerade gestartet</string> <string name="deviceHasJustStarted">Gerät ist gerade gestartet</string>

View File

@ -700,9 +700,6 @@
<string name="profileXrequiresThis">El perfil \"%1$s\" requiere esto.</string> <string name="profileXrequiresThis">El perfil \"%1$s\" requiere esto.</string>
<string name="lastProfile">Último perfil:</string> <string name="lastProfile">Último perfil:</string>
<string name="queryAllPackages">Obtener una lista de las aplicaciones instaladas</string> <string name="queryAllPackages">Obtener una lista de las aplicaciones instaladas</string>
<string name="timeFrameDaysHint">Si utiliza un marco de tiempo que se extiende más allá de la medianoche, también debe seleccionar el día siguiente si desea que la condición se aplique después de la medianoche.</string>
<string name="featureNotInGooglePlayVersion">Esta función ya no está disponible en la versión de Google Play.\n\nTodo de vez en cuando Google intimida a los desarrolladores. Si desea seguir utilizando ciertas funciones, debe presentar documentos. Desafortunadamente, hay un 99% de posibilidades de que el papeleo sea rechazado. Es más o menos como en el cómic/la película de Astérix.\n\nHe pasado semanas discutiendo con ellos sobre casos como ese en el pasado, pero seguí recibiendo rechazos, ya sea por bots o personas que son tan inteligentes como los bots. En el puedo decidir entre que la aplicación se elimine de Play Store por completo o eliminar la función.\n\nPor favor, considere usar la versión APK de mi sitio web o la de F-Droid si necesita esas características.</string>
<string name="startActivityInsertManually">Esta limitación se refiere solo a la selección de una aplicación, no al inicio real. Por lo tanto, aún puede ingresar el nombre de una aplicación manualmente si lo conoce.</string>
<string name="deviceStarts">Dispositivo esta enciendo</string> <string name="deviceStarts">Dispositivo esta enciendo</string>
<string name="serviceStarts">Servicio esta enciendo</string> <string name="serviceStarts">Servicio esta enciendo</string>
<string name="deviceHasJustStarted">el dispositivo justamente ha encendido</string> <string name="deviceHasJustStarted">el dispositivo justamente ha encendido</string>

View File

@ -701,9 +701,6 @@
<string name="locationNotWorkingOn12">Ottenere la posizione non sembra funzionare su dispositivi Android 12 al momento. Se non funziona per te, mi dispiace. Cercherò di risolvere questo problema non appena conoscerò la causa. Quindi, se cerchio rotante non smette di girare, sai perché.</string> <string name="locationNotWorkingOn12">Ottenere la posizione non sembra funzionare su dispositivi Android 12 al momento. Se non funziona per te, mi dispiace. Cercherò di risolvere questo problema non appena conoscerò la causa. Quindi, se cerchio rotante non smette di girare, sai perché.</string>
<string name="lastProfile">Ultimo profilo:</string> <string name="lastProfile">Ultimo profilo:</string>
<string name="queryAllPackages">Ottenere un elenco delle applicazioni installate</string> <string name="queryAllPackages">Ottenere un elenco delle applicazioni installate</string>
<string name="timeFrameDaysHint">Se si utilizza un intervallo di tempo che si estende oltre la mezzanotte, è necessario selezionare anche il giorno successivo se si desidera che il trigger venga applicato dopo la mezzanotte.</string>
<string name="featureNotInGooglePlayVersion">Questa funzione non è più disponibile nella versione di Google Play.\\n\\nOltre di tanto in tanto Google bullizza gli sviluppatori. Se si desidera continuare a utilizzare determinate funzionalità, è necessario archiviare i documenti. Sfortunatamente c\'è una probabilità del 99% che i documenti vengano rifiutati. È più o meno come nel fumetto / film di Asterix.\\n\\nHo passato settimane a discutere con loro su casi del genere in passato, ma ho continuato a ricevere rifiuti - sia da bot che da persone che sono intelligenti come i bot. Nella sezione Posso decidere se l\'app viene rimossa completamente dal Play Store o rimuovere la funzione.\\nConsigliare l\'utilizzo della versione APK dal mio sito Web o quella di F-Droid se sono necessarie tali funzionalità.</string>
<string name="startActivityInsertManually">Questa limitazione riguarda solo la selezione di un\'app, non l\'avvio effettivo. Quindi puoi comunque inserire manualmente il nome di un\'applicazione se lo conosci.</string>
<string name="deviceStarts">Device starts</string> <string name="deviceStarts">Device starts</string>
<string name="serviceStarts">Avvio del servizio</string> <string name="serviceStarts">Avvio del servizio</string>
<string name="deviceHasJustStarted">Il dispositivo è appena stato avviato</string> <string name="deviceHasJustStarted">Il dispositivo è appena stato avviato</string>

View File

@ -699,9 +699,6 @@
<string name="profileXrequiresThis">Profiel \"%1$s\" vereist dit.</string> <string name="profileXrequiresThis">Profiel \"%1$s\" vereist dit.</string>
<string name="lastProfile">Laatste profiel:</string> <string name="lastProfile">Laatste profiel:</string>
<string name="queryAllPackages">Een lijst met geïnstalleerde toepassingen ophalen</string> <string name="queryAllPackages">Een lijst met geïnstalleerde toepassingen ophalen</string>
<string name="timeFrameDaysHint">Als u een tijdsbestek gebruikt dat zich uitstrekt over middernacht, moet u ook de volgende dag selecteren als u wilt dat de trigger na middernacht van toepassing is.</string>
<string name="featureNotInGooglePlayVersion">Deze functie is niet meer beschikbaar in de Google Play-versie.\\n\\nAlles af en toe pest Google ontwikkelaars. Als u bepaalde functies wilt blijven gebruiken, moet u papierwerk indienen. Helaas is er een kans van 99% dat het papierwerk wordt afgewezen. Het is vrijwel net als in de Asterix-strip / film.\\n\\nIk heb in het verleden wekenlang met hen gediscussieerd over dergelijke gevallen, maar ik bleef afwijzingen krijgen - hetzij door bots of mensen die ongeveer net zo intelligent zijn als bots. In de ik kan kiezen tussen de app die volledig uit de Play Store wordt verwijderd of de functie verwijdert.\\n Overweeg de APK-versie van mijn website of die van F-Droid te gebruiken als je die functies nodig hebt.</string>
<string name="startActivityInsertManually">Deze beperking heeft alleen betrekking op de selectie van een app, niet op de daadwerkelijke start. U kunt dus nog steeds handmatig de naam van een toepassing invoeren als u deze kent.</string>
<string name="deviceHasJustStarted">apparaat is net gestart</string> <string name="deviceHasJustStarted">apparaat is net gestart</string>
<string name="serviceHasJustStarted">service is net begonnen</string> <string name="serviceHasJustStarted">service is net begonnen</string>
<string name="serviceStarts">Service start</string> <string name="serviceStarts">Service start</string>

View File

@ -797,9 +797,6 @@
<string name="locationNotWorkingOn12">Getting the location does not seem to be working on Android 12 devices currently. If it isn\'t working for you, I\'m sorry. I\'ll try to fix this as soon as I know the cause. So if the donut doesn\'t stop spinning, you know why.</string> <string name="locationNotWorkingOn12">Getting the location does not seem to be working on Android 12 devices currently. If it isn\'t working for you, I\'m sorry. I\'ll try to fix this as soon as I know the cause. So if the donut doesn\'t stop spinning, you know why.</string>
<string name="lastProfile">Last profile:</string> <string name="lastProfile">Last profile:</string>
<string name="queryAllPackages">Get a list of installed applications</string> <string name="queryAllPackages">Get a list of installed applications</string>
<string name="timeFrameDaysHint">If you use a timeframe that stretches over midnight you need to select the following day as well if you want the trigger to apply after midnight.</string>
<string name="featureNotInGooglePlayVersion">This feature is not available in the Google Play version anymore.\n\nEvery now and then Google bullies developers. If you want to keep using certain features you have to file paperwork. Unfortunately there\'s a 99% chance that the paperwork gets rejected. It\'s pretty much like in the Asterix comic/movie.\n\nI\'ve spent weeks arguing with them about cases like that in the past, but I kept getting rejections - either by bots or people who are about as intelligent as bots. In the I can decide between the app being removed from the Play Store entirely or remove the feature.\nPlease consider using the APK version from my website or the one from F-Droid if you need those features.</string>
<string name="startActivityInsertManually">This limitation concerns only the selection of an app, not the actual start. So you can still enter the name of an application manually if you know it.</string>
<string name="deviceStarts">Device starts</string> <string name="deviceStarts">Device starts</string>
<string name="serviceStarts">Service starts</string> <string name="serviceStarts">Service starts</string>
<string name="deviceHasJustStarted">device has just started</string> <string name="deviceHasJustStarted">device has just started</string>