Skip to content

Commit 1072508

Browse files
committed
adv: fix some issues
1 parent 6ad7ecc commit 1072508

File tree

5 files changed

+97
-32
lines changed

5 files changed

+97
-32
lines changed

adv-build.sh

+27-4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ ROM types:
9191
aosp90
9292
aospa81
9393
aospa90
94+
aosip81
95+
aosip90
9496
carbon81
9597
carbon90
9698
e-1.0
@@ -164,6 +166,20 @@ function get_rom_type() {
164166
treble_generate=""
165167
extra_make_options=""
166168
;;
169+
aosip81)
170+
mainrepo="https://github.com/AOSiP/platform_manifest.git"
171+
mainbranch="oreo-mr1"
172+
localManifestBranch="android-8.1"
173+
treble_generate="aosip"
174+
extra_make_options=""
175+
;;
176+
aosip90)
177+
mainrepo="https://github.com/AOSiP/platform_manifest.git"
178+
mainbranch="pie"
179+
localManifestBranch="android-9.0"
180+
treble_generate="aosip"
181+
extra_make_options=""
182+
;;
167183
carbon81)
168184
mainrepo="https://github.com/CarbonROM/android.git"
169185
mainbranch="cr-6.1"
@@ -272,14 +288,14 @@ function get_rom_type() {
272288
;;
273289
bliss81)
274290
mainrepo="https://github.com/BlissRoms/platform_manifest.git"
275-
mainbranch="o-8.1"
291+
mainbranch="o8.1"
276292
localManifestBranch="android-8.1"
277293
treble_generate="bliss"
278294
extra_make_options="WITHOUT_CHECK_API=true"
279295
;;
280296
bliss90)
281297
mainrepo="https://github.com/BlissRoms/platform_manifest.git"
282-
mainbranch="p-9.0"
298+
mainbranch="p9.0"
283299
localManifestBranch="android-9.0"
284300
treble_generate="bliss"
285301
extra_make_options="WITHOUT_CHECK_API=true"
@@ -487,7 +503,11 @@ function force_clone() {
487503
function init_local_manifest() {
488504
force_clone device/phh/treble device_phh_treble
489505
force_clone vendor/vndk vendor_vndk master
490-
force_clone vendor/interfaces vendor_interfaces master
506+
if [[ "$localManifestBranch" == *"9"* ]]; then
507+
force_clone vendor/interfaces vendor_interfaces pie
508+
else
509+
force_clone vendor/interfaces vendor_interfaces master
510+
fi
491511
if [[ $target_chip = "mtk" ]]; then
492512
sed '/hardware_overlay/d' -i device/phh/treble/base.mk
493513
elif [[ $target_chip = "msm" ]]; then
@@ -561,6 +581,9 @@ function patch_things() {
561581
cd device/phh/treble
562582
bash generate.sh
563583
cd ../../..
584+
cd vendor/interfaces
585+
bash generate.sh
586+
cd ../..
564587
bash "$(dirname "$0")/apply-patches.sh" "$repodir" "$target_chip" "$localManifestBranch"
565588
fi
566589
}
@@ -669,7 +692,7 @@ else
669692
wc
670693
fi
671694

672-
python=$(python -V 2>&1)
695+
python=$(python -V 2>&1 || true)
673696
if [[ "$python" == *"3."* ]]; then
674697
if [ ! -d .venv ]; then
675698
virtualenv2 .venv

mks/aosip.mk

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$(call inherit-product, vendor/aosip/config/common_full_phone.mk)
2+
$(call inherit-product, device/aosip/sepolicy/common/sepolicy.mk)
3+
-include vendor/aosip/build/core/config.mk
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From b47091748618dfcb84e3d7db0a6cb8cd57218dc6 Mon Sep 17 00:00:00 2001
2+
From: svoboda18 <[email protected]>
3+
Date: Fri, 8 Mar 2019 17:43:54 +0000
4+
Subject: [PATCH] mediatek: fix some mtk ril bugs
5+
6+
7+
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
8+
index adfb2f2..cc115fd 100644
9+
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
10+
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
11+
@@ -2057,7 +2057,11 @@ public class GsmCdmaPhone extends Phone {
12+
// Complete pending USSD
13+
14+
if (isUssdRelease) {
15+
- found.onUssdRelease();
16+
+ if (SystemProperties.getBoolean("persist.sys.radio.ussd.fix", false)) {
17+
+ found.onUssdFinished(ussdMessage, isUssdRequest);
18+
+ } else {
19+
+ found.onUssdRelease();
20+
+ }
21+
} else if (isUssdError) {
22+
found.onUssdFinishedError();
23+
} else {
24+
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
25+
index 452b120..26a58d4 100644
26+
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
27+
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
28+
@@ -3344,11 +3344,12 @@ public class DcTracker extends Handler {
29+
}
30+
31+
protected void setDataProfilesAsNeeded() {
32+
+ boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
33+
if (DBG) log("setDataProfilesAsNeeded");
34+
if (mAllApnSettings != null && !mAllApnSettings.isEmpty()) {
35+
ArrayList<DataProfile> dps = new ArrayList<DataProfile>();
36+
for (ApnSetting apn : mAllApnSettings) {
37+
- if (apn.modemCognitive) {
38+
+ if (apn.modemCognitive || forceCognitive) {
39+
DataProfile dp = new DataProfile(apn);
40+
if (!dps.contains(dp)) {
41+
dps.add(dp);
42+
--
43+
2.7.4
44+

patches_mtk/oreo/platform_frameworks_opt_telephony/Fix-ussd-bug-on-mtk-ril.patch

-24
This file was deleted.

patches_mtk/pie/platform_frameworks_opt_telephony/0003-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch

+23-4
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,33 @@ index 2a94fc5..a29ad3f 100644
2121

2222
if (isUssdRelease) {
2323
- found.onUssdRelease();
24-
+ // (SystemProperties.getBoolean("persist.sys.radio.huawei", false)) {
24+
+ (SystemProperties.getBoolean("persist.sys.radio.ussd.fix", false)) {
2525
+ found.onUssdFinished(ussdMessage, isUssdRequest);
26-
+ //else {
27-
+ //und.onUssdRelease();
28-
+ //}
26+
+ else {
27+
+ found.onUssdRelease();
28+
+ }
2929
} else if (isUssdError) {
3030
found.onUssdFinishedError();
3131
} else {
32+
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
33+
index fc9dd86..7985d24 100644
34+
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
35+
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
36+
@@ -3314,11 +3314,13 @@ public class DcTracker extends Handler {
37+
}
38+
39+
private void setDataProfilesAsNeeded() {
40+
+ boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
41+
+
42+
if (DBG) log("setDataProfilesAsNeeded");
43+
if (mAllApnSettings != null && !mAllApnSettings.isEmpty()) {
44+
ArrayList<DataProfile> dps = new ArrayList<DataProfile>();
45+
for (ApnSetting apn : mAllApnSettings) {
46+
- if (apn.modemCognitive) {
47+
+ if (apn.modemCognitive || forceCognitive) {
48+
DataProfile dp = createDataProfile(apn);
49+
if (!dps.contains(dp)) {
50+
dps.add(dp);
3251
--
3352
2.7.4
3453

0 commit comments

Comments
 (0)