mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #4335 from deltachat/adb/re-enable-full-screen-intent-perm
get calls out of experimental
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Delta Chat Android Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
* Better incoming call system integration
|
||||
* Calls are not experimental anymore and don't need to be manually enabled
|
||||
|
||||
## v2.49.0
|
||||
2026-04
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
||||
|
||||
<application>
|
||||
<service
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
||||
|
||||
<!-- normal/instant permissions - adding them here is enough -->
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
|
||||
@@ -534,8 +534,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
menu.findItem(R.id.menu_start_call)
|
||||
.setVisible(
|
||||
Prefs.isCallsEnabled(this)
|
||||
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
|
||||
&& dcChat.canSend()
|
||||
&& dcChat.isEncrypted()
|
||||
&& !dcChat.isSelfTalk()
|
||||
|
||||
@@ -1358,10 +1358,8 @@ public class CallCoordinator implements DcEventCenter.DcEventDelegate {
|
||||
}
|
||||
|
||||
// Check full screen intent permission on Android 14+
|
||||
boolean canUseFullScreen = false;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
canUseFullScreen = canUseFullScreenIntent();
|
||||
if (!canUseFullScreen) {
|
||||
if (!canUseFullScreenIntent()) {
|
||||
Log.w(TAG, "Full screen intent permission not granted, notification will appear normally");
|
||||
}
|
||||
}
|
||||
@@ -1402,7 +1400,7 @@ public class CallCoordinator implements DcEventCenter.DcEventDelegate {
|
||||
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
Notification.Builder builder;
|
||||
if (canUseFullScreen && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
// Android 12+, CallStyle
|
||||
Person caller =
|
||||
new Person.Builder().setName(callerName).setIcon(callerIcon).setImportant(true).build();
|
||||
|
||||
@@ -187,24 +187,6 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment
|
||||
});
|
||||
}
|
||||
|
||||
Preference callsEnabled = this.findPreference("pref_calls_enabled");
|
||||
if (callsEnabled != null) {
|
||||
callsEnabled.setOnPreferenceChangeListener(
|
||||
(preference, newValue) -> {
|
||||
if ((Boolean) newValue) {
|
||||
new AlertDialog.Builder(requireActivity())
|
||||
.setTitle("Thanks for helping to debug \"Calls\"!")
|
||||
.setMessage(
|
||||
"• You can now debug calls using the \"phone\" icon in one-to-one-chats\n\n"
|
||||
+ "• The experiment is about making decentralised calls work and reliable at all, not about options or UI. We're happy about focused feedback at support.delta.chat\n\n")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
selfReportingCheckbox = this.findPreference("pref_stats_sending");
|
||||
if (selfReportingCheckbox != null) {
|
||||
selfReportingCheckbox.setOnPreferenceChangeListener(
|
||||
|
||||
@@ -202,10 +202,6 @@ public class Prefs {
|
||||
return getBooleanPreference(context, "pref_new_broadcast_list", false);
|
||||
}
|
||||
|
||||
public static boolean isCallsEnabled(Context context) {
|
||||
return getBooleanPreference(context, "pref_calls_enabled", false);
|
||||
}
|
||||
|
||||
// ringtone
|
||||
|
||||
public static @NonNull Uri getNotificationRingtone(Context context) {
|
||||
|
||||
@@ -30,11 +30,6 @@
|
||||
android:summary="@string/pref_experimental_features_explain"
|
||||
android:selectable="false" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_calls_enabled"
|
||||
android:title="Debug Calls" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_new_broadcast_list"
|
||||
|
||||
Reference in New Issue
Block a user