Skip to content

Commit 6c28e64

Browse files
programminghoch10binarynoise
authored andcommitted
Implement EnableCallRecording
1 parent 4869593 commit 6c28e64

File tree

7 files changed

+89
-0
lines changed

7 files changed

+89
-0
lines changed

EnableCallRecording/Readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# EnableCallRecord
2+
3+
Enable Call Recording independent of location. Please remember this might be illegal in your country.
4+
5+
Developed and tested on LineageOS.
6+
Only the stock LineageOS Dialer is supported.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
plugins {
2+
alias(libs.plugins.buildlogic.android.application)
3+
}
4+
5+
android {
6+
namespace = "com.programminghoch10.EnableCallRecord"
7+
8+
defaultConfig {
9+
minSdk = 27
10+
targetSdk = 35
11+
}
12+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
5+
<application android:label="EnableCallRecording">
6+
<meta-data
7+
android:name="xposedmodule"
8+
android:value="true"
9+
/>
10+
<meta-data
11+
android:name="xposeddescription"
12+
android:value="Enable Call Recording independent of country."
13+
/>
14+
<meta-data
15+
android:name="xposedminversion"
16+
android:value="53"
17+
/>
18+
<meta-data
19+
android:name="xposedscope"
20+
android:resource="@array/scope"
21+
/>
22+
</application>
23+
24+
</manifest>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.programminghoch10.EnableCallRecording.Hook
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.programminghoch10.EnableCallRecording;
2+
3+
import android.content.Context;
4+
5+
import java.util.Objects;
6+
7+
import com.programminghoch10.EnableCallRecord.BuildConfig;
8+
import de.robv.android.xposed.IXposedHookLoadPackage;
9+
import de.robv.android.xposed.XC_MethodReplacement;
10+
import de.robv.android.xposed.XposedHelpers;
11+
import de.robv.android.xposed.callbacks.XC_LoadPackage;
12+
13+
public class Hook implements IXposedHookLoadPackage {
14+
@Override
15+
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
16+
if (Objects.equals(lpparam.packageName, BuildConfig.APPLICATION_ID)) return;
17+
if (!Objects.equals(lpparam.packageName, "com.android.dialer")) return;
18+
19+
XposedHelpers.findAndHookMethod(
20+
"com.android.dialer.callrecord.impl.CallRecorderService",
21+
lpparam.classLoader,
22+
"isEnabled",
23+
Context.class,
24+
XC_MethodReplacement.returnConstant(true)
25+
);
26+
XposedHelpers.findAndHookMethod(
27+
"com.android.incallui.call.CallRecorder",
28+
lpparam.classLoader,
29+
"isEnabled",
30+
XC_MethodReplacement.returnConstant(true)
31+
);
32+
XposedHelpers.findAndHookMethod(
33+
"com.android.incallui.call.CallRecorder",
34+
lpparam.classLoader,
35+
"canRecordInCurrentCountry",
36+
XC_MethodReplacement.returnConstant(true)
37+
);
38+
}
39+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string-array name="scope">
4+
<item>com.android.dialer</item>
5+
</string-array>
6+
</resources>

modules.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ include(":BetterVerboseWiFiLogging")
88
include(":ClassHunter")
99
include(":CodecMod")
1010
include(":DontResetIfBootedAndConnected")
11+
include(":EnableCallRecording")
1112
include(":FreeNotifications")
1213
include(":KeepSplitScreenRatio")
1314
include(":MotionEventMod")

0 commit comments

Comments
 (0)