Silent mode bug

This commit is contained in:
jens 2021-12-27 13:58:43 +01:00
parent 41cf907be3
commit 0463e0aa19
9 changed files with 21 additions and 24 deletions

View File

@ -11,8 +11,8 @@ android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy'
versionCode 114
versionName "1.7"
versionCode 115
versionName "1.7.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 114,
"versionName": "1.7-googlePlay",
"versionCode": 115,
"versionName": "1.7.1-googlePlay",
"outputFile": "app-googlePlayFlavor-release.apk"
}
],

View File

@ -687,14 +687,14 @@ public class Actions
AudioManager myAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && desiredSoundSetting == AudioManager.RINGER_MODE_SILENT)
{
AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, AudioManager.FLAG_PLAY_SOUND);
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
}
else
myAudioManager.setRingerMode(desiredSoundSetting);
// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && desiredSoundSetting == AudioManager.RINGER_MODE_SILENT)
// {
// AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
// am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, AudioManager.FLAG_PLAY_SOUND);
// am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
// }
// else
// myAudioManager.setRingerMode(desiredSoundSetting);
}
private static String getIPAddressUsb(final boolean useIPv4)

View File

@ -301,8 +301,7 @@ public class ActivityPermissions extends Activity
public static boolean haveDeviceAdmin()
{
DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
// ComponentName compName = new ComponentName(ActivityPermissions.getInstance(), DeviceAdmin.class ) ;
ComponentName compName = new ComponentName(Miscellaneous.getAnyContext(), DeviceAdmin.class) ;
ComponentName compName = new ComponentName(Miscellaneous.getAnyContext(), DeviceAdmin.class);
boolean active = deviceManger.isAdminActive(compName);
return active;
}
@ -311,11 +310,7 @@ public class ActivityPermissions extends Activity
{
if(!haveDeviceAdmin())
{
// deviceManger.removeActiveAdmin(compName);
// }
// else
// {
DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
// DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName compName = new ComponentName(ActivityPermissions.getInstance(), DeviceAdmin.class) ;
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN );
@ -341,9 +336,6 @@ public class ActivityPermissions extends Activity
addToArrayListUnique("android.permission.RECEIVE_BOOT_COMPLETED", requiredPermissions);
*/
// if (!havePermission(ActivityPermissions.writeExternalStoragePermissionName, workingContext))
// addToArrayListUnique(ActivityPermissions.writeExternalStoragePermissionName, requiredPermissions);
if(!havePermission(Manifest.permission.WRITE_SETTINGS, workingContext))
{
for (Profile profile : Profile.getProfileCollection())
@ -366,9 +358,9 @@ public class ActivityPermissions extends Activity
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
)
{
if (!Miscellaneous.googleToBlameForLocation(true))

View File

@ -0,0 +1 @@
* Behoben: Stumm-Modus konnte nicht geschaltet werden.

View File

@ -0,0 +1 @@
* Fixed: Silent mode did not set on newer phones.

View File

@ -0,0 +1 @@
* Corregido: El modo silencioso no se configuró en los teléfonos más nuevos.

View File

@ -0,0 +1 @@
* Risolto: la modalità silenziosa non è stata impostata sui telefoni più recenti.

View File

@ -0,0 +1 @@
* Opgelost: Stille modus is niet ingesteld op nieuwere telefoons.