Small bugfixes
This commit is contained in:
@@ -524,7 +524,7 @@ public class Action
|
||||
triggerUrl(context);
|
||||
break;
|
||||
case setBluetooth:
|
||||
Actions.setBluetooth(context, getParameter1(), toggleActionIfPossible);
|
||||
boolean result = Actions.setBluetooth(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
case setUsbTethering:
|
||||
Actions.setUsbTethering(context, getParameter1(), toggleActionIfPossible);
|
||||
|
||||
@@ -825,7 +825,7 @@ public class Actions
|
||||
public static Boolean setBluetooth(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Bluetooth", "Changing bluetooth to " + String.valueOf(desiredState), 4);
|
||||
|
||||
// mPhone.setDataEnabled(enable);
|
||||
try
|
||||
{
|
||||
BluetoothAdapter myBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
@@ -841,16 +841,16 @@ public class Actions
|
||||
if (!myBluetoothAdapter.isEnabled() && desiredState)
|
||||
{
|
||||
Toast.makeText(context, context.getResources().getString(R.string.activating) + " Bluetooth.", Toast.LENGTH_LONG).show();
|
||||
myBluetoothAdapter.enable();
|
||||
return true;
|
||||
return myBluetoothAdapter.enable();
|
||||
//return true;
|
||||
}
|
||||
|
||||
// deactivate
|
||||
if (myBluetoothAdapter.isEnabled() && !desiredState)
|
||||
{
|
||||
Toast.makeText(context, context.getResources().getString(R.string.deactivating) + " Bluetooth.", Toast.LENGTH_LONG).show();
|
||||
myBluetoothAdapter.disable();
|
||||
return true;
|
||||
return myBluetoothAdapter.disable();
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
catch (NullPointerException e)
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ActivityMainTabLayout extends TabActivity
|
||||
super.onResume();
|
||||
Miscellaneous.setDisplayLanguage(this);
|
||||
// Miscellaneous.logEvent("i", "NFC", "ActivityMainTabLayout.onResume().", 5);
|
||||
if(!(getIntent().getAction().isEmpty()) && getIntent().getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED))
|
||||
if(!(getIntent().getAction() == null || getIntent().getAction().isEmpty()) && getIntent().getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED))
|
||||
{
|
||||
NfcReceiver.checkIntentForNFC(this, getIntent());
|
||||
moveTaskToBack(true);
|
||||
|
||||
@@ -677,6 +677,8 @@ public class ActivityPermissions extends Activity
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
if(Build.VERSION.SDK_INT >= 31)
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH_CONNECT, requiredPermissions);
|
||||
break;
|
||||
case setDataConnection:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
|
||||
@@ -1414,7 +1414,8 @@ public class Miscellaneous extends Service
|
||||
|
||||
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(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
||||
builder.setSmallIcon(R.drawable.crane);
|
||||
|
||||
@@ -685,7 +685,7 @@
|
||||
<string name="unlocked">ontgrendeld</string>
|
||||
<string name="selectDesiredState">Selecteer de gewenste status</string>
|
||||
<string name="screenState">Schermstatus</string>
|
||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Vanwege de oneindige wijsheid van Google is de laatste Android-versie waarvan bekend is dat deze functie werkt% 1 $ s. U kunt het configureren, maar het zal waarschijnlijk geen effect hebben.</string>
|
||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Vanwege de oneindige wijsheid van Google is de laatste Android-versie waarvan bekend is dat deze functie werkt %1$s. U kunt het configureren, maar het zal waarschijnlijk geen effect hebben.</string>
|
||||
<string name="actionMediaControl">Het afspelen van media regelen</string>
|
||||
<string name="selectCommand">Opdracht Selecteren</string>
|
||||
<string name="playPause">schakelaar afspelen/pauzeren</string>
|
||||
|
||||
Reference in New Issue
Block a user