[Google Pixel 6 Pro] 96carboard:
Here is a build of AOSP12r14

This is SD1A.210817.037

{Mod edit: Link removed}

Run flash-base.sh from the corresponding factory image to update bootloader and radio if you like.

Use "fastboot update" to install.

Very minor changes from pure AOSP;

1) selinux is permissive because I haven't got around to fixing a glitch.

2) Dialer/Messaging/Contacts have selective picks from lineageos for dark mode.

3) Dialer includes automatic call recording per the following;

From 945c17eabfdf9f108b26eda3d54266c0a2255234 Mon Sep 17 00:00:00 2001
Date: Mon, 8 Nov 2021 14:17:51 -0500
Subject: [PATCH] Automatic call recording

Change-Id: Icdb26fa6729e6a13dc6190a42dc75453900a6345
---
.../dialer/app/res/values/cm_strings.xml | 2 ++
.../dialer/app/res/xml/sound_settings.xml | 5 ++++
.../dialer/callrecord/res/values/config.xml | 4 +--
.../android/incallui/CallButtonPresenter.java | 30 +++++++++++++++++--
4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
index 1dcdb2b81..3f7602d44 100644
--- a/java/com/android/dialer/app/res/values/cm_strings.xml
+++ b/java/com/android/dialer/app/res/values/cm_strings.xml
@@ -38,6 +38,8 @@
<string name="call_recording_format">Audio format</string>
<string name="wb_amr_format" translatable="false">AMR-WB</string>
<string name="aac_format" translatable="false">AAC</string>
+ <string name="auto_call_recording_title">Auto call recording</string>
+ <string name="auto_call_recording_key" translatable="false">auto_call_recording</string>

<string name="call_via">Call via</string>
<string name="call_via_dialog_title">Call via\u2026</string>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index aa025874f..d31ea9e5c 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -83,6 +83,11 @@
android:entryValues="@array/call_recording_encoder_values"
android:defaultValue="0" />

+ <SwitchPreference
+ android:defaultValue="false"
+ android:key="@string/auto_call_recording_key"
+ android:title="@string/auto_call_recording_title"/>
+
</PreferenceCategory>

</PreferenceScreen>
diff --git a/java/com/android/dialer/callrecord/res/values/config.xml b/java/com/android/dialer/callrecord/res/values/config.xml
index 7aabd6cac..2832c87bc 100644
--- a/java/com/android/dialer/callrecord/res/values/config.xml
+++ b/java/com/android/dialer/callrecord/res/values/config.xml
@@ -16,8 +16,8 @@
-->

<resources>
- <bool name="call_recording_enabled">false</bool>
+ <bool name="call_recording_enabled">true</bool>
<!-- 1 (MIC) for microphone audio source (default)
4 (VOICE_CALL) if supported by device for voice call uplink + downlink audio source -->
- <integer name="call_recording_audio_source">1</integer>
+ <integer name="call_recording_audio_source">4</integer>
</resources>
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index 0fa833edd..175fe7cc2 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
+import android.os.Handler;
import android.os.Trace;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
@@ -74,6 +75,7 @@ public class CallButtonPresenter
private DialerCall call;
private boolean isInCallButtonUiReady;
private PhoneAccountHandle otherAccount;
+ private boolean isRecording = false;

private CallRecorder.RecordingProgressListener recordingProgressListener =
new CallRecorder.RecordingProgressListener() {
@@ -114,6 +116,11 @@ public class CallButtonPresenter

CallRecorder recorder = CallRecorder.getInstance();
recorder.addRecordingProgressListener(recordingProgressListener);
+ if(recorder.isRecording()){
+ inCallButtonUi.setCallRecordingState(true);
+ } else {
+ inCallButtonUi.setCallRecordingState(false);
+ }

// Update the buttons state immediately for the current call
onStateChange(InCallState.NO_CALLS, inCallPresenter.getInCallState(), CallList.getInstance());
@@ -144,6 +151,8 @@ public class CallButtonPresenter
@Override
public void onStateChange(InCallState oldState, InCallState newState, CallList callList) {
Trace.beginSection("CallButtonPresenter.onStateChange");
+ CallRecorder recorder = CallRecorder.getInstance();
+ boolean isEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.auto_call_recording_key), false);
if (call != null) {
call.removeListener(this);
}
@@ -152,6 +161,16 @@ public class CallButtonPresenter
} else if (newState == InCallState.INCALL) {
call = callList.getActiveOrBackgroundCall();

+ if (!isRecording && isEnabled && call != null) {
+ isRecording = true;
+ new Handler().postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ callRecordClicked(true);
+ }
+ }, 500);
+ }
+
// When connected to voice mail, automatically shows the dialpad.
// (On previous releases we showed it when in-call shows up, before waiting for
// OUTGOING. We may want to do that once we start showing "Voice mail" label on
@@ -167,6 +186,9 @@ public class CallButtonPresenter
}
call = callList.getIncomingCall();
} else {
+ if (isEnabled && recorder.isRecording()) {
+ recorder.finishRecording();
+ }
call = null;
}

@@ -337,6 +359,7 @@ public class CallButtonPresenter
public void callRecordClicked(boolean checked) {
CallRecorder recorder = CallRecorder.getInstance();
if (checked) {
+ /*
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean warningPresented = prefs.getBoolean(KEY_RECORDING_WARNING_PRESENTED, false);
if (!warningPresented) {
@@ -354,6 +377,10 @@ public class CallButtonPresenter
} else {
startCallRecordingOrAskForPermission();
}
+ */
+ if(!recorder.isRecording()) {
+ startCallRecordingOrAskForPermission();
+ }
} else {
if (recorder.isRecording()) {
recorder.finishRecording();
@@ -566,8 +593,7 @@ public class CallButtonPresenter
&& call.getState() != DialerCallState.CONNECTING;

final CallRecorder recorder = CallRecorder.getInstance();
- final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
- && !isVideo && call.getState() == DialerCallState.ACTIVE;
+ final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;

otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle());
boolean showSwapSim =
--
2.27.0