No aprs when in freedv

aprs
sh123 2022-08-11 16:46:31 +03:00
rodzic 863fa37517
commit 7a685a5690
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -474,7 +474,7 @@ public class MainActivity extends AppCompatActivity implements ServiceConnection
}
// aprs
boolean aprsEnabled = _sharedPreferences.getBoolean(PreferenceKeys.APRS_ENABLED, false);
boolean aprsEnabled = SettingsWrapper.isAprsEnabled(_sharedPreferences);
if (aprsEnabled) {
status += getString(R.string.aprs_label);
@ -526,7 +526,7 @@ public class MainActivity extends AppCompatActivity implements ServiceConnection
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
boolean isAprsEnabled = _sharedPreferences.getBoolean(PreferenceKeys.APRS_ENABLED, false);
boolean isAprsEnabled = SettingsWrapper.isAprsEnabled(_sharedPreferences);
menu.setGroupVisible(R.id.group_aprs, isAprsEnabled);
return true;
}

Wyświetl plik

@ -76,6 +76,7 @@ public class SettingsWrapper {
}
public static boolean isAprsEnabled(SharedPreferences sharedPreferences) {
return sharedPreferences.getBoolean(PreferenceKeys.APRS_ENABLED, false);
return sharedPreferences.getBoolean(PreferenceKeys.APRS_ENABLED, false) &&
!isFreeDvSoundModemModulation(sharedPreferences); // no aprs when in freedv
}
}