From bcc6abe45920336e52454646cd3f8549133bb2d9 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 21 Jul 2024 17:19:43 +0800 Subject: [PATCH] Changes for July 2024, syncing up to 20240721 --- .../0001-Disable-FP-lockouts-optionally.patch | 12 +- ...0002-Disable-vendor-mismatch-warning.patch | 8 +- ...d-Allow-locking-to-any-rotation-mode.patch | 8 +- ...olors-of-slices-not-updating-on-doze.patch | 12 +- ...005-UI-Adjust-default-navbar-layouts.patch | 6 +- .../0006-UI-Adjust-split-screen-divider.patch | 8 +- .../0007-UI-Disable-wallpaper-zoom.patch | 8 +- ...-and-light-dark-theme-in-user-1-icon.patch | 6 +- ...-Increase-default-status-bar-height.patch} | 6 +- ...layout-tuning-via-sysui_nav_bar-tun.patch} | 4 +- ...XED_RATIO-for-multi-window-globally.patch} | 8 +- ...re-Remove-old-app-target-SDK-dialog.patch} | 4 +- ...ubpixel-text-positioning-by-default.patch} | 8 +- ...-requirement-for-signature-spoofing.patch} | 8 +- ...lorUpdateLogger-to-track-color-updat.patch | 1154 +++++++++++++++++ .../0016-Revert-Change-color-of-track.patch | 54 + ...ext-color-used-on-the-notification-u.patch | 27 + ...temUI-to-new-notification-color-spe.patch} | 75 +- ...mework-to-new-notification-color-sp.patch} | 22 +- ...ake-QS-always-use-dark-theme-colors.patch} | 8 +- ...inflate-QS-and-SB-when-CONFIG_UI_MO.patch} | 4 +- ...-light-dark-theme-in-quick-settings.patch} | 50 +- ...ewrapper-for-QSCustomizer-and-tune-.patch} | 16 +- ...itialize-QS-tiles-in-inactive-state.patch} | 6 +- ...l-tone-light-and-dark-themes-for-QS.patch} | 20 +- ...te-QS-and-SB-when-CONFIG_SCREEN_LAY.patch} | 4 +- ...ight-dark-theme-in-SplitShade-Heade.patch} | 113 +- ...ransparent-background-for-QS-footer.patch} | 29 +- ...t-Remove-unused-colorSchemeIsApplied.patch | 65 + ...ark-Light-theme-for-Safe-Mode-dialo.patch} | 6 +- ...llow-light-dark-theme-in-power-menu.patch} | 14 +- ...notification-background-to-monet-on-.patch | 92 -- ...uate-system-theme-on-UI-mode-change.patch} | 22 +- ...-SystemUI-Fix-QS-header-clock-color.patch} | 20 +- ...late-paged-QS-tiles-height-properly.patch} | 8 +- ...isibility-check-in-setting-QSCarrie.patch} | 8 +- ...-Fix-QS-tile-dialog-background-color.patch | 27 + ...Use-proper-Resolver-background-color.patch | 26 + ...w-monet-theme-on-privacy-indicators.patch} | 12 +- ...-Follow-monet-theme-on-battery-chip.patch} | 14 +- ...ntroller-Remove-repeated-monet-check.patch | 29 + ...-color-accent-for-charging-animation.patch | 54 + ...faults-Add-chroma-to-light-surface-h.patch | 33 + ...background_tint-Use-accent-color-for.patch | 30 + ...izard-Remove-step-for-changing-theme.patch | 18 +- ...ild-Integrate-prop-modifications-1-2.patch | 12 +- .../0002-build-Remove-Stk-1-2.patch | 6 +- ...001-Add-MotoHelloUINavbarOverlay-1-2.patch | 30 +- .../0002-Disable-Bluetooth-by-default.patch | 6 +- ...rag-by-default-for-editable-TextView.patch | 4 +- ...0004-Disable-RESTRICTED-bucket-toast.patch | 8 +- ...005-Disable-wake-on-gamepad-L-R-keys.patch | 32 + ...=> 0006-Keyguard-Adjust-clock-style.patch} | 26 +- ...Hide-padlock-unless-UDFPS-is-in-use.patch} | 8 +- ...Keyguard-Default-to-small-clock-1-3.patch} | 8 +- ...009-Keyguard-Refine-indication-text.patch} | 34 +- ...tatus-bar-quick-settings-margins-an.patch} | 30 +- ...dd-left-padding-for-keyguard-slices.patch} | 4 +- ...Match-keyguard-carrier-text-font-wit.patch | 27 + ...date-RAT-icons-to-match-Silk-design.patch} | 4 +- ...fault-top-clock-margin-on-h800-devi.patch} | 4 +- ... 0015-UI-Always-render-into-cutouts.patch} | 22 +- ...unded-corners-in-notification-scrim.patch} | 8 +- ...017-UI-Reconfigure-power-menu-items.patch} | 8 +- ...UI-Reconfigure-quick-settings-tiles.patch} | 6 +- ...irement-for-HINT_SUPPORTS_DARK_TEXT.patch} | 4 +- ...patch => 0020-UI-Remove-privacy-dot.patch} | 8 +- ...-quick-settings-fonts-to-pre-T-QPR2.patch} | 8 +- ...-luminance-for-wallpaper-dark-hints.patch} | 4 +- ...SetupWizard-Least-Action-s-Principle.patch | 30 +- ...ake-overview-scrim-transparent-again.patch | 8 +- ...02-Trebuchet-Kill-haptics-in-recents.patch | 24 +- ...nverted-rounded-corners-above-the-ta.patch | 6 +- .../0001-treble-Lineage-ify.patch | 6 +- ...ARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch | 4 +- ...treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch | 4 +- .../0004-treble-Enable-call-recording.patch | 4 +- .../0005-treble-Switch-to-MindTheGapps.patch | 4 +- ...reble-Import-prebuilt-PHH-Superuser.patch} | 4 +- .../0006-treble-Stop-securing-ADB.patch | 35 - .../0007-treble-Remove-Securize-1-2.patch | 166 +++ .../0007-treble-Securize-on-demand.patch | 49 - ...lso-use-data-adb-for-securize-status.patch | 46 - ...estore-sbin-for-Magisk-compatibility.patch | 6 +- ...-.patch => 0001-Remove-Securize-2-2.patch} | 64 +- ...low-disabling-selected-local-command.patch | 12 +- ...and-Q-behavior-respectively-for-tele.patch | 20 +- .../0002-Fix-BT-in-call-on-CAF-devices.patch | 2 +- ...id-is-hardcoded-support-for-Asus-ZF6.patch | 16 +- ...orce-load-audio-policy-for-system-si.patch | 2 +- ...2DP-audio-ports-from-the-primary-HAL.patch | 2 +- ...again-with-trimmed-audio-port-name-i.patch | 2 +- ...-property-to-override-default-camera.patch | 10 +- ...SCO-devices.-Fallback-from-one-to-th.patch | 6 +- ...phh.samsung.camera_ids-property-to-a.patch | 6 +- ...rty-to-force-camera-timestamp-source.patch | 6 +- ...IH-devices-Fix-Earpiece-audio-output.patch | 2 +- ...e-assigning-legacy-audio-groups-fata.patch | 2 +- ...-Make-camera-IDs-filter-out-optional.patch | 8 +- .../0014-Support-Samsung-R-multi-cams.patch | 6 +- ...in-a-route-are-valid.-Dont-ignore-th.patch | 2 +- ...lume-policy-when-none-has-been-found.patch | 2 +- ...pport-for-audio-HAL-V2-from-the-fram.patch | 24 +- ...rop-to-change-Samsung-flash-strength.patch | 8 +- ...gh-pitched-voice-on-Qualcomm-devices.patch | 2 +- ...broken-mic-while-video-recording-on-.patch | 2 +- ...sable-AUDIO_OUTPUT_FLAG_FAST-from-au.patch | 2 +- ...x-echo-on-incoming-or-outgoing-calls.patch | 2 +- ...0023-Include-Samsung-AIDL-camera-ids.patch | 6 +- ...ra-modes-declared-in-Samsung-proprie.patch | 4 +- ...id-autobrightness-if-brightness-valu.patch | 8 +- ...Fix-env-empty-string-ANDROID_STORAGE.patch | 8 +- ...uirement-for-visible-flag-to-sdcards.patch | 8 +- ...h-if-there-is-IR-HAL-is-not-declared.patch | 4 +- ...istent-property-to-override-the-defa.patch | 12 +- ...-Show-APN-Settings-for-CDMA-carriers.patch | 10 +- ...s-so-that-it-works-even-without-qtag.patch | 10 +- ...-Support-samsung-Pie-and-Q-light-hal.patch | 8 +- ...samsung-touch-physical-and-hover-pro.patch | 58 +- ...erriding-the-number-of-work-profiles.patch | 8 +- ...-wake-up-devices-just-as-well-as-bac.patch | 8 +- ...e-proximity-sensor-reporting-NaN-as-.patch | 16 +- ...ange-not-being-complete-on-Samsung-d.patch | 8 +- ...atch-like-behaviour-for-RRO-java-sid.patch | 4 +- ...otification-about-console-service-be.patch | 8 +- ...t-Remove-unused-SystemProperties.set.patch | 8 +- ...nyManager-bring-back-getNetworkClass.patch | 8 +- ...-add-API-annotations-for-setTelephon.patch | 10 +- .../0019-Fix-Wakelock-issue.patch | 8 +- ...tect-pick-up-sensor-so-that-an-overl.patch | 4 +- ...nBuiltInDisplayCutoutRectApproximati.patch | 21 +- ...t-Fix-backlight-control-on-Galaxy-S9.patch | 6 +- ...ch-long-press-power-behavior-in-AOSP.patch | 10 +- ...of-fingerprint-cleanups-needed-on-so.patch | 8 +- ...ze-boot-animation-to-match-screen-si.patch | 6 +- ...more-FDE-methods-from-StorageManager.patch | 10 +- ...ngerprint-sensors-to-security-strong.patch | 10 +- ...SehSysInputDev-to-report-screen-stat.patch | 26 +- ...-constrainNitsAndBacklightArrays-and.patch | 8 +- ...30-Add-Mediatek-power-hints-on-touch.patch | 24 +- ...Detect-Moto-dynamic-hardware-feature.patch | 8 +- ...ateForSlotIndex-in-SubscriptionManag.patch | 8 +- ...CallingIdentity-variant-with-both-ex.patch | 10 +- .../0034-Catch-NPE-in-SystemUI.patch | 8 +- ...e-Samsung-Power-hal-in-libpowermanag.patch | 8 +- ...Asus-Samsung-recent-Xiaomi-and-RedMa.patch | 163 ++- ...htness-slider-curve-for-some-devices.patch | 4 +- .../0038-Ignore-cgroup-creation-errors.patch | 14 +- ...use-SW_MACHINE_COVER-rather-than-SW_.patch | 18 +- ...rt-Removed-IWLAN-legacy-mode-support.patch | 14 +- ...prop-to-use-linear-backlight-control.patch | 6 +- ...Samsung-full-brightness-on-their-AID.patch | 12 +- .../0043-Add-Samsung-sysinput.patch | 8 +- ...ff-commonize-refreshing-the-services.patch | 24 +- ...ices-use-SW_FLIP-0x15-rather-than-SW.patch | 10 +- ...amsung.hardware.radio.network-V1-jav.patch | 8 +- ...amsung.hardware.radio-V2.2-java-HIDL.patch | 8 +- ...precated-IRadio-1.4-APIs-and-referen.patch | 18 +- ...em_server-if-we-fail-to-parse-dynami.patch | 53 +- ...sable-animation-in-for-sysui-media-c.patch | 18 +- ...certain-signature-to-install-work-li.patch | 93 ++ ...ed-to-send-a-hack-message-to-HAL-to-.patch | 14 +- ...n-input-with-a-display-uses-uniqueId.patch | 8 +- ...n-t-exist-in-O-P-so-detect-its-suppo.patch | 4 +- ...Samsung-system-permission-on-sensors.patch | 4 +- ...er-input-as-sensor-exclusively-if-th.patch | 8 +- ...ide-their-vibrator-HAL-behind-non-de.patch | 4 +- ...er-Add-support-Samsung-miscpower-HAL.patch | 36 +- ...008-FOD-support-for-Samsung-and-Asus.patch | 32 +- ...support-to-fix-broken-Mediatek-gpufr.patch | 12 +- .../0010-Fix-loading-unnamed-GLES.patch | 4 +- .../0011-Increase-SW_MAX-4.patch | 14 +- ...le-gpuservice-on-old-BPF-less-kernel.patch | 4 +- ...eFlinger-Disable-SF-HWC-backpressure.patch | 26 + ...roller-Do-not-override-default-calli.patch | 8 +- ...ot-call-onUssdRelease-for-Huawei-RIL.patch | 6 +- ...ng-too-long-to-fit-into-a-91-chars-p.patch | 6 +- ...ic-void-TelephonyMetrics.writeRilSen.patch | 2 +- ...precated-IRadio-1.4-APIs-and-referen.patch | 68 +- ...e-deprecated-HAL-versions-for-IRadio.patch | 529 ++++---- ...ength-for-huawei-kirin-hi6250-hi3670.patch | 6 +- ...ward-port-support-for-forceCognitive.patch | 2 +- ...-Fix-NPE-with-1.0-and-1.1-CardStatus.patch | 2 +- ...cSlot-ignore-error-if-we-cant-print-.patch | 2 +- ...rt-Removed-IWLAN-legacy-mode-support.patch | 32 +- ...ng-AIDL-ISehRadioNetwork.-Fixes-5G-o.patch | 10 +- ...ng-HIDL-ISehRadio.-Fixes-5G-on-S20-U.patch | 14 +- ...hen-reading-SMSC-ignore-invalid-SMSC.patch | 2 +- ...e-when-there-is-no-hal-but-we-believ.patch | 4 +- ...-fingerprint-events-they-are-expecte.patch | 12 +- ...ove-Do-not-validate-option-in-CA-cer.patch | 70 +- ...ck-if-domain-field-is-not-empty-when.patch | 16 +- ..._interface-Optionally-use-sysbta-HAL.patch | 50 +- ...n-to-change-eSCO-Transport-Unit-Size.patch | 6 +- ...en-failing-to-get-real-time-priority.patch | 32 +- ...es-we-need-to-tell-Audio-HAL-if-we-r.patch | 18 +- ...o-disable-some-features-commands-sta.patch | 20 +- ...o-cap-declared-le-vendor-version.-Fo.patch | 76 +- ...mmand-READ_REMOTE_VERSION_INFORMATIO.patch | 6 +- ...-load-bpf-programs-for-BPF-less-devi.patch | 2 +- ...king-BPF-maps-on-old-BPF-less-kernel.patch | 193 ++- ...raffic-indicators-for-legacy-devices.patch | 48 +- ...ort-for-V-gsi-on-pixel-5-R-base-kern.patch | 2 +- ...ignore-there-are-some-4.14-without-t.patch | 8 +- ...n-working-BPF-maps-on-old-BPF-less-k.patch | 120 -- ...pdatable-add-back-abort-on-init-fail.patch | 28 + ...ash-when-we-get-no-DeviceLockManager.patch | 10 +- ...phh.wifi_disable_sae-property-to-dis.patch | 14 +- .../0001-Support-no-bpf-usecase.patch | 23 +- ...et-system-override-ro.apex.updatable.patch | 6 +- ...eating-property-tree-if-there-is-a-c.patch | 2 +- ...tart-console-service-when-debuggable.patch | 6 +- ...into-recovery-rather-than-bootloader.patch | 2 +- ...allowed-sdcard-options-based-on-vndk.patch | 2 +- ...Set-dev-uinput-as-0666-to-fix-finger.patch | 2 +- ...t-Set-system-xbin-permissions-to-750.patch | 2 +- ...my-own-OTA-mechanism-going-over-data.patch | 4 +- ...Keep-allowing-encryptable-fstab-flag.patch | 6 +- ...lback-FDE-to-no-encryption-and-FDE-F.patch | 4 +- ...ide-adb-secure-props-so-we-dont-get-.patch | 6 +- ...0-kernels.-This-is-needed-because-on.patch | 19 +- ...chdogd-Support-pinging-two-watchdogs.patch | 2 +- ...d-offline-charger-fix-screen-off-3-3.patch | 2 +- ...n-legacy-devices-with-encryption-dis.patch | 6 +- ...are_mnt.-Moto-Razr-2019-look-for-fir.patch | 2 +- .../0017-Ignore-dm-verity-setup-issues.patch | 4 +- ...for-devices-without-cgroupv2-support.patch | 2 +- ...quota-on-old-devices-but-new-enough-.patch | 6 +- ...ies-custom-rc-action-prop-validation.patch | 2 +- ...rs-when-setting-fscrypt-directory.-S.patch | 2 +- ...sion-of-ro.logd.kernel.-We-do-want-l.patch | 4 +- ...p-capex-when-there-are-vendor-apexes.patch | 4 +- ...apex.updatable-actually-set-the-valu.patch | 4 +- ...0025-If-AVB-fails-ignore-disable-AVB.patch | 53 +- ...-no-longer-exist-we-ll-deal-with-it-.patch | 4 +- .../0001-Allow-deletion-of-symlink.patch | 8 +- ...o-create-facedata-shouldn-t-be-fatal.patch | 6 +- ...003-Don-t-unmount-rw-system.sh-binds.patch | 8 +- ...nted-with-exfat-kernel-fs-driver-or-.patch | 6 +- ...ery-voldmanaged-storage-is-adoptable.patch | 10 +- 240 files changed, 3746 insertions(+), 2018 deletions(-) rename patches_platform/frameworks_base/{0010-UI-Increase-default-status-bar-height.patch => 0009-UI-Increase-default-status-bar-height.patch} (88%) rename patches_platform/frameworks_base/{0011-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch => 0010-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch} (96%) rename patches_platform/frameworks_base/{0012-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch => 0011-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch} (95%) rename patches_platform/frameworks_base/{0013-core-Remove-old-app-target-SDK-dialog.patch => 0012-core-Remove-old-app-target-SDK-dialog.patch} (90%) rename patches_platform/frameworks_base/{0014-Paint-Enable-subpixel-text-positioning-by-default.patch => 0013-Paint-Enable-subpixel-text-positioning-by-default.patch} (88%) rename patches_platform/frameworks_base/{0015-Remove-debuggable-requirement-for-signature-spoofing.patch => 0014-Remove-debuggable-requirement-for-signature-spoofing.patch} (79%) create mode 100644 patches_platform/frameworks_base/0015-Revert-Adding-ColorUpdateLogger-to-track-color-updat.patch create mode 100644 patches_platform/frameworks_base/0016-Revert-Change-color-of-track.patch create mode 100644 patches_platform/frameworks_base/0017-Revert-Fix-the-text-color-used-on-the-notification-u.patch rename patches_platform/frameworks_base/{0016-Revert-Update-SystemUI-to-new-notification-color-spe.patch => 0018-Revert-Update-SystemUI-to-new-notification-color-spe.patch} (96%) rename patches_platform/frameworks_base/{0017-Revert-Update-framework-to-new-notification-color-sp.patch => 0019-Revert-Update-framework-to-new-notification-color-sp.patch} (93%) rename patches_platform/frameworks_base/{0018-Revert-Make-QS-always-use-dark-theme-colors.patch => 0020-Revert-Make-QS-always-use-dark-theme-colors.patch} (84%) rename patches_platform/frameworks_base/{0019-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch => 0021-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch} (91%) rename patches_platform/frameworks_base/{0020-SystemUI-Follow-light-dark-theme-in-quick-settings.patch => 0022-SystemUI-Follow-light-dark-theme-in-quick-settings.patch} (88%) rename patches_platform/frameworks_base/{0021-SystemUI-Use-themewrapper-for-QSCustomizer-and-tune-.patch => 0023-SystemUI-Use-themewrapper-for-QSCustomizer-and-tune-.patch} (85%) rename patches_platform/frameworks_base/{0022-SystemUI-Initialize-QS-tiles-in-inactive-state.patch => 0024-SystemUI-Initialize-QS-tiles-in-inactive-state.patch} (89%) rename patches_platform/frameworks_base/{0023-SystemUI-Add-dual-tone-light-and-dark-themes-for-QS.patch => 0025-SystemUI-Add-dual-tone-light-and-dark-themes-for-QS.patch} (90%) rename patches_platform/frameworks_base/{0028-SystemUI-Re-inflate-QS-and-SB-when-CONFIG_SCREEN_LAY.patch => 0026-SystemUI-Re-inflate-QS-and-SB-when-CONFIG_SCREEN_LAY.patch} (91%) rename patches_platform/frameworks_base/{0029-SystemUI-Follow-light-dark-theme-in-SplitShade-Heade.patch => 0027-SystemUI-Follow-light-dark-theme-in-SplitShade-Heade.patch} (64%) rename patches_platform/frameworks_base/{0009-UI-Hide-QS-footer-background.patch => 0028-SystemUI-Use-transparent-background-for-QS-footer.patch} (60%) create mode 100644 patches_platform/frameworks_base/0029-SystemUI-monet-Remove-unused-colorSchemeIsApplied.patch rename patches_platform/frameworks_base/{0032-SystemUI-Follow-Dark-Light-theme-for-Safe-Mode-dialo.patch => 0030-SystemUI-Follow-Dark-Light-theme-for-Safe-Mode-dialo.patch} (92%) rename patches_platform/frameworks_base/{0024-SystemUI-Follow-light-dark-theme-in-power-menu.patch => 0031-SystemUI-Follow-light-dark-theme-in-power-menu.patch} (92%) delete mode 100644 patches_platform/frameworks_base/0031-SystemUI-Switch-notification-background-to-monet-on-.patch rename patches_platform/frameworks_base/{0025-SystemUI-Re-evaluate-system-theme-on-UI-mode-change.patch => 0032-SystemUI-Re-evaluate-system-theme-on-UI-mode-change.patch} (83%) rename patches_platform/frameworks_base/{0026-SystemUI-Fix-QS-header-clock-color.patch => 0033-SystemUI-Fix-QS-header-clock-color.patch} (73%) rename patches_platform/frameworks_base/{0027-SystemUI-Calculate-paged-QS-tiles-height-properly.patch => 0034-SystemUI-Calculate-paged-QS-tiles-height-properly.patch} (87%) rename patches_platform/frameworks_base/{0030-SystemUI-Remove-visibility-check-in-setting-QSCarrie.patch => 0035-SystemUI-Remove-visibility-check-in-setting-QSCarrie.patch} (86%) create mode 100644 patches_platform/frameworks_base/0036-SystemUI-Fix-QS-tile-dialog-background-color.patch create mode 100644 patches_platform/frameworks_base/0037-SystemUI-Use-proper-Resolver-background-color.patch rename patches_platform/frameworks_base/{0033-SystemUI-Follow-monet-theme-on-privacy-indicators.patch => 0038-SystemUI-Follow-monet-theme-on-privacy-indicators.patch} (86%) rename patches_platform/frameworks_base/{0034-SystemUI-Follow-monet-theme-on-battery-chip.patch => 0039-SystemUI-Follow-monet-theme-on-battery-chip.patch} (85%) create mode 100644 patches_platform/frameworks_base/0040-ThemeOverlayController-Remove-repeated-monet-check.patch create mode 100644 patches_platform/frameworks_base/0041-SystemUI-Use-color-accent-for-charging-animation.patch create mode 100644 patches_platform/frameworks_base/0042-colors_device_defaults-Add-chroma-to-light-surface-h.patch create mode 100644 patches_platform/frameworks_base/0043-config_progress_background_tint-Use-accent-color-for.patch create mode 100644 patches_platform_personal/frameworks_base/0005-Disable-wake-on-gamepad-L-R-keys.patch rename patches_platform_personal/frameworks_base/{0005-Keyguard-Adjust-clock-style.patch => 0006-Keyguard-Adjust-clock-style.patch} (95%) rename patches_platform_personal/frameworks_base/{0006-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch => 0007-Keyguard-Hide-padlock-unless-UDFPS-is-in-use.patch} (90%) rename patches_platform_personal/frameworks_base/{0007-Keyguard-Default-to-small-clock-1-3.patch => 0008-Keyguard-Default-to-small-clock-1-3.patch} (84%) rename patches_platform_personal/frameworks_base/{0008-Keyguard-Refine-indication-text.patch => 0009-Keyguard-Refine-indication-text.patch} (84%) rename patches_platform_personal/frameworks_base/{0009-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch => 0010-Keyguard-UI-Fix-status-bar-quick-settings-margins-an.patch} (94%) rename patches_platform_personal/frameworks_base/{0010-Revert-SystemUI-Add-left-padding-for-keyguard-slices.patch => 0011-Revert-SystemUI-Add-left-padding-for-keyguard-slices.patch} (94%) create mode 100644 patches_platform_personal/frameworks_base/0012-Revert-SystemUI-Match-keyguard-carrier-text-font-wit.patch rename patches_platform_personal/frameworks_base/{0011-Revert-Update-RAT-icons-to-match-Silk-design.patch => 0013-Revert-Update-RAT-icons-to-match-Silk-design.patch} (99%) rename patches_platform_personal/frameworks_base/{0012-Revert-Use-the-default-top-clock-margin-on-h800-devi.patch => 0014-Revert-Use-the-default-top-clock-margin-on-h800-devi.patch} (87%) rename patches_platform_personal/frameworks_base/{0013-UI-Always-render-into-cutouts.patch => 0015-UI-Always-render-into-cutouts.patch} (87%) rename patches_platform_personal/frameworks_base/{0014-UI-Kill-rounded-corners-in-notification-scrim.patch => 0016-UI-Kill-rounded-corners-in-notification-scrim.patch} (84%) rename patches_platform_personal/frameworks_base/{0015-UI-Reconfigure-power-menu-items.patch => 0017-UI-Reconfigure-power-menu-items.patch} (82%) rename patches_platform_personal/frameworks_base/{0016-UI-Reconfigure-quick-settings-tiles.patch => 0018-UI-Reconfigure-quick-settings-tiles.patch} (85%) rename patches_platform_personal/frameworks_base/{0017-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch => 0019-UI-Relax-requirement-for-HINT_SUPPORTS_DARK_TEXT.patch} (88%) rename patches_platform_personal/frameworks_base/{0018-UI-Remove-privacy-dot.patch => 0020-UI-Remove-privacy-dot.patch} (88%) rename patches_platform_personal/frameworks_base/{0019-UI-Restore-quick-settings-fonts-to-pre-T-QPR2.patch => 0021-UI-Restore-quick-settings-fonts-to-pre-T-QPR2.patch} (87%) rename patches_platform_personal/frameworks_base/{0020-UI-Revert-to-HSL-luminance-for-wallpaper-dark-hints.patch => 0022-UI-Revert-to-HSL-luminance-for-wallpaper-dark-hints.patch} (93%) rename patches_treble/device_phh_treble/{0009-treble-Import-prebuilt-PHH-Superuser.patch => 0006-treble-Import-prebuilt-PHH-Superuser.patch} (99%) delete mode 100644 patches_treble/device_phh_treble/0006-treble-Stop-securing-ADB.patch create mode 100644 patches_treble/device_phh_treble/0007-treble-Remove-Securize-1-2.patch delete mode 100644 patches_treble/device_phh_treble/0007-treble-Securize-on-demand.patch delete mode 100644 patches_treble/device_phh_treble/0008-treble-Also-use-data-adb-for-securize-status.patch rename patches_treble/treble_app/{0001-Simplify-Securize-to-CheckBoxPreference-and-persist-.patch => 0001-Remove-Securize-2-2.patch} (59%) create mode 100644 patches_treble_td/platform_frameworks_base/0051-Allow-APKs-of-a-certain-signature-to-install-work-li.patch create mode 100644 patches_treble_td/platform_frameworks_native/0013-SurfaceFlinger-Disable-SF-HWC-backpressure.patch delete mode 100644 patches_treble_td/platform_packages_modules_Connectivity/0006-Fixup-Support-non-working-BPF-maps-on-old-BPF-less-k.patch create mode 100644 patches_treble_td/platform_packages_modules_Connectivity/0006-Revert-netdupdatable-add-back-abort-on-init-fail.patch diff --git a/patches_platform/frameworks_base/0001-Disable-FP-lockouts-optionally.patch b/patches_platform/frameworks_base/0001-Disable-FP-lockouts-optionally.patch index 7896cbb..659401b 100644 --- a/patches_platform/frameworks_base/0001-Disable-FP-lockouts-optionally.patch +++ b/patches_platform/frameworks_base/0001-Disable-FP-lockouts-optionally.patch @@ -1,7 +1,7 @@ -From 92d00894b0d84c8d3fd0a6ba253132ac96402251 Mon Sep 17 00:00:00 2001 +From e535be2c76e6969ca8a58023b203bf66cfe0d3ae Mon Sep 17 00:00:00 2001 From: AndyCGYan Date: Fri, 22 Mar 2019 00:41:20 +0800 -Subject: [PATCH 01/34] Disable FP lockouts optionally +Subject: [PATCH 01/43] Disable FP lockouts optionally Both timed and permanent lockouts - GET THE FUCK OUT Now targeting LockoutFramework, introduced in Android 12 @@ -13,10 +13,10 @@ Change-Id: I2d4b091f3546d4d7903bfb4d5585629212dc9915 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java -index 0730c672acd9..972421758223 100644 +index 0e05a7923db4..34268e2f8a5a 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java -@@ -27,6 +27,7 @@ import android.content.IntentFilter; +@@ -29,6 +29,7 @@ import android.content.IntentFilter; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; @@ -24,7 +24,7 @@ index 0730c672acd9..972421758223 100644 import android.util.Slog; import android.util.SparseBooleanArray; import android.util.SparseIntArray; -@@ -46,6 +47,7 @@ public class LockoutFrameworkImpl implements LockoutTracker { +@@ -51,6 +52,7 @@ public class LockoutFrameworkImpl implements LockoutTracker { private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 20; private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000; private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user"; @@ -32,7 +32,7 @@ index 0730c672acd9..972421758223 100644 private final class LockoutReceiver extends BroadcastReceiver { @Override -@@ -107,24 +109,28 @@ public class LockoutFrameworkImpl implements LockoutTracker { +@@ -133,24 +135,28 @@ public class LockoutFrameworkImpl implements LockoutTracker { @Override public void addFailedAttemptForUser(int userId) { diff --git a/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch b/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch index a5b706b..23dcf01 100644 --- a/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch +++ b/patches_platform/frameworks_base/0002-Disable-vendor-mismatch-warning.patch @@ -1,7 +1,7 @@ -From b3aa7feea26bb5d713a8511f5720f33f0c204002 Mon Sep 17 00:00:00 2001 +From 8595258b7aac74763f6f8b7edbe37b91f0a4c1a5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 5 Apr 2018 10:01:19 +0800 -Subject: [PATCH 02/34] Disable vendor mismatch warning +Subject: [PATCH 02/43] Disable vendor mismatch warning Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b --- @@ -9,10 +9,10 @@ Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java -index ad9ac201e22b..b42e4e2e22dc 100644 +index b26cddaccc04..cdc661598f33 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java -@@ -6237,19 +6237,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { +@@ -6312,19 +6312,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { if (!isBuildConsistent) { Slog.e(TAG, "Build fingerprint is not consistent, warning user"); diff --git a/patches_platform/frameworks_base/0003-Keyguard-Allow-locking-to-any-rotation-mode.patch b/patches_platform/frameworks_base/0003-Keyguard-Allow-locking-to-any-rotation-mode.patch index 86f97ca..00ad41b 100644 --- a/patches_platform/frameworks_base/0003-Keyguard-Allow-locking-to-any-rotation-mode.patch +++ b/patches_platform/frameworks_base/0003-Keyguard-Allow-locking-to-any-rotation-mode.patch @@ -1,7 +1,7 @@ -From e492a141400c534bfc1f08b904e7e7f60e92164e Mon Sep 17 00:00:00 2001 +From 51ff3c370b9a75bb98f949506afe2dd1aafc6ca7 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 21 Jan 2024 22:03:47 +0800 -Subject: [PATCH 03/34] Keyguard: Allow locking to any rotation mode +Subject: [PATCH 03/43] Keyguard: Allow locking to any rotation mode Change-Id: I0f12c433f3547e9bfcdbc2cf50e2a4f3ec8ca311 --- @@ -9,10 +9,10 @@ Change-Id: I0f12c433f3547e9bfcdbc2cf50e2a4f3ec8ca311 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java -index b4082694bbe5..f9f3dd911a74 100644 +index 1aa42d1554fe..a2787a0bebe0 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java -@@ -431,12 +431,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW +@@ -443,12 +443,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW } private void adjustScreenOrientation(NotificationShadeWindowState state) { diff --git a/patches_platform/frameworks_base/0004-Keyguard-Fix-colors-of-slices-not-updating-on-doze.patch b/patches_platform/frameworks_base/0004-Keyguard-Fix-colors-of-slices-not-updating-on-doze.patch index d78eb60..2b6440e 100644 --- a/patches_platform/frameworks_base/0004-Keyguard-Fix-colors-of-slices-not-updating-on-doze.patch +++ b/patches_platform/frameworks_base/0004-Keyguard-Fix-colors-of-slices-not-updating-on-doze.patch @@ -1,7 +1,7 @@ -From beea20462b965e2c790549f7d854ed71b46b54e9 Mon Sep 17 00:00:00 2001 +From b2c40aa3a127825dfacf3006d18639557dd4064d Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 17 Jan 2023 17:19:19 +0000 -Subject: [PATCH 04/34] Keyguard: Fix colors of slices not updating on doze +Subject: [PATCH 04/43] Keyguard: Fix colors of slices not updating on doze Slices were invisible (black) in doze when using light wallpapers Introduced in https://github.com/LineageOS/android_frameworks_base/commit/a19e59d717ec6d573c11c7e8277bba3c4de189c2 @@ -13,10 +13,10 @@ Change-Id: I06abd8bf2e28655cc9e6d81366fd82a13454ec5a 2 files changed, 8 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java -index 2a54a4eee657..de2d1ec89b61 100644 +index c0ae4a1f4036..7b25a37a1632 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java -@@ -297,6 +297,13 @@ public class KeyguardStatusViewController extends ViewController Date: Sat, 16 Oct 2021 02:23:48 +0000 -Subject: [PATCH 05/34] UI: Adjust default navbar layouts +Subject: [PATCH 05/43] UI: Adjust default navbar layouts - Slightly tighten nodpi layout - Remove sw372dp layout - looks terrible, probably meant for legacy phablets, but most modern phones qualify @@ -45,7 +45,7 @@ index 07b797a32428..000000000000 - left[.25W],back[.5WC];home;recent[.5WC],right[.25W] - diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml -index 038e9da33b83..4791ad8969f0 100644 +index 2124ad9edca9..0286cc65c8e2 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -325,7 +325,7 @@ diff --git a/patches_platform/frameworks_base/0006-UI-Adjust-split-screen-divider.patch b/patches_platform/frameworks_base/0006-UI-Adjust-split-screen-divider.patch index ef1447e..8bee43c 100644 --- a/patches_platform/frameworks_base/0006-UI-Adjust-split-screen-divider.patch +++ b/patches_platform/frameworks_base/0006-UI-Adjust-split-screen-divider.patch @@ -1,7 +1,7 @@ -From 5b8bc8a9cf51ed8fb40101b7a5234fccaee36327 Mon Sep 17 00:00:00 2001 +From 2ff1e12e1ff9952fe489c9023eb76d342af1ddbf Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 19 Mar 2022 09:22:24 +0000 -Subject: [PATCH 06/34] UI: Adjust split-screen divider +Subject: [PATCH 06/43] UI: Adjust split-screen divider - Kill rounded corners - where two rectangles collide should be perfectly straight - Make it black (pre-Sv2) for phones @@ -150,7 +150,7 @@ index 000000000000..8a1907da76e5 + @color/taskbar_background + diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml -index fae71efe3b39..fb50f0119b43 100644 +index 758dbfd5f3c5..e82f6ff9a4db 100644 --- a/libs/WindowManager/Shell/res/values/colors.xml +++ b/libs/WindowManager/Shell/res/values/colors.xml @@ -18,7 +18,7 @@ @@ -163,7 +163,7 @@ index fae71efe3b39..fb50f0119b43 100644 #60000000 #00000000 diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java -index 53caddb52f23..fae5008283cc 100644 +index 6b2d544c192a..7c4db20d8cd8 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java @@ -168,23 +168,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange diff --git a/patches_platform/frameworks_base/0007-UI-Disable-wallpaper-zoom.patch b/patches_platform/frameworks_base/0007-UI-Disable-wallpaper-zoom.patch index c44dac8..355c5d5 100644 --- a/patches_platform/frameworks_base/0007-UI-Disable-wallpaper-zoom.patch +++ b/patches_platform/frameworks_base/0007-UI-Disable-wallpaper-zoom.patch @@ -1,7 +1,7 @@ -From f9879e5977ca089dae074c63e609a2a5bc734199 Mon Sep 17 00:00:00 2001 +From 6cdab07dbf6a812c1c2daf80c292fa9088143572 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 10 Jan 2021 11:44:29 +0000 -Subject: [PATCH 07/34] UI: Disable wallpaper zoom +Subject: [PATCH 07/43] UI: Disable wallpaper zoom It does little more than inducing motion sickness @@ -11,10 +11,10 @@ Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml -index 3bc33bac37bc..369eb84ccd84 100644 +index 0a4fc6515368..129c7160fe63 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml -@@ -5768,7 +5768,7 @@ +@@ -5858,7 +5858,7 @@ 1 diff --git a/patches_platform/frameworks_base/0008-UI-Follow-Monet-and-light-dark-theme-in-user-1-icon.patch b/patches_platform/frameworks_base/0008-UI-Follow-Monet-and-light-dark-theme-in-user-1-icon.patch index ae45b70..4a52a9a 100644 --- a/patches_platform/frameworks_base/0008-UI-Follow-Monet-and-light-dark-theme-in-user-1-icon.patch +++ b/patches_platform/frameworks_base/0008-UI-Follow-Monet-and-light-dark-theme-in-user-1-icon.patch @@ -1,7 +1,7 @@ -From 2ffb66fa7c00b63536c3de706bd6e36b2b696512 Mon Sep 17 00:00:00 2001 +From bfc38ff3a5a13606880951948d8e09b430405e25 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 25 Sep 2022 02:20:52 +0000 -Subject: [PATCH 08/34] UI: Follow Monet and light/dark theme in user 1 icon +Subject: [PATCH 08/43] UI: Follow Monet and light/dark theme in user 1 icon Change-Id: I755077c6003c39ddc9428da1defe6a6ddd0e5ff8 --- @@ -22,7 +22,7 @@ index d3f998fb70cf..4f7b9e093bb7 100644 #ff4ecde6 #fffbbc04 diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml -index eddd81e78692..00cf4243cfa9 100644 +index b879c9794f39..d8191c0c3597 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -177,7 +177,7 @@ diff --git a/patches_platform/frameworks_base/0010-UI-Increase-default-status-bar-height.patch b/patches_platform/frameworks_base/0009-UI-Increase-default-status-bar-height.patch similarity index 88% rename from patches_platform/frameworks_base/0010-UI-Increase-default-status-bar-height.patch rename to patches_platform/frameworks_base/0009-UI-Increase-default-status-bar-height.patch index 27220be..c3fcb45 100644 --- a/patches_platform/frameworks_base/0010-UI-Increase-default-status-bar-height.patch +++ b/patches_platform/frameworks_base/0009-UI-Increase-default-status-bar-height.patch @@ -1,7 +1,7 @@ -From 0e9361f835650e386bb6b797ebb1b6852d40c762 Mon Sep 17 00:00:00 2001 +From d53bbfe5b348426411d7c5739ec9910c2fcd3009 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 3 Jun 2020 01:31:34 +0000 -Subject: [PATCH 10/34] UI: Increase default status bar height +Subject: [PATCH 09/43] UI: Increase default status bar height Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07 --- @@ -9,7 +9,7 @@ Change-Id: Ibbcf63159e19bb2bb2b1094ea07ab85917630b07 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml -index 96c4bf432c05..a086f16c769e 100644 +index 291a5936330a..5aed5c540a75 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -41,7 +41,7 @@ diff --git a/patches_platform/frameworks_base/0011-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch b/patches_platform/frameworks_base/0010-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch similarity index 96% rename from patches_platform/frameworks_base/0011-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch rename to patches_platform/frameworks_base/0010-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch index 31960ef..a51b0ff 100644 --- a/patches_platform/frameworks_base/0011-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch +++ b/patches_platform/frameworks_base/0010-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch @@ -1,7 +1,7 @@ -From 635207ed57659f3c89cfa144de981706c569d9c8 Mon Sep 17 00:00:00 2001 +From 6e308897ce7844197aa8cbc7bf43b2cdaa54a3df Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 6 Oct 2020 01:41:16 +0000 -Subject: [PATCH 11/34] UI: Revive navbar layout tuning via sysui_nav_bar +Subject: [PATCH 10/43] UI: Revive navbar layout tuning via sysui_nav_bar tunable Google keeps fixing what ain't broken. diff --git a/patches_platform/frameworks_base/0012-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch b/patches_platform/frameworks_base/0011-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch similarity index 95% rename from patches_platform/frameworks_base/0012-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch rename to patches_platform/frameworks_base/0011-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch index 5267a34..01a5efa 100644 --- a/patches_platform/frameworks_base/0012-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch +++ b/patches_platform/frameworks_base/0011-UI-Use-SNAP_FIXED_RATIO-for-multi-window-globally.patch @@ -1,7 +1,7 @@ -From b2ca16f3b497b0f69e125eb9f47f2324d2a2019e Mon Sep 17 00:00:00 2001 +From 7d5902f123cc883437cf198fcc1d40c6773129a9 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 26 Apr 2020 08:56:13 +0000 -Subject: [PATCH 12/34] UI: Use SNAP_FIXED_RATIO for multi-window globally +Subject: [PATCH 11/43] UI: Use SNAP_FIXED_RATIO for multi-window globally Enables multiple snap targets under landscape for phone UI @@ -78,10 +78,10 @@ index 34b6a54be493..3921c9edfeac 100644 Only applies if the device display is not square. --> false diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml -index 369eb84ccd84..c223ec0d6ed0 100644 +index 129c7160fe63..2302cd3911d9 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml -@@ -4203,7 +4203,7 @@ +@@ -4273,7 +4273,7 @@ 1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio) 2 - 1 snap target: 1:1 --> diff --git a/patches_platform/frameworks_base/0013-core-Remove-old-app-target-SDK-dialog.patch b/patches_platform/frameworks_base/0012-core-Remove-old-app-target-SDK-dialog.patch similarity index 90% rename from patches_platform/frameworks_base/0013-core-Remove-old-app-target-SDK-dialog.patch rename to patches_platform/frameworks_base/0012-core-Remove-old-app-target-SDK-dialog.patch index 5b8f183..75f8f93 100644 --- a/patches_platform/frameworks_base/0013-core-Remove-old-app-target-SDK-dialog.patch +++ b/patches_platform/frameworks_base/0012-core-Remove-old-app-target-SDK-dialog.patch @@ -1,7 +1,7 @@ -From 77275322ff6606110bec9f11bbdc90932ab1fded Mon Sep 17 00:00:00 2001 +From 2717db2bc74bbebcde07904bdf52afae2da35cfa Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Tue, 3 Nov 2020 22:43:12 -0800 -Subject: [PATCH 13/34] core: Remove old app target SDK dialog +Subject: [PATCH 12/43] core: Remove old app target SDK dialog If an app is old, users should already know that, and there's usually no point in warning them about it because they would already be using a diff --git a/patches_platform/frameworks_base/0014-Paint-Enable-subpixel-text-positioning-by-default.patch b/patches_platform/frameworks_base/0013-Paint-Enable-subpixel-text-positioning-by-default.patch similarity index 88% rename from patches_platform/frameworks_base/0014-Paint-Enable-subpixel-text-positioning-by-default.patch rename to patches_platform/frameworks_base/0013-Paint-Enable-subpixel-text-positioning-by-default.patch index 8d3edc5..674b833 100644 --- a/patches_platform/frameworks_base/0014-Paint-Enable-subpixel-text-positioning-by-default.patch +++ b/patches_platform/frameworks_base/0013-Paint-Enable-subpixel-text-positioning-by-default.patch @@ -1,7 +1,7 @@ -From 4639be840945f29ba14ed58de8c2f538e2f487fb Mon Sep 17 00:00:00 2001 +From 38fbb12c2b6ce42d78e05248410c1de666d46700 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Tue, 5 Oct 2021 21:01:50 -0700 -Subject: [PATCH 14/34] Paint: Enable subpixel text positioning by default +Subject: [PATCH 13/43] Paint: Enable subpixel text positioning by default On desktop Linux, subpixel text positioning is necessary to avoid kerning issues, and Android is no different. Even though most phone @@ -24,10 +24,10 @@ Change-Id: I8d71e5848a745c5a2d457a28c68458920928ee09 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java -index f10cdb82022e..a083c723f9c3 100644 +index df95a91d72d7..6cbae8b67815 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java -@@ -266,7 +266,7 @@ public class Paint { +@@ -329,7 +329,7 @@ public class Paint { // These flags are always set on a new/reset paint, even if flags 0 is passed. static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG diff --git a/patches_platform/frameworks_base/0015-Remove-debuggable-requirement-for-signature-spoofing.patch b/patches_platform/frameworks_base/0014-Remove-debuggable-requirement-for-signature-spoofing.patch similarity index 79% rename from patches_platform/frameworks_base/0015-Remove-debuggable-requirement-for-signature-spoofing.patch rename to patches_platform/frameworks_base/0014-Remove-debuggable-requirement-for-signature-spoofing.patch index df57460..fc6e8e2 100644 --- a/patches_platform/frameworks_base/0015-Remove-debuggable-requirement-for-signature-spoofing.patch +++ b/patches_platform/frameworks_base/0014-Remove-debuggable-requirement-for-signature-spoofing.patch @@ -1,7 +1,7 @@ -From 33ea20cb105c85d2c7bc0bab20c5d87ecf2d3df6 Mon Sep 17 00:00:00 2001 +From 76893bd08d5c89685320342db2a3bcec2bc981f5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 17 Mar 2024 17:10:38 +0800 -Subject: [PATCH 15/34] Remove debuggable requirement for signature spoofing +Subject: [PATCH 14/43] Remove debuggable requirement for signature spoofing Change-Id: I8d637ddbbd117a9c5b1d9c5e462b0f4b30d98333 --- @@ -9,10 +9,10 @@ Change-Id: I8d637ddbbd117a9c5b1d9c5e462b0f4b30d98333 1 file changed, 4 deletions(-) diff --git a/services/core/java/com/android/server/pm/ComputerEngine.java b/services/core/java/com/android/server/pm/ComputerEngine.java -index d8cbe9d5e7c7..13af78f56462 100644 +index 7d00436857a5..10a221eb8b9f 100644 --- a/services/core/java/com/android/server/pm/ComputerEngine.java +++ b/services/core/java/com/android/server/pm/ComputerEngine.java -@@ -1472,10 +1472,6 @@ public class ComputerEngine implements Computer { +@@ -1474,10 +1474,6 @@ public class ComputerEngine implements Computer { private static native boolean isDebuggable(); public static boolean isMicrogSigned(AndroidPackage p) { diff --git a/patches_platform/frameworks_base/0015-Revert-Adding-ColorUpdateLogger-to-track-color-updat.patch b/patches_platform/frameworks_base/0015-Revert-Adding-ColorUpdateLogger-to-track-color-updat.patch new file mode 100644 index 0000000..2b732ef --- /dev/null +++ b/patches_platform/frameworks_base/0015-Revert-Adding-ColorUpdateLogger-to-track-color-updat.patch @@ -0,0 +1,1154 @@ +From 533b667c2588eb8b241da7ccbb1955190cbda4c7 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 30 Jun 2024 15:53:25 +0800 +Subject: [PATCH 15/43] Revert "Adding ColorUpdateLogger to track color updates + so that we demonstrate the root cause of our theme bugs" + +This reverts commit 3a819dee1225de25f0e228ef2c1b9447eb081661. + +Change-Id: I7f58b1fa44339d3cf76d5254c7b3aceb66e07c10 +--- + packages/SystemUI/aconfig/systemui.aconfig | 7 - + .../systemui/statusbar/NotificationShelf.java | 17 +- + .../notification/ColorUpdateLogger.kt | 153 ------------- + .../coordinator/ViewConfigCoordinator.kt | 14 +- + .../footer/ui/view/FooterView.java | 23 +- + .../row/ActivatableNotificationView.java | 6 +- + .../row/ExpandableNotificationRow.java | 21 +- + .../ExpandableNotificationRowController.java | 5 - + .../notification/row/ExpandableView.java | 6 +- + .../row/NotificationBackgroundView.java | 13 +- + .../stack/NotificationStackScrollLayout.java | 13 +- + ...tificationStackScrollLayoutController.java | 10 - + .../phone/ConfigurationControllerImpl.kt | 9 - + .../policy/ConfigurationController.java | 3 - + .../com/android/systemui/util/DrawableDump.kt | 201 ------------------ + .../coordinator/ViewConfigCoordinatorTest.kt | 6 +- + ...ExpandableNotificationRowControllerTest.kt | 3 - + .../row/NotificationTestHelper.java | 2 - + ...cationStackScrollLayoutControllerTest.java | 3 - + .../policy/FakeConfigurationController.kt | 1 - + .../leaks/FakeConfigurationController.java | 5 - + 21 files changed, 15 insertions(+), 506 deletions(-) + delete mode 100644 packages/SystemUI/src/com/android/systemui/statusbar/notification/ColorUpdateLogger.kt + delete mode 100644 packages/SystemUI/src/com/android/systemui/util/DrawableDump.kt + +diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig +index d3cd1761a919..325e0d4133aa 100644 +--- a/packages/SystemUI/aconfig/systemui.aconfig ++++ b/packages/SystemUI/aconfig/systemui.aconfig +@@ -38,13 +38,6 @@ flag { + bug: "217799515" + } + +-flag { +- name: "notification_color_update_logger" +- namespace: "systemui" +- description: "Enabled debug logging and dumping of notification color updates." +- bug: "294347738" +-} +- + flag { + name: "notifications_footer_view_refactor" + namespace: "systemui" +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +index 615534809c97..0e0f15237185 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +@@ -17,7 +17,6 @@ + package com.android.systemui.statusbar; + + import static com.android.keyguard.BouncerPanelExpansionCalculator.aboutToShowBouncerProgress; +-import static com.android.systemui.util.ColorUtilKt.hexColorString; + + import android.content.Context; + import android.content.res.Configuration; +@@ -43,7 +42,6 @@ import com.android.systemui.flags.Flags; + import com.android.systemui.flags.RefactorFlag; + import com.android.systemui.res.R; + import com.android.systemui.shade.transition.LargeScreenShadeInterpolator; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.NotificationUtils; + import com.android.systemui.statusbar.notification.SourceType; + import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; +@@ -189,8 +187,8 @@ public class NotificationShelf extends ActivatableNotificationView { + + @Override + public String toString() { +- return super.toString() +- + " (hideBackground=" + mHideBackground ++ return "NotificationShelf" ++ + "(hideBackground=" + mHideBackground + + " notGoneIndex=" + mNotGoneIndex + + " hasItemsInStableShelf=" + mHasItemsInStableShelf + + " interactive=" + mInteractive +@@ -370,17 +368,6 @@ public class NotificationShelf extends ActivatableNotificationView { + && isYInView(localY, slop, top, bottom); + } + +- @Override +- public void updateBackgroundColors() { +- super.updateBackgroundColors(); +- ColorUpdateLogger colorUpdateLogger = ColorUpdateLogger.getInstance(); +- if (colorUpdateLogger != null) { +- colorUpdateLogger.logEvent("Shelf.updateBackgroundColors()", +- "normalBgColor=" + hexColorString(getNormalBgColor()) +- + " background=" + mBackgroundNormal.toDumpString()); +- } +- } +- + /** + * Update the shelf appearance based on the other notifications around it. This transforms + * the icons from the notification area into the shelf. +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ColorUpdateLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ColorUpdateLogger.kt +deleted file mode 100644 +index 0f0ab2e36b8d..000000000000 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ColorUpdateLogger.kt ++++ /dev/null +@@ -1,153 +0,0 @@ +-/* +- * Copyright (C) 2023 The Android Open Source Project +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License +- */ +- +-package com.android.systemui.statusbar.notification +- +-import android.icu.text.SimpleDateFormat +-import android.util.IndentingPrintWriter +-import com.android.systemui.Dumpable +-import com.android.systemui.Flags.notificationColorUpdateLogger +-import com.android.systemui.dagger.SysUISingleton +-import com.android.systemui.dump.DumpManager +-import com.android.systemui.flags.FeatureFlagsClassic +-import com.android.systemui.util.Compile +-import com.android.systemui.util.asIndenting +-import com.android.systemui.util.printCollection +-import com.android.systemui.util.withIncreasedIndent +-import com.google.errorprone.annotations.CompileTimeConstant +-import java.io.PrintWriter +-import java.util.Locale +-import java.util.SortedSet +-import java.util.TreeSet +-import javax.inject.Inject +- +-@SysUISingleton +-class ColorUpdateLogger +-@Inject +-constructor( +- val featureFlags: FeatureFlagsClassic, +- dumpManager: DumpManager, +-) : Dumpable { +- +- inline val isEnabled +- get() = Compile.IS_DEBUG && notificationColorUpdateLogger() +- private val frames: MutableList = mutableListOf() +- +- init { +- dumpManager.registerDumpable(this) +- if (isEnabled) { +- instance = this +- } +- } +- +- @JvmOverloads +- fun logTriggerEvent(@CompileTimeConstant type: String, extra: String? = null) { +- if (!isEnabled) return +- val event = Event(type = type, extraValue = extra) +- val didAppend = frames.lastOrNull()?.tryAddTrigger(event) == true +- if (!didAppend) { +- frames.add(Frame(event)) +- if (frames.size > maxFrames) frames.removeAt(0) +- } +- } +- +- @JvmOverloads +- fun logEvent(@CompileTimeConstant type: String, extra: String? = null) { +- if (!isEnabled) return +- val frame = frames.lastOrNull() ?: return +- frame.events.add(Event(type = type, extraValue = extra)) +- frame.trim() +- } +- +- @JvmOverloads +- fun logNotificationEvent( +- @CompileTimeConstant type: String, +- key: String, +- extra: String? = null +- ) { +- if (!isEnabled) return +- val frame = frames.lastOrNull() ?: return +- frame.events.add(Event(type = type, extraValue = extra, notificationKey = key)) +- frame.trim() +- } +- +- override fun dump(pwOrig: PrintWriter, args: Array) { +- val pw = pwOrig.asIndenting() +- pw.println("enabled: $isEnabled") +- pw.printCollection("frames", frames) { it.dump(pw) } +- } +- +- private class Frame(event: Event) { +- val startTime: Long = event.time +- val events: MutableList = mutableListOf(event) +- val triggers: SortedSet = TreeSet().apply { add(event.type) } +- var trimmedEvents: Int = 0 +- +- fun tryAddTrigger(newEvent: Event): Boolean { +- if (newEvent.time < startTime) return false +- if (newEvent.time - startTime > triggerStartsNewFrameAge) return false +- if (newEvent.type in triggers) return false +- triggers.add(newEvent.type) +- events.add(newEvent) +- trim() +- return true +- } +- +- fun trim() { +- if (events.size > maxEventsPerFrame) { +- events.removeAt(0) +- trimmedEvents++ +- } +- } +- +- fun dump(pw: IndentingPrintWriter) { +- pw.println("Frame") +- pw.withIncreasedIndent { +- pw.println("startTime: ${timeString(startTime)}") +- pw.printCollection("triggers", triggers) +- pw.println("trimmedEvents: $trimmedEvents") +- pw.printCollection("events", events) { it.dump(pw) } +- } +- } +- } +- +- private class Event( +- @CompileTimeConstant val type: String, +- val extraValue: String? = null, +- val notificationKey: String? = null, +- ) { +- val time: Long = System.currentTimeMillis() +- +- fun dump(pw: IndentingPrintWriter) { +- pw.append(timeString(time)).append(": ").append(type) +- extraValue?.let { pw.append(" ").append(it) } +- notificationKey?.let { pw.append(" ---- ").append(logKey(it)) } +- pw.println() +- } +- } +- +- private companion object { +- @JvmStatic +- var instance: ColorUpdateLogger? = null +- private set +- private const val maxFrames = 5 +- private const val maxEventsPerFrame = 250 +- private const val triggerStartsNewFrameAge = 5000 +- +- private val dateFormat = SimpleDateFormat("MM-dd HH:mm:ss.SSS", Locale.US) +- private fun timeString(time: Long): String = dateFormat.format(time) +- } +-} +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinator.kt +index b8a959440312..3809ea0f58da 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinator.kt ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinator.kt +@@ -23,7 +23,6 @@ import com.android.keyguard.KeyguardUpdateMonitor + import com.android.keyguard.KeyguardUpdateMonitorCallback + import com.android.systemui.statusbar.NotificationLockscreenUserManager + import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener +-import com.android.systemui.statusbar.notification.ColorUpdateLogger + import com.android.systemui.statusbar.notification.collection.NotifPipeline + import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope + import com.android.systemui.statusbar.notification.row.NotificationGutsManager +@@ -42,8 +41,7 @@ class ViewConfigCoordinator @Inject internal constructor( + private val mConfigurationController: ConfigurationController, + private val mLockscreenUserManager: NotificationLockscreenUserManager, + private val mGutsManager: NotificationGutsManager, +- private val mKeyguardUpdateMonitor: KeyguardUpdateMonitor, +- private val colorUpdateLogger: ColorUpdateLogger, ++ private val mKeyguardUpdateMonitor: KeyguardUpdateMonitor + ) : Coordinator, ConfigurationController.ConfigurationListener { + + private var mIsSwitchingUser = false +@@ -53,13 +51,11 @@ class ViewConfigCoordinator @Inject internal constructor( + + private val mKeyguardUpdateCallback = object : KeyguardUpdateMonitorCallback() { + override fun onUserSwitching(userId: Int) { +- colorUpdateLogger.logTriggerEvent("VCC.mKeyguardUpdateCallback.onUserSwitching()") + log { "ViewConfigCoordinator.onUserSwitching(userId=$userId)" } + mIsSwitchingUser = true + } + + override fun onUserSwitchComplete(userId: Int) { +- colorUpdateLogger.logTriggerEvent("VCC.mKeyguardUpdateCallback.onUserSwitchComplete()") + log { "ViewConfigCoordinator.onUserSwitchComplete(userId=$userId)" } + mIsSwitchingUser = false + applyChangesOnUserSwitched() +@@ -68,7 +64,6 @@ class ViewConfigCoordinator @Inject internal constructor( + + private val mUserChangedListener = object : UserChangedListener { + override fun onUserChanged(userId: Int) { +- colorUpdateLogger.logTriggerEvent("VCC.mUserChangedListener.onUserChanged()") + log { "ViewConfigCoordinator.onUserChanged(userId=$userId)" } + applyChangesOnUserSwitched() + } +@@ -82,7 +77,6 @@ class ViewConfigCoordinator @Inject internal constructor( + } + + override fun onDensityOrFontScaleChanged() { +- colorUpdateLogger.logTriggerEvent("VCC.onDensityOrFontScaleChanged()") + log { + val keyguardIsSwitchingUser = mKeyguardUpdateMonitor.isSwitchingUser + "ViewConfigCoordinator.onDensityOrFontScaleChanged()" + +@@ -99,7 +93,6 @@ class ViewConfigCoordinator @Inject internal constructor( + } + + override fun onUiModeChanged() { +- colorUpdateLogger.logTriggerEvent("VCC.onUiModeChanged()") + log { + val keyguardIsSwitchingUser = mKeyguardUpdateMonitor.isSwitchingUser + "ViewConfigCoordinator.onUiModeChanged()" + +@@ -114,12 +107,10 @@ class ViewConfigCoordinator @Inject internal constructor( + } + + override fun onThemeChanged() { +- colorUpdateLogger.logTriggerEvent("VCC.onThemeChanged()") + onDensityOrFontScaleChanged() + } + + private fun applyChangesOnUserSwitched() { +- colorUpdateLogger.logEvent("VCC.applyChangesOnUserSwitched()") + if (mReinflateNotificationsOnUserSwitched) { + updateNotificationsOnDensityOrFontScaleChanged() + mReinflateNotificationsOnUserSwitched = false +@@ -131,8 +122,6 @@ class ViewConfigCoordinator @Inject internal constructor( + } + + private fun updateNotificationsOnUiModeChanged() { +- colorUpdateLogger.logEvent("VCC.updateNotificationsOnUiModeChanged()", +- "mode=" + mConfigurationController.nightModeName) + log { "ViewConfigCoordinator.updateNotificationsOnUiModeChanged()" } + traceSection("updateNotifOnUiModeChanged") { + mPipeline?.allNotifs?.forEach { entry -> +@@ -142,7 +131,6 @@ class ViewConfigCoordinator @Inject internal constructor( + } + + private fun updateNotificationsOnDensityOrFontScaleChanged() { +- colorUpdateLogger.logEvent("VCC.updateNotificationsOnDensityOrFontScaleChanged()") + mPipeline?.allNotifs?.forEach { entry -> + entry.onDensityOrFontScaleChanged() + val exposedGuts = entry.areGutsExposed() +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java +index f792898520a2..16f18a3c3fb6 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java +@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.notification.footer.ui.view; + import static android.graphics.PorterDuff.Mode.SRC_ATOP; + + import static com.android.systemui.Flags.notificationBackgroundTintOptimization; +-import static com.android.systemui.util.ColorUtilKt.hexColorString; + + import android.annotation.ColorInt; + import android.annotation.DrawableRes; +@@ -41,13 +40,11 @@ import androidx.annotation.NonNull; + + import com.android.settingslib.Utils; + import com.android.systemui.res.R; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor; + import com.android.systemui.statusbar.notification.row.FooterViewButton; + import com.android.systemui.statusbar.notification.row.StackScrollerDecorView; + import com.android.systemui.statusbar.notification.stack.ExpandableViewState; + import com.android.systemui.statusbar.notification.stack.ViewState; +-import com.android.systemui.util.DrawableDumpKt; + import com.android.systemui.util.DumpUtilsKt; + + import java.io.PrintWriter; +@@ -242,10 +239,6 @@ public class FooterView extends StackScrollerDecorView { + + @Override + protected void onFinishInflate() { +- ColorUpdateLogger colorUpdateLogger = ColorUpdateLogger.getInstance(); +- if (colorUpdateLogger != null) { +- colorUpdateLogger.logTriggerEvent("Footer.onFinishInflate()"); +- } + super.onFinishInflate(); + mClearAllButton = (FooterViewButton) findSecondaryView(); + mManageOrHistoryButton = findViewById(R.id.manage_text); +@@ -355,10 +348,6 @@ public class FooterView extends StackScrollerDecorView { + + @Override + protected void onConfigurationChanged(Configuration newConfig) { +- ColorUpdateLogger colorUpdateLogger = ColorUpdateLogger.getInstance(); +- if (colorUpdateLogger != null) { +- colorUpdateLogger.logTriggerEvent("Footer.onConfigurationChanged()"); +- } + super.onConfigurationChanged(newConfig); + updateColors(); + if (!FooterViewRefactor.isEnabled()) { +@@ -376,17 +365,14 @@ public class FooterView extends StackScrollerDecorView { + com.android.internal.R.attr.materialColorOnSurface); + final Drawable clearAllBg = theme.getDrawable(R.drawable.notif_footer_btn_background); + final Drawable manageBg = theme.getDrawable(R.drawable.notif_footer_btn_background); +- final @ColorInt int scHigh; + if (!notificationBackgroundTintOptimization()) { +- scHigh = Utils.getColorAttrDefaultColor(mContext, ++ final @ColorInt int scHigh = Utils.getColorAttrDefaultColor(mContext, + com.android.internal.R.attr.materialColorSurfaceContainerHigh); + if (scHigh != 0) { + final ColorFilter bgColorFilter = new PorterDuffColorFilter(scHigh, SRC_ATOP); + clearAllBg.setColorFilter(bgColorFilter); + manageBg.setColorFilter(bgColorFilter); + } +- } else { +- scHigh = 0; + } + mClearAllButton.setBackground(clearAllBg); + mClearAllButton.setTextColor(onSurface); +@@ -394,13 +380,6 @@ public class FooterView extends StackScrollerDecorView { + mManageOrHistoryButton.setTextColor(onSurface); + mSeenNotifsFooterTextView.setTextColor(onSurface); + mSeenNotifsFooterTextView.setCompoundDrawableTintList(ColorStateList.valueOf(onSurface)); +- ColorUpdateLogger colorUpdateLogger = ColorUpdateLogger.getInstance(); +- if (colorUpdateLogger != null) { +- colorUpdateLogger.logEvent("Footer.updateColors()", +- "textColor(onSurface)=" + hexColorString(onSurface) +- + " backgroundTint(surfaceContainerHigh)=" + hexColorString(scHigh) +- + " background=" + DrawableDumpKt.dumpToString(manageBg)); +- } + } + + private void updateResources() { +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +index 61cdea190a43..83c50f52af6f 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +@@ -88,7 +88,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView + private boolean mActivated; + + private Interpolator mCurrentAppearInterpolator; +- protected NotificationBackgroundView mBackgroundNormal; ++ NotificationBackgroundView mBackgroundNormal; + private float mAnimationTranslationY; + private boolean mDrawingAppearAnimation; + private ValueAnimator mAppearAnimator; +@@ -142,10 +142,6 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView + updateBackgroundTint(); + } + +- protected int getNormalBgColor() { +- return mNormalColor; +- } +- + /** + * @param width The actual width to apply to the background view. + */ +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +index 1bb5a771a543..e564a15f462f 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +@@ -21,7 +21,6 @@ import static android.service.notification.NotificationListenerService.REASON_CA + + import static com.android.systemui.statusbar.notification.collection.NotificationEntry.DismissState.PARENT_DISMISSED; + import static com.android.systemui.statusbar.notification.row.NotificationContentView.VISIBLE_TYPE_HEADSUP; +-import static com.android.systemui.util.ColorUtilKt.hexColorString; + + import android.animation.Animator; + import android.animation.AnimatorListenerAdapter; +@@ -86,7 +85,6 @@ import com.android.systemui.statusbar.RemoteInputController; + import com.android.systemui.statusbar.SmartReplyController; + import com.android.systemui.statusbar.StatusBarIconView; + import com.android.systemui.statusbar.notification.AboveShelfChangedListener; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.FeedbackIcon; + import com.android.systemui.statusbar.notification.LaunchAnimationParameters; + import com.android.systemui.statusbar.notification.NotificationFadeAware; +@@ -176,7 +174,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + private Optional mBubblesManagerOptional; + private MetricsLogger mMetricsLogger; + private NotificationChildrenContainerLogger mChildrenContainerLogger; +- private ColorUpdateLogger mColorUpdateLogger; + private NotificationDismissibilityProvider mDismissibilityProvider; + private FeatureFlags mFeatureFlags; + private int mIconTransformContentShift; +@@ -451,7 +448,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + + /** + * Sets animations running in the layouts of this row, including public, private, and children. +- * + * @param running whether the animations should be started running or stopped. + */ + public void setAnimationRunning(boolean running) { +@@ -621,12 +617,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + + private void updateBackgroundColorsOfSelf() { + super.updateBackgroundColors(); +- if (mColorUpdateLogger.isEnabled()) { +- mColorUpdateLogger.logNotificationEvent("ENR.updateBackgroundColorsOfSelf()", +- mLoggingKey, +- "normalBgColor=" + hexColorString(getNormalBgColor()) +- + " background=" + mBackgroundNormal.toDumpString()); +- } + } + + @Override +@@ -1408,7 +1398,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + } + + public void setContentBackground(int customBackgroundColor, boolean animate, +- NotificationContentView notificationContentView) { ++ NotificationContentView notificationContentView) { + if (getShowingLayout() == notificationContentView) { + setTintColor(customBackgroundColor, animate); + } +@@ -1477,7 +1467,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + } + + /** +- * @return if this entry should be kept in its parent during removal. ++ * @return if this entry should be kept in its parent during removal. + */ + public boolean keepInParentForDismissAnimation() { + return mKeepInParentForDismissAnimation; +@@ -1824,7 +1814,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + NotificationDismissibilityProvider dismissibilityProvider, + MetricsLogger metricsLogger, + NotificationChildrenContainerLogger childrenContainerLogger, +- ColorUpdateLogger colorUpdateLogger, + SmartReplyConstants smartReplyConstants, + SmartReplyController smartReplyController, + FeatureFlags featureFlags, +@@ -1863,7 +1852,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + mNotificationGutsManager = gutsManager; + mMetricsLogger = metricsLogger; + mChildrenContainerLogger = childrenContainerLogger; +- mColorUpdateLogger = colorUpdateLogger; + mDismissibilityProvider = dismissibilityProvider; + mFeatureFlags = featureFlags; + } +@@ -2322,7 +2310,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + } + + public Animator getTranslateViewAnimator(final float leftTarget, +- AnimatorUpdateListener listener) { ++ AnimatorUpdateListener listener) { + if (mTranslateAnim != null) { + mTranslateAnim.cancel(); + } +@@ -2721,7 +2709,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + return getCollapsedHeight(); + } + } +- + /** + * @return {@code true} if the notification can show it's heads up layout. This is mostly true + * except for legacy use cases. +@@ -2906,7 +2893,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView + + @Override + public void setHideSensitive(boolean hideSensitive, boolean animated, long delay, +- long duration) { ++ long duration) { + if (getVisibility() == GONE) { + // If we are GONE, the hideSensitive parameter will not be calculated and always be + // false, which is incorrect, let's wait until a real call comes in later. +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +index e59829bf3c99..5614f3a3fcc5 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +@@ -41,7 +41,6 @@ import com.android.systemui.plugins.PluginManager; + import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; + import com.android.systemui.plugins.statusbar.StatusBarStateController; + import com.android.systemui.statusbar.SmartReplyController; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.FeedbackIcon; + import com.android.systemui.statusbar.notification.collection.NotificationEntry; + import com.android.systemui.statusbar.notification.collection.provider.NotificationDismissibilityProvider; +@@ -87,7 +86,6 @@ public class ExpandableNotificationRowController implements NotifViewController + private final SystemClock mClock; + private final String mAppName; + private final String mNotificationKey; +- private final ColorUpdateLogger mColorUpdateLogger; + private final KeyguardBypassController mKeyguardBypassController; + private final GroupMembershipManager mGroupMembershipManager; + private final GroupExpansionManager mGroupExpansionManager; +@@ -202,7 +200,6 @@ public class ExpandableNotificationRowController implements NotifViewController + ActivatableNotificationViewController activatableNotificationViewController, + RemoteInputViewSubcomponent.Factory rivSubcomponentFactory, + MetricsLogger metricsLogger, +- ColorUpdateLogger colorUpdateLogger, + NotificationRowLogger logBufferLogger, + NotificationChildrenContainerLogger childrenContainerLogger, + NotificationListContainer listContainer, +@@ -259,7 +256,6 @@ public class ExpandableNotificationRowController implements NotifViewController + mDragController = dragController; + mMetricsLogger = metricsLogger; + mChildrenContainerLogger = childrenContainerLogger; +- mColorUpdateLogger = colorUpdateLogger; + mLogBufferLogger = logBufferLogger; + mSmartReplyConstants = smartReplyConstants; + mSmartReplyController = smartReplyController; +@@ -294,7 +290,6 @@ public class ExpandableNotificationRowController implements NotifViewController + mDismissibilityProvider, + mMetricsLogger, + mChildrenContainerLogger, +- mColorUpdateLogger, + mSmartReplyConstants, + mSmartReplyController, + mFeatureFlags, +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java +index ea9df9af8cff..ec8e5d730c36 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java +@@ -16,8 +16,6 @@ + + package com.android.systemui.statusbar.notification.row; + +-import static com.android.systemui.Flags.notificationColorUpdateLogger; +- + import android.animation.AnimatorListenerAdapter; + import android.content.Context; + import android.content.res.Configuration; +@@ -56,8 +54,8 @@ import java.util.List; + public abstract class ExpandableView extends FrameLayout implements Dumpable, Roundable { + private static final String TAG = "ExpandableView"; + /** whether the dump() for this class should include verbose details */ +- protected static final boolean DUMP_VERBOSE = Compile.IS_DEBUG +- && (Log.isLoggable(TAG, Log.VERBOSE) || notificationColorUpdateLogger()); ++ protected static final boolean DUMP_VERBOSE = ++ Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE); + + private RoundableState mRoundableState = null; + protected OnHeightChangedListener mOnHeightChangedListener; +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java +index ed3a38d3305b..7ea9b14353d3 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java +@@ -36,7 +36,6 @@ import com.android.internal.util.ContrastColorUtil; + import com.android.settingslib.Utils; + import com.android.systemui.Dumpable; + import com.android.systemui.res.R; +-import com.android.systemui.util.DrawableDumpKt; + + import java.io.PrintWriter; + import java.util.Arrays; +@@ -334,16 +333,6 @@ public class NotificationBackgroundView extends View implements Dumpable { + pw.println("mActualHeight: " + mActualHeight); + pw.println("mTintColor: " + hexColorString(mTintColor)); + pw.println("mRippleColor: " + hexColorString(mRippleColor)); +- pw.println("mBackground: " + DrawableDumpKt.dumpToString(mBackground)); +- } +- +- /** create a concise dump of this view's colors */ +- public String toDumpString() { +- return ""; +- ++ pw.println("mBackground: " + mBackground); + } + } +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +index 27db84f6715e..fb8bc7a34a9c 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +@@ -99,7 +99,6 @@ import com.android.systemui.shade.TouchLogger; + import com.android.systemui.statusbar.EmptyShadeView; + import com.android.systemui.statusbar.NotificationShelf; + import com.android.systemui.statusbar.StatusBarState; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.FakeShadowView; + import com.android.systemui.statusbar.notification.LaunchAnimationParameters; + import com.android.systemui.statusbar.notification.NotificationTransitionAnimatorController; +@@ -123,7 +122,6 @@ import com.android.systemui.statusbar.policy.HeadsUpUtil; + import com.android.systemui.statusbar.policy.ScrollAdapter; + import com.android.systemui.statusbar.policy.SplitShadeStateController; + import com.android.systemui.util.Assert; +-import com.android.systemui.util.ColorUtilKt; + import com.android.systemui.util.Compile; + import com.android.systemui.util.DumpUtilsKt; + +@@ -817,8 +815,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable + updateBackgroundDimming(); + for (int i = 0; i < getChildCount(); i++) { + View child = getChildAt(i); +- if (child instanceof ActivatableNotificationView activatableView) { +- activatableView.updateBackgroundColors(); ++ if (child instanceof ActivatableNotificationView) { ++ ((ActivatableNotificationView) child).updateBackgroundColors(); + } + } + } +@@ -4632,13 +4630,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable + final @ColorInt int onSurfaceVariant = Utils.getColorAttrDefaultColor( + mContext, com.android.internal.R.attr.materialColorOnSurfaceVariant); + +- ColorUpdateLogger colorUpdateLogger = ColorUpdateLogger.getInstance(); +- if (colorUpdateLogger != null) { +- colorUpdateLogger.logEvent("NSSL.updateDecorViews()", +- "onSurface=" + ColorUtilKt.hexColorString(onSurface) +- + " onSurfaceVariant=" + ColorUtilKt.hexColorString(onSurfaceVariant)); +- } +- + mSectionsManager.setHeaderForegroundColors(onSurface, onSurfaceVariant); + + if (mFooterView != null) { +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +index 7c138776d5a5..6dd07e1915b5 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +@@ -96,7 +96,6 @@ import com.android.systemui.statusbar.NotificationShelf; + import com.android.systemui.statusbar.RemoteInputController; + import com.android.systemui.statusbar.StatusBarState; + import com.android.systemui.statusbar.SysuiStatusBarStateController; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.DynamicPrivacyController; + import com.android.systemui.statusbar.notification.LaunchAnimationParameters; + import com.android.systemui.statusbar.notification.NotificationActivityStarter; +@@ -178,7 +177,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { + private final ConfigurationController mConfigurationController; + private final ZenModeController mZenModeController; + private final MetricsLogger mMetricsLogger; +- private final ColorUpdateLogger mColorUpdateLogger; + + private final DumpManager mDumpManager; + private final FalsingCollector mFalsingCollector; +@@ -241,7 +239,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { + new View.OnAttachStateChangeListener() { + @Override + public void onViewAttachedToWindow(View v) { +- mColorUpdateLogger.logTriggerEvent("NSSLC.onViewAttachedToWindow()"); + mConfigurationController.addCallback(mConfigurationListener); + if (!FooterViewRefactor.isEnabled()) { + mZenModeController.addCallback(mZenModeControllerCallback); +@@ -257,7 +254,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { + + @Override + public void onViewDetachedFromWindow(View v) { +- mColorUpdateLogger.logTriggerEvent("NSSLC.onViewDetachedFromWindow()"); + mConfigurationController.removeCallback(mConfigurationListener); + if (!FooterViewRefactor.isEnabled()) { + mZenModeController.removeCallback(mZenModeControllerCallback); +@@ -336,16 +332,12 @@ public class NotificationStackScrollLayoutController implements Dumpable { + + @Override + public void onUiModeChanged() { +- mColorUpdateLogger.logTriggerEvent("NSSLC.onUiModeChanged()", +- "mode=" + mConfigurationController.getNightModeName()); + mView.updateBgColor(); + mView.updateDecorViews(); + } + + @Override + public void onThemeChanged() { +- mColorUpdateLogger.logTriggerEvent("NSSLC.onThemeChanged()", +- "mode=" + mConfigurationController.getNightModeName()); + mView.updateCornerRadius(); + mView.updateBgColor(); + mView.updateDecorViews(); +@@ -727,7 +719,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { + ZenModeController zenModeController, + NotificationLockscreenUserManager lockscreenUserManager, + MetricsLogger metricsLogger, +- ColorUpdateLogger colorUpdateLogger, + DumpManager dumpManager, + FalsingCollector falsingCollector, + FalsingManager falsingManager, +@@ -782,7 +773,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { + mZenModeController = zenModeController; + mLockscreenUserManager = lockscreenUserManager; + mMetricsLogger = metricsLogger; +- mColorUpdateLogger = colorUpdateLogger; + mDumpManager = dumpManager; + mLockscreenShadeTransitionController = lockscreenShadeTransitionController; + mFalsingCollector = falsingCollector; +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt +index dea94162ad0e..6e8ad2e50620 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt +@@ -159,15 +159,6 @@ class ConfigurationControllerImpl @Inject constructor( + override fun isLayoutRtl(): Boolean { + return layoutDirection == LAYOUT_DIRECTION_RTL + } +- +- override fun getNightModeName(): String { +- return when (uiMode and Configuration.UI_MODE_NIGHT_MASK) { +- Configuration.UI_MODE_NIGHT_YES -> "night" +- Configuration.UI_MODE_NIGHT_NO -> "day" +- Configuration.UI_MODE_NIGHT_UNDEFINED -> "undefined" +- else -> "err" +- } +- } + } + + // This could be done with a Collection.filter and Collection.forEach, but Collection.filter +diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java +index cec77c12a40b..b2ef818d3282 100644 +--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java ++++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java +@@ -33,9 +33,6 @@ public interface ConfigurationController extends CallbackController { +- return drawable.getStateField("mSolidColors") +- } +- is LayerDrawable -> { +- for (iLayer in 0 until drawable.numberOfLayers) { +- getSolidColors(drawable.getDrawable(iLayer))?.let { +- return it +- } +- } +- null +- } +- is DrawableWrapper -> { +- return getSolidColors(drawable.drawable) +- } +- else -> null +- } +-} +- +-private fun StringBuilder.appendDrawable(drawable: Drawable?): StringBuilder { +- if (drawable == null) { +- append("null") +- return this +- } +- append("<") +- append(drawable.javaClass.simpleName) +- +- drawable.getStateField("mTint", fieldRequired = false)?.let { +- append(" tint=") +- appendColors(it) +- append(" blendMode=") +- append(drawable.getStateField("mBlendMode")) +- } +- drawable.colorFilter +- ?.takeUnless { drawable is DrawableWrapper } +- ?.let { +- append(" colorFilter=") +- appendColorFilter(it) +- } +- when (drawable) { +- is DrawableWrapper -> { +- append(" wrapped=") +- appendDrawable(drawable.drawable) +- } +- is LayerDrawable -> { +- if (drawable is RippleDrawable) { +- drawable.getStateField("mColor")?.let { +- append(" color=") +- appendColors(it) +- } +- drawable.effectColor?.let { +- append(" effectColor=") +- appendColors(it) +- } +- } +- append(" layers=[") +- for (iLayer in 0 until drawable.numberOfLayers) { +- if (iLayer != 0) append(", ") +- appendDrawable(drawable.getDrawable(iLayer)) +- } +- append("]") +- } +- is GradientDrawable -> { +- drawable +- .getStateField("mShape") +- ?.takeIf { it != 0 } +- ?.let { +- append(" shape=") +- append(it) +- } +- drawable.getStateField("mSolidColors")?.let { +- append(" solidColors=") +- appendColors(it) +- } +- drawable.getStateField("mStrokeColors")?.let { +- append(" strokeColors=") +- appendColors(it) +- } +- drawable.colors?.let { +- append(" gradientColors=[") +- it.forEachIndexed { iColor, color -> +- if (iColor != 0) append(", ") +- append(hexColorString(color)) +- } +- append("]") +- } +- } +- } +- append(">") +- return this +-} +- +-private inline fun Drawable.getStateField( +- name: String, +- fieldRequired: Boolean = true +-): T? { +- val state = this.constantState ?: return null +- val clazz = state.javaClass +- return try { +- val field = clazz.getDeclaredField(name) +- field.isAccessible = true +- field.get(state) as T? +- } catch (ex: Exception) { +- if (fieldRequired) { +- Log.w(TAG, "Missing ${clazz.simpleName}.$name: ${T::class.simpleName}", ex) +- } else if (Log.isLoggable(TAG, Log.VERBOSE)) { +- Log.v(TAG, "Missing ${clazz.simpleName}.$name: ${T::class.simpleName} ($ex)") +- } +- null +- } +-} +- +-private fun Appendable.appendColors(colorStateList: ColorStateList?) { +- if (colorStateList == null) { +- append("null") +- return +- } +- val colors = colorStateList.colors +- if (colors.size == 1) { +- append(hexColorString(colors[0])) +- return +- } +- append("") +-} +- +-private fun Appendable.appendColorFilter(colorFilter: ColorFilter?) { +- if (colorFilter == null) { +- append("null") +- return +- } +- append("<") +- append(colorFilter.javaClass.simpleName) +- when (colorFilter) { +- is PorterDuffColorFilter -> { +- append(" color=") +- append(hexColorString(colorFilter.color)) +- append(" mode=") +- append(colorFilter.mode.toString()) +- } +- is BlendModeColorFilter -> { +- append(" color=") +- append(hexColorString(colorFilter.color)) +- append(" mode=") +- append(colorFilter.mode.toString()) +- } +- is LightingColorFilter -> { +- append(" multiply=") +- append(hexColorString(colorFilter.colorMultiply)) +- append(" add=") +- append(hexColorString(colorFilter.colorAdd)) +- } +- else -> append(" unhandled") +- } +- append(">") +-} +- +-private const val TAG = "DrawableDump" +diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt +index b1d2ea21f7fc..0830191fe035 100644 +--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt ++++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt +@@ -23,7 +23,6 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback + import com.android.systemui.SysuiTestCase + import com.android.systemui.statusbar.NotificationLockscreenUserManager + import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener +-import com.android.systemui.statusbar.notification.ColorUpdateLogger + import com.android.systemui.statusbar.notification.collection.NotifPipeline + import com.android.systemui.statusbar.notification.collection.NotificationEntry + import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow +@@ -58,7 +57,6 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { + private val lockscreenUserManager: NotificationLockscreenUserManager = mock() + private val gutsManager: NotificationGutsManager = mock() + private val keyguardUpdateMonitor: KeyguardUpdateMonitor = mock() +- private val colorUpdateLogger: ColorUpdateLogger = mock() + + @Before + fun setUp() { +@@ -68,9 +66,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { + configurationController, + lockscreenUserManager, + gutsManager, +- keyguardUpdateMonitor, +- colorUpdateLogger, +- ) ++ keyguardUpdateMonitor) + coordinator.attach(pipeline) + userChangedListener = withArgCaptor { + verify(lockscreenUserManager).addUserChangedListener(capture()) +diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt +index 210b1a7f22f4..8ac2a334818c 100644 +--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt ++++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt +@@ -34,7 +34,6 @@ import com.android.systemui.plugins.PluginManager + import com.android.systemui.plugins.statusbar.StatusBarStateController + import com.android.systemui.statusbar.SbnBuilder + import com.android.systemui.statusbar.SmartReplyController +-import com.android.systemui.statusbar.notification.ColorUpdateLogger + import com.android.systemui.statusbar.notification.collection.NotificationEntry + import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder + import com.android.systemui.statusbar.notification.collection.provider.NotificationDismissibilityProvider +@@ -83,7 +82,6 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() { + private val rivSubComponentFactory: RemoteInputViewSubcomponent.Factory = mock() + private val metricsLogger: MetricsLogger = mock() + private val logBufferLogger = NotificationRowLogger(logcatLogBuffer(), logcatLogBuffer()) +- private val colorUpdateLogger: ColorUpdateLogger = mock() + private val listContainer: NotificationListContainer = mock() + private val childrenContainer: NotificationChildrenContainer = mock() + private val smartReplyConstants: SmartReplyConstants = mock() +@@ -119,7 +117,6 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() { + activableNotificationViewController, + rivSubComponentFactory, + metricsLogger, +- colorUpdateLogger, + logBufferLogger, + NotificationChildrenContainerLogger(logcatLogBuffer()), + listContainer, +diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java +index 84139da38004..53b6dabf697b 100644 +--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java ++++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java +@@ -65,7 +65,6 @@ import com.android.systemui.statusbar.NotificationMediaManager; + import com.android.systemui.statusbar.NotificationRemoteInputManager; + import com.android.systemui.statusbar.NotificationShadeWindowController; + import com.android.systemui.statusbar.SmartReplyController; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.ConversationNotificationProcessor; + import com.android.systemui.statusbar.notification.SourceType; + import com.android.systemui.statusbar.notification.collection.NotificationEntry; +@@ -606,7 +605,6 @@ public class NotificationTestHelper { + mDismissibilityProvider, + mock(MetricsLogger.class), + new NotificationChildrenContainerLogger(logcatLogBuffer()), +- mock(ColorUpdateLogger.class), + mock(SmartReplyConstants.class), + mock(SmartReplyController.class), + mFeatureFlags, +diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +index a4f88fbe1469..0b37b284ef25 100644 +--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java ++++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +@@ -78,7 +78,6 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChan + import com.android.systemui.statusbar.NotificationRemoteInputManager; + import com.android.systemui.statusbar.RemoteInputController; + import com.android.systemui.statusbar.SysuiStatusBarStateController; +-import com.android.systemui.statusbar.notification.ColorUpdateLogger; + import com.android.systemui.statusbar.notification.DynamicPrivacyController; + import com.android.systemui.statusbar.notification.collection.NotifCollection; + import com.android.systemui.statusbar.notification.collection.NotifPipeline; +@@ -149,7 +148,6 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { + @Mock private PrimaryBouncerInteractor mPrimaryBouncerInteractor; + @Mock private NotificationLockscreenUserManager mNotificationLockscreenUserManager; + @Mock private MetricsLogger mMetricsLogger; +- @Mock private ColorUpdateLogger mColorUpdateLogger; + @Mock private DumpManager mDumpManager; + @Mock(answer = Answers.RETURNS_SELF) + private NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder; +@@ -1009,7 +1007,6 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { + mZenModeController, + mNotificationLockscreenUserManager, + mMetricsLogger, +- mColorUpdateLogger, + mDumpManager, + new FalsingCollectorFake(), + new FalsingManagerFake(), +diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/FakeConfigurationController.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/FakeConfigurationController.kt +index 46a10532ea52..c51de334c8ca 100644 +--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/FakeConfigurationController.kt ++++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/FakeConfigurationController.kt +@@ -43,7 +43,6 @@ class FakeConfigurationController @Inject constructor() : ConfigurationControlle + } + + override fun isLayoutRtl(): Boolean = isRtl +- override fun getNightModeName(): String = "undefined" + } + + @Module +diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeConfigurationController.java b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeConfigurationController.java +index 111c40d49efc..516eb6e6dffd 100644 +--- a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeConfigurationController.java ++++ b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeConfigurationController.java +@@ -38,9 +38,4 @@ public class FakeConfigurationController + public boolean isLayoutRtl() { + return false; + } +- +- @Override +- public String getNightModeName() { +- return "undefined"; +- } + } +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0016-Revert-Change-color-of-track.patch b/patches_platform/frameworks_base/0016-Revert-Change-color-of-track.patch new file mode 100644 index 0000000..443dc1d --- /dev/null +++ b/patches_platform/frameworks_base/0016-Revert-Change-color-of-track.patch @@ -0,0 +1,54 @@ +From 2f0cb797274c27772f923c7a07ef830c12ddbfd4 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 30 Jun 2024 16:49:47 +0800 +Subject: [PATCH 16/43] Revert "Change color of track" + +This reverts commit 9ba91db9836625e5f45367b38b76cf08615cce00. +--- + .../res/color/brightness_slider_track.xml | 19 ------------------- + .../drawable/brightness_progress_drawable.xml | 2 +- + 2 files changed, 1 insertion(+), 20 deletions(-) + delete mode 100644 packages/SystemUI/res/color/brightness_slider_track.xml + +diff --git a/packages/SystemUI/res/color/brightness_slider_track.xml b/packages/SystemUI/res/color/brightness_slider_track.xml +deleted file mode 100644 +index 6028769f3789..000000000000 +--- a/packages/SystemUI/res/color/brightness_slider_track.xml ++++ /dev/null +@@ -1,19 +0,0 @@ +- +- +- +- +- +\ No newline at end of file +diff --git a/packages/SystemUI/res/drawable/brightness_progress_drawable.xml b/packages/SystemUI/res/drawable/brightness_progress_drawable.xml +index cae9d6b0513e..95c7778c0e76 100644 +--- a/packages/SystemUI/res/drawable/brightness_progress_drawable.xml ++++ b/packages/SystemUI/res/drawable/brightness_progress_drawable.xml +@@ -24,7 +24,7 @@ + + + +- ++ + + + +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0017-Revert-Fix-the-text-color-used-on-the-notification-u.patch b/patches_platform/frameworks_base/0017-Revert-Fix-the-text-color-used-on-the-notification-u.patch new file mode 100644 index 0000000..185e2c5 --- /dev/null +++ b/patches_platform/frameworks_base/0017-Revert-Fix-the-text-color-used-on-the-notification-u.patch @@ -0,0 +1,27 @@ +From 587d8c7b04046a1a52c6dba36dbafaf95911b30e Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 30 Jun 2024 16:13:51 +0800 +Subject: [PATCH 17/43] Revert "Fix the text color used on the notification + unread indicator." + +This reverts commit aee60c49308a81125587ea0c53f40c9d5d60707e. +--- + core/java/android/app/Notification.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java +index 1129f9dbdfeb..baecf785a8af 100644 +--- a/core/java/android/app/Notification.java ++++ b/core/java/android/app/Notification.java +@@ -5721,7 +5721,7 @@ public class Notification implements Parcelable + pillColor = Colors.flattenAlpha( + getColors(p).getTertiaryFixedDimAccentColor(), bgColor); + textColor = Colors.flattenAlpha( +- getColors(p).getOnTertiaryFixedAccentTextColor(), pillColor); ++ getColors(p).getOnTertiaryAccentTextColor(), pillColor); + } + contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor); + contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor); +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0016-Revert-Update-SystemUI-to-new-notification-color-spe.patch b/patches_platform/frameworks_base/0018-Revert-Update-SystemUI-to-new-notification-color-spe.patch similarity index 96% rename from patches_platform/frameworks_base/0016-Revert-Update-SystemUI-to-new-notification-color-spe.patch rename to patches_platform/frameworks_base/0018-Revert-Update-SystemUI-to-new-notification-color-spe.patch index 37333ce..e8ea5c1 100644 --- a/patches_platform/frameworks_base/0016-Revert-Update-SystemUI-to-new-notification-color-spe.patch +++ b/patches_platform/frameworks_base/0018-Revert-Update-SystemUI-to-new-notification-color-spe.patch @@ -1,7 +1,7 @@ -From c650743c1e67f48640774af517a2ce77f04e1141 Mon Sep 17 00:00:00 2001 +From 912eb2ce819f09cf4e4592833547ea94b8ee3d80 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 4 Apr 2024 18:26:02 +0800 -Subject: [PATCH 16/34] Revert "Update SystemUI to new notification color spec" +Subject: [PATCH 18/43] Revert "Update SystemUI to new notification color spec" This reverts commit db2c5554ac653567d1433d3ff99328c5d855c233. @@ -37,13 +37,13 @@ Change-Id: Iddbe46f4d01d05d6579c1e8b9dab266dd605e199 .../row/wrapper/NotificationViewWrapper.java | 3 +- .../stack/NotificationChildrenContainer.java | 2 +- .../stack/NotificationSectionsManager.kt | 8 ++--- - .../stack/NotificationStackScrollLayout.java | 25 +++++++--------- + .../stack/NotificationStackScrollLayout.java | 23 +++++++------- .../notification/stack/SectionHeaderView.java | 6 ++-- .../statusbar/phone/ScrimController.java | 5 ++-- .../statusbar/phone/TapAgainView.java | 7 ++--- .../statusbar/policy/RemoteInputView.java | 15 +++++----- .../row/ActivatableNotificationViewTest.kt | 5 ++-- - 36 files changed, 101 insertions(+), 139 deletions(-) + 36 files changed, 101 insertions(+), 137 deletions(-) diff --git a/packages/SystemUI/res/color/notification_guts_priority_button_bg_stroke.xml b/packages/SystemUI/res/color/notification_guts_priority_button_bg_stroke.xml index d1b8a064724d..015e9f99212d 100644 @@ -153,7 +153,7 @@ index 84e2231738d4..bd9394bf9f8a 100644 diff --git a/packages/SystemUI/res/drawable/notification_material_bg.xml b/packages/SystemUI/res/drawable/notification_material_bg.xml -index 355e75d0716b..3eaa6180ba1b 100644 +index 3f903aece0b5..40b9238b5e87 100644 --- a/packages/SystemUI/res/drawable/notification_material_bg.xml +++ b/packages/SystemUI/res/drawable/notification_material_bg.xml @@ -20,7 +20,7 @@ @@ -320,7 +320,7 @@ index 19a3f2fd521c..852db1b8fb91 100644 diff --git a/packages/SystemUI/res/layout/notification_snooze.xml b/packages/SystemUI/res/layout/notification_snooze.xml -index 6e541a7a5f32..8b5368098c00 100644 +index ce09385eaf45..6608d8620f86 100644 --- a/packages/SystemUI/res/layout/notification_snooze.xml +++ b/packages/SystemUI/res/layout/notification_snooze.xml @@ -23,7 +23,7 @@ @@ -409,7 +409,7 @@ index 53abe87e7c12..c4d8d55f74e2 100644 android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml -index bcc3c83b4560..e759c1211a93 100644 +index 61a323d44dfc..ddf188e3f1d3 100644 --- a/packages/SystemUI/res/values-night/colors.xml +++ b/packages/SystemUI/res/values-night/colors.xml @@ -33,7 +33,7 @@ @@ -422,10 +422,10 @@ index bcc3c83b4560..e759c1211a93 100644 @color/GM2_grey_500 @color/GM2_grey_300 diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml -index 34dcd655b8e7..91a72922fd0a 100644 +index 46364820c5d5..846fd5736590 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml -@@ -116,7 +116,7 @@ +@@ -121,7 +121,7 @@ #99000000 @@ -435,10 +435,10 @@ index 34dcd655b8e7..91a72922fd0a 100644 #fff44336 diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml -index e3d4419afceb..7852608df57d 100644 +index ce08ca3e43af..ae354d634f67 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml -@@ -602,34 +602,34 @@ +@@ -625,34 +625,34 @@ -@@ -640,28 +640,10 @@ +@@ -663,28 +663,10 @@ center @@ -528,10 +528,10 @@ index 2338be28d32c..c9758471a30e 100644 public void setText(@StringRes int text) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java -index 3616fd6d8cd1..a6e07f1f5e3e 100644 +index 16f18a3c3fb6..17dc2a6ad815 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java -@@ -313,25 +313,26 @@ public class FooterView extends StackScrollerDecorView { +@@ -361,25 +361,26 @@ public class FooterView extends StackScrollerDecorView { */ public void updateColors() { Resources.Theme theme = mContext.getTheme(); @@ -559,11 +559,11 @@ index 3616fd6d8cd1..a6e07f1f5e3e 100644 mClearAllButton.setBackground(clearAllBg); - mClearAllButton.setTextColor(onSurface); + mClearAllButton.setTextColor(textColor); - mManageButton.setBackground(manageBg); -- mManageButton.setTextColor(onSurface); + mManageOrHistoryButton.setBackground(manageBg); +- mManageOrHistoryButton.setTextColor(onSurface); - mSeenNotifsFooterTextView.setTextColor(onSurface); - mSeenNotifsFooterTextView.setCompoundDrawableTintList(ColorStateList.valueOf(onSurface)); -+ mManageButton.setTextColor(textColor); ++ mManageOrHistoryButton.setTextColor(textColor); + final @ColorInt int labelTextColor = + Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorPrimary); + mSeenNotifsFooterTextView.setTextColor(labelTextColor); @@ -573,10 +573,10 @@ index 3616fd6d8cd1..a6e07f1f5e3e 100644 private void updateResources() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java -index 4fe05ec9990c..9fa9049cc7cd 100644 +index 83c50f52af6f..455a286346e6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java -@@ -124,7 +124,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView +@@ -122,7 +122,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private void updateColors() { mNormalColor = Utils.getColorAttrDefaultColor(mContext, @@ -654,10 +654,10 @@ index 50f3e7896442..6f602ff437eb 100644 } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java -index 0236fc265add..a929e4f3ea7f 100644 +index fa973001cec7..3ac14fc39065 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java -@@ -1362,7 +1362,7 @@ public class NotificationChildrenContainer extends ViewGroup +@@ -1504,7 +1504,7 @@ public class NotificationChildrenContainer extends ViewGroup Resources.Theme theme = new ContextThemeWrapper(mContext, com.android.internal.R.style.Theme_DeviceDefault_DayNight).getTheme(); try (TypedArray ta = theme.obtainStyledAttributes( @@ -667,7 +667,7 @@ index 0236fc265add..a929e4f3ea7f 100644 } mHybridGroupManager.setOverflowNumberColor(mOverflowNumber, color); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt -index cfc433a09c4d..fd064eeab2ab 100644 +index d269eda6795a..5cd0c0d08d3b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt @@ -244,10 +244,10 @@ class NotificationSectionsManager @Inject internal constructor( @@ -686,10 +686,10 @@ index cfc433a09c4d..fd064eeab2ab 100644 companion object { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java -index 3bbdfd164ba7..c84aab1f83cb 100644 +index fb8bc7a34a9c..d8363fa54427 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java -@@ -341,7 +341,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable +@@ -351,7 +351,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private boolean mAnimateNextBackgroundTop; private boolean mAnimateNextBackgroundBottom; private boolean mAnimateNextSectionBoundsChange; @@ -698,7 +698,7 @@ index 3bbdfd164ba7..c84aab1f83cb 100644 private float mDimAmount; private ValueAnimator mDimAnimator; private final ArrayList mTmpSortedChildren = new ArrayList<>(); -@@ -643,8 +643,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable +@@ -665,8 +665,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mSections = mSectionsManager.createSectionsForBuckets(); mAmbientState = Dependency.get(AmbientState.class); @@ -709,7 +709,7 @@ index 3bbdfd164ba7..c84aab1f83cb 100644 int minHeight = res.getDimensionPixelSize(R.dimen.notification_min_height); int maxHeight = res.getDimensionPixelSize(R.dimen.notification_max_height); mSplitShadeMinContentHeight = res.getDimensionPixelSize( -@@ -780,8 +780,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable +@@ -810,8 +810,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } void updateBgColor() { @@ -720,7 +720,7 @@ index 3bbdfd164ba7..c84aab1f83cb 100644 updateBackgroundDimming(); for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); -@@ -4473,19 +4473,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable +@@ -4622,22 +4622,19 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } /** @@ -734,17 +734,20 @@ index 3bbdfd164ba7..c84aab1f83cb 100644 - mContext, com.android.internal.R.attr.materialColorOnSurfaceVariant); - - mSectionsManager.setHeaderForegroundColors(onSurface, onSurfaceVariant); -- + final @ColorInt int textColor = + Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorPrimary); + mSectionsManager.setHeaderForegroundColor(textColor); - mFooterView.updateColors(); -- -- mEmptyShadeView.setTextColors(onSurface, onSurfaceVariant); -+ mEmptyShadeView.setTextColor(textColor); + + if (mFooterView != null) { + mFooterView.updateColors(); + } + + if (mEmptyShadeView != null) { +- mEmptyShadeView.setTextColors(onSurface, onSurfaceVariant); ++ mEmptyShadeView.setTextColor(textColor); + } } - void goToFullShade(long delay) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java index 580431a13d1b..59e1af5eb6f1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java @@ -762,10 +765,10 @@ index 580431a13d1b..59e1af5eb6f1 100644 } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java -index ae04eaf49b65..05904eae769c 100644 +index d2e36b88fd9d..3404d5bbcc53 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java -@@ -1496,9 +1496,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump +@@ -1555,9 +1555,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump private void updateThemeColors() { if (mScrimBehind == null) return; int background = Utils.getColorAttr(mScrimBehind.getContext(), @@ -810,7 +813,7 @@ index 66ac17eee545..a033e1d55333 100644 } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java -index 4864fb8ca634..ceed81a182aa 100644 +index 2a48807ace2f..e02881951dd4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java @@ -130,7 +130,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene diff --git a/patches_platform/frameworks_base/0017-Revert-Update-framework-to-new-notification-color-sp.patch b/patches_platform/frameworks_base/0019-Revert-Update-framework-to-new-notification-color-sp.patch similarity index 93% rename from patches_platform/frameworks_base/0017-Revert-Update-framework-to-new-notification-color-sp.patch rename to patches_platform/frameworks_base/0019-Revert-Update-framework-to-new-notification-color-sp.patch index e7464e6..dd2008d 100644 --- a/patches_platform/frameworks_base/0017-Revert-Update-framework-to-new-notification-color-sp.patch +++ b/patches_platform/frameworks_base/0019-Revert-Update-framework-to-new-notification-color-sp.patch @@ -1,7 +1,7 @@ -From 456e921e4ea5b79cdf5afbf5207c663d47e1a3b2 Mon Sep 17 00:00:00 2001 +From ddefb3aa749044a6b4838687f669c390512c6711 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 4 Apr 2024 18:26:08 +0800 -Subject: [PATCH 17/34] Revert "Update framework to new notification color +Subject: [PATCH 19/43] Revert "Update framework to new notification color spec" This reverts commit 6063e254e0cc84243e3a3fb85fe1bff71b302a87. @@ -12,10 +12,10 @@ This reverts commit 6063e254e0cc84243e3a3fb85fe1bff71b302a87. 3 files changed, 15 insertions(+), 53 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java -index 7454e52b50ef..5d55f3440b57 100644 +index baecf785a8af..671b8d4153c5 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java -@@ -5618,8 +5618,7 @@ public class Notification implements Parcelable +@@ -5718,8 +5718,7 @@ public class Notification implements Parcelable contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor); // Use different highlighted colors for conversations' unread count if (p.mHighlightExpander) { @@ -25,7 +25,7 @@ index 7454e52b50ef..5d55f3440b57 100644 textColor = Colors.flattenAlpha( getColors(p).getOnTertiaryAccentTextColor(), pillColor); } -@@ -12782,9 +12781,6 @@ public class Notification implements Parcelable +@@ -12944,9 +12943,6 @@ public class Notification implements Parcelable private int mSecondaryAccentColor = COLOR_INVALID; private int mTertiaryAccentColor = COLOR_INVALID; private int mOnTertiaryAccentTextColor = COLOR_INVALID; @@ -35,7 +35,7 @@ index 7454e52b50ef..5d55f3440b57 100644 private int mErrorColor = COLOR_INVALID; private int mContrastColor = COLOR_INVALID; private int mRippleAlpha = 0x33; -@@ -12842,7 +12838,7 @@ public class Notification implements Parcelable +@@ -13004,7 +13000,7 @@ public class Notification implements Parcelable if (isColorized) { if (rawColor == COLOR_DEFAULT) { @@ -44,7 +44,7 @@ index 7454e52b50ef..5d55f3440b57 100644 try (TypedArray ta = obtainDayNightAttributes(ctx, attrs)) { mBackgroundColor = getColor(ta, 0, Color.WHITE); } -@@ -12860,21 +12856,17 @@ public class Notification implements Parcelable +@@ -13022,21 +13018,17 @@ public class Notification implements Parcelable mSecondaryAccentColor = mSecondaryTextColor; mTertiaryAccentColor = flattenAlpha(mPrimaryTextColor, mBackgroundColor); mOnTertiaryAccentTextColor = mBackgroundColor; @@ -73,7 +73,7 @@ index 7454e52b50ef..5d55f3440b57 100644 R.attr.colorError, R.attr.colorControlHighlight }; -@@ -12886,10 +12878,8 @@ public class Notification implements Parcelable +@@ -13048,10 +13040,8 @@ public class Notification implements Parcelable mSecondaryAccentColor = getColor(ta, 4, COLOR_INVALID); mTertiaryAccentColor = getColor(ta, 5, COLOR_INVALID); mOnTertiaryAccentTextColor = getColor(ta, 6, COLOR_INVALID); @@ -86,7 +86,7 @@ index 7454e52b50ef..5d55f3440b57 100644 } mContrastColor = calculateContrastColor(ctx, rawColor, mPrimaryAccentColor, mBackgroundColor, nightMode); -@@ -12917,14 +12907,6 @@ public class Notification implements Parcelable +@@ -13079,14 +13069,6 @@ public class Notification implements Parcelable ContrastColorUtil.resolvePrimaryColor( ctx, mTertiaryAccentColor, nightMode), 0xFF); } @@ -101,7 +101,7 @@ index 7454e52b50ef..5d55f3440b57 100644 if (mErrorColor == COLOR_INVALID) { mErrorColor = mPrimaryTextColor; } -@@ -12998,16 +12980,6 @@ public class Notification implements Parcelable +@@ -13160,16 +13142,6 @@ public class Notification implements Parcelable return mOnTertiaryAccentTextColor; } @@ -119,7 +119,7 @@ index 7454e52b50ef..5d55f3440b57 100644 * @return the contrast-adjusted version of the color provided by the app, or the * primary text color when colorized. diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml -index 00cf4243cfa9..2050cfe11d0e 100644 +index d8191c0c3597..b4139f343fa5 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -135,12 +135,11 @@ diff --git a/patches_platform/frameworks_base/0018-Revert-Make-QS-always-use-dark-theme-colors.patch b/patches_platform/frameworks_base/0020-Revert-Make-QS-always-use-dark-theme-colors.patch similarity index 84% rename from patches_platform/frameworks_base/0018-Revert-Make-QS-always-use-dark-theme-colors.patch rename to patches_platform/frameworks_base/0020-Revert-Make-QS-always-use-dark-theme-colors.patch index 0a1c0a7..dad3792 100644 --- a/patches_platform/frameworks_base/0018-Revert-Make-QS-always-use-dark-theme-colors.patch +++ b/patches_platform/frameworks_base/0020-Revert-Make-QS-always-use-dark-theme-colors.patch @@ -1,7 +1,7 @@ -From 35bdcaf6f7a98a68854ac256261d0eb91b1493aa Mon Sep 17 00:00:00 2001 +From 8a7d67d51befd145133c5ef14ba28988e26d991f Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 6 Oct 2021 18:40:30 -0700 -Subject: [PATCH 18/34] Revert "Make QS always use dark theme colors" +Subject: [PATCH 20/43] Revert "Make QS always use dark theme colors" This reverts commit d62f7249f9e3222da95ecf6816601c408aac6be5. @@ -14,10 +14,10 @@ Change-Id: Iac4c96ccb3845812ca3df820bf27dc533816f72e 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml -index 7852608df57d..a3d93d832b38 100644 +index ae354d634f67..7422d5a14221 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml -@@ -389,7 +389,7 @@ +@@ -412,7 +412,7 @@ @style/AuthCredentialPinPasswordContainerStyle diff --git a/patches_platform/frameworks_base/0019-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch b/patches_platform/frameworks_base/0021-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch similarity index 91% rename from patches_platform/frameworks_base/0019-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch rename to patches_platform/frameworks_base/0021-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch index 873dfac..79aabbf 100644 --- a/patches_platform/frameworks_base/0019-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch +++ b/patches_platform/frameworks_base/0021-Revert-Do-not-re-inflate-QS-and-SB-when-CONFIG_UI_MO.patch @@ -1,7 +1,7 @@ -From 2ae2df9278711f93390bede651b69a56099af35b Mon Sep 17 00:00:00 2001 +From 5235e78b8933c01f407adf7d19f30ccd19d0ad16 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 6 Oct 2021 18:41:11 -0700 -Subject: [PATCH 19/34] Revert "Do not re-inflate QS and SB when +Subject: [PATCH 21/43] Revert "Do not re-inflate QS and SB when CONFIG_UI_MODE" This reverts commit 8a40ff855b86bc86e23367017002289920855a4e. diff --git a/patches_platform/frameworks_base/0020-SystemUI-Follow-light-dark-theme-in-quick-settings.patch b/patches_platform/frameworks_base/0022-SystemUI-Follow-light-dark-theme-in-quick-settings.patch similarity index 88% rename from patches_platform/frameworks_base/0020-SystemUI-Follow-light-dark-theme-in-quick-settings.patch rename to patches_platform/frameworks_base/0022-SystemUI-Follow-light-dark-theme-in-quick-settings.patch index c959ab6..dcebcc6 100644 --- a/patches_platform/frameworks_base/0020-SystemUI-Follow-light-dark-theme-in-quick-settings.patch +++ b/patches_platform/frameworks_base/0022-SystemUI-Follow-light-dark-theme-in-quick-settings.patch @@ -1,7 +1,7 @@ -From 5f65456d8135c74d48cd0528fdf7005e235ffd43 Mon Sep 17 00:00:00 2001 +From 4325ec74e21420a222860e473e9062c874046f9d Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Mon, 11 Oct 2021 19:24:58 -0700 -Subject: [PATCH 20/34] SystemUI: Follow light/dark theme in quick settings +Subject: [PATCH 22/43] SystemUI: Follow light/dark theme in quick settings Android 12's dual-tone style where the quick settings panel is always dark makes the light theme look like a second-class citizen. Pure black @@ -33,8 +33,8 @@ Signed-off-by: Pranav Vashi packages/SystemUI/res/values-night/styles.xml | 31 ++++++++++++++++++- packages/SystemUI/res/values/styles.xml | 20 ++++++------ .../statusbar/phone/ScrimController.java | 2 +- - .../systemui/statusbar/phone/ScrimState.java | 16 +++++----- - 4 files changed, 49 insertions(+), 20 deletions(-) + .../systemui/statusbar/phone/ScrimState.java | 20 ++++++------ + 4 files changed, 51 insertions(+), 22 deletions(-) diff --git a/packages/SystemUI/res/values-night/styles.xml b/packages/SystemUI/res/values-night/styles.xml index b6971d3c1fa4..8972df2b7490 100644 @@ -86,10 +86,10 @@ index b6971d3c1fa4..8972df2b7490 100644 -@@ -663,7 +663,7 @@ +@@ -686,7 +686,7 @@ + +- + + + + + +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0033-SystemUI-Follow-monet-theme-on-privacy-indicators.patch b/patches_platform/frameworks_base/0038-SystemUI-Follow-monet-theme-on-privacy-indicators.patch similarity index 86% rename from patches_platform/frameworks_base/0033-SystemUI-Follow-monet-theme-on-privacy-indicators.patch rename to patches_platform/frameworks_base/0038-SystemUI-Follow-monet-theme-on-privacy-indicators.patch index 7708818..f3b05cf 100644 --- a/patches_platform/frameworks_base/0033-SystemUI-Follow-monet-theme-on-privacy-indicators.patch +++ b/patches_platform/frameworks_base/0038-SystemUI-Follow-monet-theme-on-privacy-indicators.patch @@ -1,7 +1,7 @@ -From 43b40366ed1feb86002b849851678baeed250d47 Mon Sep 17 00:00:00 2001 +From bdbd29ab6b1fb3db6084247eceabd95ec35993c6 Mon Sep 17 00:00:00 2001 From: minaripenguin Date: Fri, 24 Mar 2023 13:04:06 +0800 -Subject: [PATCH 33/34] SystemUI: Follow monet theme on privacy indicators +Subject: [PATCH 38/43] SystemUI: Follow monet theme on privacy indicators Change-Id: Ib713cb3283fcf3a49086c5da8360d2a1b6cd6704 Signed-off-by: minaripenguin @@ -12,10 +12,10 @@ Signed-off-by: Pranav Vashi 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml -index 0e59b3b774df..8a02dca04251 100644 +index 402e44c3fb31..50b962310ac9 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml -@@ -216,7 +216,7 @@ +@@ -224,7 +224,7 @@ #E94235 #D93025 @@ -25,10 +25,10 @@ index 0e59b3b774df..8a02dca04251 100644 #CCFFFFFF diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt -index 8e1b00d825aa..a79a10639b9d 100644 +index 7a4be3fdc93b..19ac5fccac5f 100644 --- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt +++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt -@@ -123,7 +123,7 @@ class OngoingPrivacyChip @JvmOverloads constructor( +@@ -125,7 +125,7 @@ class OngoingPrivacyChip @JvmOverloads constructor( iconSize = context.resources .getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size) iconColor = diff --git a/patches_platform/frameworks_base/0034-SystemUI-Follow-monet-theme-on-battery-chip.patch b/patches_platform/frameworks_base/0039-SystemUI-Follow-monet-theme-on-battery-chip.patch similarity index 85% rename from patches_platform/frameworks_base/0034-SystemUI-Follow-monet-theme-on-battery-chip.patch rename to patches_platform/frameworks_base/0039-SystemUI-Follow-monet-theme-on-battery-chip.patch index d0e7ec3..7a6c9c3 100644 --- a/patches_platform/frameworks_base/0034-SystemUI-Follow-monet-theme-on-battery-chip.patch +++ b/patches_platform/frameworks_base/0039-SystemUI-Follow-monet-theme-on-battery-chip.patch @@ -1,7 +1,7 @@ -From 83a1b45cc8d1d6d4f5d8d275db29fc7ed3f34cff Mon Sep 17 00:00:00 2001 +From 9b624db6528d95a77ea550b011af435ca4425571 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 10 Jan 2024 23:36:41 +0800 -Subject: [PATCH 34/34] SystemUI: Follow monet theme on battery chip +Subject: [PATCH 39/43] SystemUI: Follow monet theme on battery chip Why does this chip even exist... @@ -30,18 +30,18 @@ index d7de16d7c5bb..dd1db04e77d7 100644 \ No newline at end of file + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt b/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt -index 835225009110..04373eb7ed87 100644 +index a58ce4162ddc..32c015f3230d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BatteryStatusChip.kt -@@ -22,6 +22,7 @@ import android.util.AttributeSet - import android.view.View +@@ -23,6 +23,7 @@ import android.view.View import android.widget.FrameLayout import android.widget.LinearLayout + import com.android.settingslib.flags.Flags.newStatusBarIcons +import com.android.settingslib.Utils import com.android.systemui.battery.BatteryMeterView + import com.android.systemui.battery.unified.BatteryColors import com.android.systemui.res.R - import com.android.systemui.statusbar.events.BackgroundAnimatableView -@@ -65,6 +66,11 @@ class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: Attri +@@ -71,6 +72,11 @@ class BatteryStatusChip @JvmOverloads constructor(context: Context, attrs: Attri @SuppressLint("UseCompatLoadingForDrawables") private fun updateResources() { diff --git a/patches_platform/frameworks_base/0040-ThemeOverlayController-Remove-repeated-monet-check.patch b/patches_platform/frameworks_base/0040-ThemeOverlayController-Remove-repeated-monet-check.patch new file mode 100644 index 0000000..9fbf975 --- /dev/null +++ b/patches_platform/frameworks_base/0040-ThemeOverlayController-Remove-repeated-monet-check.patch @@ -0,0 +1,29 @@ +From 2f4e9b7a4cc9c22ba9586fe855c31f99cc47abbf Mon Sep 17 00:00:00 2001 +From: Pranav Vashi +Date: Sat, 17 Sep 2022 12:20:38 +0530 +Subject: [PATCH 40/43] ThemeOverlayController: Remove repeated monet check + +Change-Id: I6608df48c1a89a87eaf08d9f267e0a83e9bbd3d1 +Signed-off-by: Pranav Vashi +--- + .../com/android/systemui/theme/ThemeOverlayController.java | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +index 84e32a1dbaae..44b54080efc4 100644 +--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java ++++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +@@ -551,10 +551,6 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { + }, + UserHandle.USER_ALL); + +- if (!mIsMonetEnabled) { +- return; +- } +- + mUserTracker.addCallback(mUserTrackerCallback, mMainExecutor); + + mConfigurationController.addCallback(mConfigurationListener); +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0041-SystemUI-Use-color-accent-for-charging-animation.patch b/patches_platform/frameworks_base/0041-SystemUI-Use-color-accent-for-charging-animation.patch new file mode 100644 index 0000000..9423d63 --- /dev/null +++ b/patches_platform/frameworks_base/0041-SystemUI-Use-color-accent-for-charging-animation.patch @@ -0,0 +1,54 @@ +From a1462dcc2242256bde5e69c60306726c25e7281c Mon Sep 17 00:00:00 2001 +From: Genkzsz11 +Date: Sat, 16 Apr 2022 00:18:51 +0700 +Subject: [PATCH 41/43] SystemUI: Use color accent for charging animation + +Change-Id: Ideade5e9375510a31496ad75c5b74f12444350c9 +Signed-off-by: Omkar Chandorkar +Signed-off-by: Pranav Vashi +--- + packages/SystemUI/res/values/styles.xml | 11 +++-------- + .../systemui/charging/WirelessChargingLayout.java | 4 ++-- + 2 files changed, 5 insertions(+), 10 deletions(-) + +diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml +index e4f2cf70b0d3..fc5023697a32 100644 +--- a/packages/SystemUI/res/values/styles.xml ++++ b/packages/SystemUI/res/values/styles.xml +@@ -817,14 +817,9 @@ + + +- +- + + +diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java +index 047d15daf6f8..a9a657730109 100644 +--- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java ++++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java +@@ -78,9 +78,9 @@ final class WirelessChargingLayout extends FrameLayout { + (transmittingBatteryLevel != WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL); + + // set style based on background +- int style = R.style.ChargingAnim_WallpaperBackground; ++ int style = R.style.ChargingAnim_Background; + if (isDozing) { +- style = R.style.ChargingAnim_DarkBackground; ++ style = R.style.ChargingAnim_Background; + } + + inflate(new ContextThemeWrapper(context, style), R.layout.wireless_charging_layout, this); +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0042-colors_device_defaults-Add-chroma-to-light-surface-h.patch b/patches_platform/frameworks_base/0042-colors_device_defaults-Add-chroma-to-light-surface-h.patch new file mode 100644 index 0000000..eaf1b73 --- /dev/null +++ b/patches_platform/frameworks_base/0042-colors_device_defaults-Add-chroma-to-light-surface-h.patch @@ -0,0 +1,33 @@ +From af3769a81e043d84bf044dd5cbbd7fbd49627b86 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Thu, 13 Oct 2022 15:07:22 +0800 +Subject: [PATCH 42/43] colors_device_defaults: Add chroma to light surface + highlight color + +With dynamic Monet themes, most of the UI has at least a small amount +of color (chroma), so pure white stands out as the sole outlier (e.g. +Settings search bar in light mode). Use the 99% lightness shade instead +to improve consistency. + +Change-Id: I7dfe3e483fa207ce4d77349ac97872e0831ef3c8 +Signed-off-by: Pranav Vashi +--- + core/res/res/values/colors_device_defaults.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/res/res/values/colors_device_defaults.xml b/core/res/res/values/colors_device_defaults.xml +index 4c5a008a3402..5d3d6a3155a9 100644 +--- a/core/res/res/values/colors_device_defaults.xml ++++ b/core/res/res/values/colors_device_defaults.xml +@@ -59,7 +59,7 @@ + @color/system_neutral1_700 + @color/system_neutral2_100 + @color/system_neutral1_800 +- @color/system_neutral1_0 ++ @color/system_neutral1_10 + + + @color/text_color_primary_device_default_light +-- +2.34.1 + diff --git a/patches_platform/frameworks_base/0043-config_progress_background_tint-Use-accent-color-for.patch b/patches_platform/frameworks_base/0043-config_progress_background_tint-Use-accent-color-for.patch new file mode 100644 index 0000000..18bf6bc --- /dev/null +++ b/patches_platform/frameworks_base/0043-config_progress_background_tint-Use-accent-color-for.patch @@ -0,0 +1,30 @@ +From e3fcd9c40a3d0fa641bc1e90892bd5a54ecde7e6 Mon Sep 17 00:00:00 2001 +From: Danny Lin +Date: Thu, 13 Oct 2022 15:07:59 +0800 +Subject: [PATCH 43/43] config_progress_background_tint: Use accent color for + progress bar background + +This matches the stock Pixel style and makes progress bars look more +integrated, since the active (foreground) part is using the accent +color. + +Change-Id: Ife7a79a390f6f9bdb2fd76722cd39adcfc182da1 +Signed-off-by: Pranav Vashi +--- + core/res/res/color/config_progress_background_tint.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/res/res/color/config_progress_background_tint.xml b/core/res/res/color/config_progress_background_tint.xml +index b086e20bf161..dfc914e76c8d 100644 +--- a/core/res/res/color/config_progress_background_tint.xml ++++ b/core/res/res/color/config_progress_background_tint.xml +@@ -15,5 +15,5 @@ + --> + + +- ++ + +-- +2.34.1 + diff --git a/patches_platform/packages_apps_SetupWizard/0001-SetupWizard-Remove-step-for-changing-theme.patch b/patches_platform/packages_apps_SetupWizard/0001-SetupWizard-Remove-step-for-changing-theme.patch index d651590..8de0edc 100644 --- a/patches_platform/packages_apps_SetupWizard/0001-SetupWizard-Remove-step-for-changing-theme.patch +++ b/patches_platform/packages_apps_SetupWizard/0001-SetupWizard-Remove-step-for-changing-theme.patch @@ -1,4 +1,4 @@ -From 2194bcf5d390be451ff641a0d779a2a815d1d67a Mon Sep 17 00:00:00 2001 +From fb1a8efb48bd9aa11b1dfdab6ca7701a130e9bca Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 26 Feb 2024 08:41:08 +0800 Subject: [PATCH] SetupWizard: Remove step for changing theme @@ -13,13 +13,13 @@ Change-Id: Id83207c766d6b0b23cd240b35936289c44026db5 3 files changed, 15 deletions(-) diff --git a/res/raw/lineage_wizard_script.xml b/res/raw/lineage_wizard_script.xml -index 0befc2b..ea342b6 100644 +index 7c87abd..af3df01 100644 --- a/res/raw/lineage_wizard_script.xml +++ b/res/raw/lineage_wizard_script.xml -@@ -82,12 +82,6 @@ +@@ -83,12 +83,6 @@ + wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" + id="lockscreen_settings"> - - - @@ -30,13 +30,13 @@ index 0befc2b..ea342b6 100644 diff --git a/res/raw/lineage_wizard_script_user.xml b/res/raw/lineage_wizard_script_user.xml -index aef7f2e..af38520 100644 +index 15325c6..1522eda 100644 --- a/res/raw/lineage_wizard_script_user.xml +++ b/res/raw/lineage_wizard_script_user.xml -@@ -34,12 +34,6 @@ +@@ -35,12 +35,6 @@ + wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" + id="lockscreen_settings"> - - - diff --git a/patches_platform_personal/build_make/0001-build-Integrate-prop-modifications-1-2.patch b/patches_platform_personal/build_make/0001-build-Integrate-prop-modifications-1-2.patch index 25301e2..233c028 100644 --- a/patches_platform_personal/build_make/0001-build-Integrate-prop-modifications-1-2.patch +++ b/patches_platform_personal/build_make/0001-build-Integrate-prop-modifications-1-2.patch @@ -1,15 +1,15 @@ -From 6c64bd7235f1c7b080fd95dc7a199350c740d8b0 Mon Sep 17 00:00:00 2001 +From 3b91dda8987fcc5f4ccb33cff692f58d39b2f06d Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 20 Jun 2021 09:08:43 +0000 Subject: [PATCH 1/2] build: Integrate prop modifications (1/2) Change-Id: I24f54937e3e542b7c29ea86d24e3f523583a0c61 --- - tools/buildinfo.sh | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + tools/buildinfo.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh -index e68162a6fe..ba29698719 100755 +index e68162a6fe..a7d9f5bdcd 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -9,7 +9,7 @@ if [ "$BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT" = "true" ] ; then @@ -30,15 +30,13 @@ index e68162a6fe..ba29698719 100755 echo "ro.build.date.utc=`$DATE +%s`" echo "ro.build.type=$TARGET_BUILD_TYPE" echo "ro.build.user=$BUILD_USERNAME" -@@ -57,5 +57,10 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then +@@ -57,5 +57,8 @@ if [ -n "$BUILD_THUMBPRINT" ] ; then fi echo "ro.lineage.device=$LINEAGE_DEVICE" +echo "ro.lineage.version=LineageOS 21 Self-built CGMod" +echo "ro.lineage.display.version=LineageOS 21 Self-built CGMod" +echo "ro.modversion=LineageOS 21 Self-built CGMod" -+ -+echo "lockscreen.rot_override=true" echo "# end build properties" -- diff --git a/patches_platform_personal/build_make/0002-build-Remove-Stk-1-2.patch b/patches_platform_personal/build_make/0002-build-Remove-Stk-1-2.patch index f6f2166..1b3d266 100644 --- a/patches_platform_personal/build_make/0002-build-Remove-Stk-1-2.patch +++ b/patches_platform_personal/build_make/0002-build-Remove-Stk-1-2.patch @@ -1,4 +1,4 @@ -From 5266372262a0d48bbb6251c6f8af75c01c76ab5c Mon Sep 17 00:00:00 2001 +From 45dd8686e204f58063348a9ba5caeb2249ae85a5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 16 Oct 2021 00:39:15 +0000 Subject: [PATCH 2/2] build: Remove Stk (1/2) @@ -9,7 +9,7 @@ Change-Id: I24ef17c74c3137a11b463cde96c74d0edc853edd 1 file changed, 1 deletion(-) diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk -index 08a7cdf83e..5afb9a3a99 100644 +index 7aff62c39f..b5bf7b3a57 100644 --- a/target/product/generic_system.mk +++ b/target/product/generic_system.mk @@ -33,7 +33,6 @@ PRODUCT_PACKAGES += \ @@ -19,7 +19,7 @@ index 08a7cdf83e..5afb9a3a99 100644 - Stk \ Tag \ - # OTA support + ifeq ($(RELEASE_AVATAR_PICKER_APP),true) -- 2.34.1 diff --git a/patches_platform_personal/frameworks_base/0001-Add-MotoHelloUINavbarOverlay-1-2.patch b/patches_platform_personal/frameworks_base/0001-Add-MotoHelloUINavbarOverlay-1-2.patch index ddad455..47a97d6 100644 --- a/patches_platform_personal/frameworks_base/0001-Add-MotoHelloUINavbarOverlay-1-2.patch +++ b/patches_platform_personal/frameworks_base/0001-Add-MotoHelloUINavbarOverlay-1-2.patch @@ -1,13 +1,13 @@ -From e1866ef3ab91a394c0a810675df59a9c328ce0b2 Mon Sep 17 00:00:00 2001 +From ed95d24fc0033ae71a55d5177699ffdf51e9ee29 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 22 Apr 2024 23:34:04 +0800 -Subject: [PATCH 01/20] Add MotoHelloUINavbarOverlay (1/2) +Subject: [PATCH 01/22] Add MotoHelloUINavbarOverlay (1/2) Redrawn after extracted SVGs, resized and adjusted stroke width Change-Id: Idd8deb529ab39444737676d7bdba1c52555d6661 --- - packages/overlays/Android.mk | 1 + + packages/overlays/Android.bp | 1 + .../MotoHelloUINavbarOverlay/Android.bp | 28 +++++++++++++++++++ .../AndroidManifest.xml | 22 +++++++++++++++ .../res/drawable/ic_sysbar_back.xml | 12 ++++++++ @@ -20,18 +20,18 @@ Change-Id: Idd8deb529ab39444737676d7bdba1c52555d6661 create mode 100644 packages/overlays/MotoHelloUINavbarOverlay/res/drawable/ic_sysbar_home.xml create mode 100644 packages/overlays/MotoHelloUINavbarOverlay/res/drawable/ic_sysbar_recent.xml -diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk -index a41d0e57cd21..c0573b2a9c16 100644 ---- a/packages/overlays/Android.mk -+++ b/packages/overlays/Android.mk -@@ -26,6 +26,7 @@ LOCAL_REQUIRED_MODULES := \ - DisplayCutoutEmulationTallOverlay \ - DisplayCutoutEmulationWaterfallOverlay \ - FontNotoSerifSourceOverlay \ -+ MotoHelloUINavbarOverlay \ - NavigationBarMode3ButtonOverlay \ - NavigationBarModeGesturalOverlay \ - NavigationBarModeGesturalOverlayNarrowBack \ +diff --git a/packages/overlays/Android.bp b/packages/overlays/Android.bp +index 5e001fba6aa1..8913b58807e6 100644 +--- a/packages/overlays/Android.bp ++++ b/packages/overlays/Android.bp +@@ -28,6 +28,7 @@ phony { + "DisplayCutoutEmulationTallOverlay", + "DisplayCutoutEmulationWaterfallOverlay", + "FontNotoSerifSourceOverlay", ++ "MotoHelloUINavbarOverlay", + "NavigationBarMode3ButtonOverlay", + "NavigationBarModeGesturalOverlay", + "NavigationBarModeGesturalOverlayNarrowBack", diff --git a/packages/overlays/MotoHelloUINavbarOverlay/Android.bp b/packages/overlays/MotoHelloUINavbarOverlay/Android.bp new file mode 100644 index 000000000000..06515997990a diff --git a/patches_platform_personal/frameworks_base/0002-Disable-Bluetooth-by-default.patch b/patches_platform_personal/frameworks_base/0002-Disable-Bluetooth-by-default.patch index f70c40e..d4542a8 100644 --- a/patches_platform_personal/frameworks_base/0002-Disable-Bluetooth-by-default.patch +++ b/patches_platform_personal/frameworks_base/0002-Disable-Bluetooth-by-default.patch @@ -1,7 +1,7 @@ -From 06799a1be4a78be284b530b009b9edd67bb1aae7 Mon Sep 17 00:00:00 2001 +From 522bbc14ea6cd6d17bd93fd3139b77d22362090c Mon Sep 17 00:00:00 2001 From: Hikari-no-Tenshi Date: Thu, 30 Jan 2020 22:20:54 +0200 -Subject: [PATCH 02/20] Disable Bluetooth by default +Subject: [PATCH 02/22] Disable Bluetooth by default Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c --- @@ -9,7 +9,7 @@ Change-Id: Iea5d24f977928bf01cd7a46b98c75c0a4bd6a23c 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml -index 89a8dd95d3c3..576c85caf2e2 100644 +index 17d9f1b87fac..75686e96e201 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -38,7 +38,7 @@ diff --git a/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch b/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch index 7440ebd..56ed59b 100644 --- a/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch +++ b/patches_platform_personal/frameworks_base/0003-Disable-cursor-drag-by-default-for-editable-TextView.patch @@ -1,7 +1,7 @@ -From 509d9f3180617e12e7c6bd07be5500104e869e43 Mon Sep 17 00:00:00 2001 +From 24806592ddfc97002514f203c55e29338d52644e Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 27 Sep 2021 16:30:00 +0000 -Subject: [PATCH 03/20] Disable cursor drag by default for editable TextViews +Subject: [PATCH 03/22] Disable cursor drag by default for editable TextViews Requested by @TadiT7 diff --git a/patches_platform_personal/frameworks_base/0004-Disable-RESTRICTED-bucket-toast.patch b/patches_platform_personal/frameworks_base/0004-Disable-RESTRICTED-bucket-toast.patch index 711a1d2..638d9f5 100644 --- a/patches_platform_personal/frameworks_base/0004-Disable-RESTRICTED-bucket-toast.patch +++ b/patches_platform_personal/frameworks_base/0004-Disable-RESTRICTED-bucket-toast.patch @@ -1,7 +1,7 @@ -From d148f0f146d6e76927630726223a48664e33fcd1 Mon Sep 17 00:00:00 2001 +From fd4ee96f17bee1e0c639b9f5a66d877637eb442d Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 3 Jul 2022 00:08:42 +0000 -Subject: [PATCH 04/20] Disable "RESTRICTED bucket" toast +Subject: [PATCH 04/22] Disable "RESTRICTED bucket" toast Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8 --- @@ -9,10 +9,10 @@ Change-Id: I20a328d3c77962f3a6095bfca42d0b165a093ce8 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java -index 12f455ad0144..a76a7f67a91a 100644 +index 19bc7160e16a..567420a9c8f6 100644 --- a/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java +++ b/apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java -@@ -1846,25 +1846,7 @@ public class AppStandbyController +@@ -1848,25 +1848,7 @@ public class AppStandbyController .noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason); if (isForcedByUser) { diff --git a/patches_platform_personal/frameworks_base/0005-Disable-wake-on-gamepad-L-R-keys.patch b/patches_platform_personal/frameworks_base/0005-Disable-wake-on-gamepad-L-R-keys.patch new file mode 100644 index 0000000..54a21b7 --- /dev/null +++ b/patches_platform_personal/frameworks_base/0005-Disable-wake-on-gamepad-L-R-keys.patch @@ -0,0 +1,32 @@ +From 4aaaad704b3cedf07ace864b8fd03d7780f55903 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sat, 1 Jun 2024 17:56:42 +0800 +Subject: [PATCH 05/22] Disable wake on gamepad L/R keys + +Change-Id: I16cf69f07f205619a75111831de808748ee5795b +--- + .../com/android/server/policy/PhoneWindowManager.java | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java +index 231357e96306..f15c034107fc 100644 +--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java ++++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java +@@ -5945,6 +5945,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { + case KeyEvent.KEYCODE_STYLUS_BUTTON_TERTIARY: + case KeyEvent.KEYCODE_STYLUS_BUTTON_TAIL: + return mStylusButtonsEnabled; ++ ++ case KeyEvent.KEYCODE_BUTTON_L1: ++ case KeyEvent.KEYCODE_BUTTON_R1: ++ case KeyEvent.KEYCODE_BUTTON_L2: ++ case KeyEvent.KEYCODE_BUTTON_R2: ++ case KeyEvent.KEYCODE_BUTTON_THUMBL: ++ case KeyEvent.KEYCODE_BUTTON_THUMBR: ++ return false; + } + + return true; +-- +2.34.1 + diff --git a/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch b/patches_platform_personal/frameworks_base/0006-Keyguard-Adjust-clock-style.patch similarity index 95% rename from patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch rename to patches_platform_personal/frameworks_base/0006-Keyguard-Adjust-clock-style.patch index 87d4bdc..895a3b2 100644 --- a/patches_platform_personal/frameworks_base/0005-Keyguard-Adjust-clock-style.patch +++ b/patches_platform_personal/frameworks_base/0006-Keyguard-Adjust-clock-style.patch @@ -1,7 +1,7 @@ -From 623f673df7542f0286b32bde1485d9de3c1715f8 Mon Sep 17 00:00:00 2001 +From 4f4c07ae5cef82b0ede5656b19e730d7476a4a20 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Thu, 2 Sep 2021 16:15:19 +0000 -Subject: [PATCH 05/20] Keyguard: Adjust clock style +Subject: [PATCH 06/22] Keyguard: Adjust clock style Thinner font, less padding and unintrusive colors @@ -71,10 +71,10 @@ index c574d1fc674b..0a2c81f1cb38 100644 + 22dp + diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt -index 01c03b1f25f6..9cff7ef5911b 100644 +index 54c7a0823963..024c727dec84 100644 --- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt -@@ -168,9 +168,9 @@ class DefaultClockController( +@@ -170,9 +170,9 @@ class DefaultClockController( if (seedColor != null) { seedColor!! } else if (isRegionDark) { @@ -113,10 +113,10 @@ index 7c5dbc247428..64657547621f 100644 /> diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml -index 0628c3e957b1..ccb729de92e1 100644 +index 186bd7cc48c5..363730d1f1ab 100644 --- a/packages/SystemUI/res-keyguard/values/dimens.xml +++ b/packages/SystemUI/res-keyguard/values/dimens.xml -@@ -95,9 +95,9 @@ +@@ -107,9 +107,9 @@ 12dp @@ -129,10 +129,10 @@ index 0628c3e957b1..ccb729de92e1 100644 diff --git a/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch b/patches_platform_personal/frameworks_base/0009-Keyguard-Refine-indication-text.patch similarity index 84% rename from patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch rename to patches_platform_personal/frameworks_base/0009-Keyguard-Refine-indication-text.patch index f6b0cc1..ca96e14 100644 --- a/patches_platform_personal/frameworks_base/0008-Keyguard-Refine-indication-text.patch +++ b/patches_platform_personal/frameworks_base/0009-Keyguard-Refine-indication-text.patch @@ -1,22 +1,22 @@ -From 8b68d455ebc34a78177be70ec62c94dae3192fdf Mon Sep 17 00:00:00 2001 +From 5e641f0f51ddffd5d7dd40f5ac080cce950a4515 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 2 Nov 2019 08:31:36 +0000 -Subject: [PATCH 08/20] Keyguard: Refine indication text +Subject: [PATCH 09/22] Keyguard: Refine indication text Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8 --- - .../SystemUI/res-keyguard/values/styles.xml | 2 -- + .../SystemUI/res-keyguard/values/styles.xml | 2 - .../res/layout/keyguard_bottom_area.xml | 1 + packages/SystemUI/res/values/dimens.xml | 2 +- - .../KeyguardIndicationController.java | 35 ++++--------------- + .../KeyguardIndicationController.java | 37 ++++--------------- .../phone/KeyguardIndicationTextView.java | 2 +- - 5 files changed, 10 insertions(+), 32 deletions(-) + 5 files changed, 10 insertions(+), 34 deletions(-) diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml -index f0cff767b74d..9edd294a8981 100644 +index d73a3034c253..0394ab69b901 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml -@@ -153,8 +153,6 @@ +@@ -154,8 +154,6 @@ 1 center ?attr/wallpaperTextColor @@ -26,7 +26,7 @@ index f0cff767b74d..9edd294a8981 100644 diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java -index 08ec0398a7..e1ab7311dd 100644 +index 646c726fa0..80f884b4a9 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java -@@ -805,7 +805,7 @@ public abstract class RecentsView Date: Fri, 18 Mar 2022 08:42:18 +0000 Subject: [PATCH 2/3] Trebuchet: Kill haptics in recents @@ -13,10 +13,10 @@ Change-Id: Ie3b0eabe8cc0421e696720740edc492cae2f5153 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java -index 968faf07c7..bb93664b46 100644 +index 3a1c42dc89..0e0397be39 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java -@@ -437,14 +437,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, +@@ -441,14 +441,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, nonOverviewAnim.setFloatValues(startProgress, endProgress); mNonOverviewAnim.dispatchOnStart(); } @@ -29,30 +29,30 @@ index 968faf07c7..bb93664b46 100644 - RecentsView.SCROLL_VIBRATION_FALLBACK); - } else { + if (targetState != QUICK_SWITCH_FROM_HOME) { - InteractionJankMonitorWrapper.cancel(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH); + InteractionJankMonitorWrapper.cancel(Cuj.CUJ_LAUNCHER_QUICK_SWITCH); } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java -index 19bfe069c8..f6cb2c7024 100644 +index e9f2d4f019..5487414660 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java -@@ -370,11 +370,6 @@ public abstract class TaskViewTouchController - mCurrentAnimation.startWithVelocity(mActivity, goingToEnd, - velocity * orientationHandler.getSecondaryTranslationDirectionFactor(), +@@ -374,11 +374,6 @@ public abstract class TaskViewTouchController + mCurrentAnimation.setEndAction(this::clearState); + mCurrentAnimation.startWithVelocity(mActivity, goingToEnd, Math.abs(velocity), mEndDisplacement, animationDuration); - if (goingUp && goingToEnd && !mIsDismissHapticRunning) { - VibratorWrapper.INSTANCE.get(mActivity).vibrate(TASK_DISMISS_VIBRATION_PRIMITIVE, - TASK_DISMISS_VIBRATION_PRIMITIVE_SCALE, TASK_DISMISS_VIBRATION_FALLBACK); - mIsDismissHapticRunning = true; - } - } - private void clearState() { + mDraggingEnabled = true; + } diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java -index e1ab7311dd..c2f848c71a 100644 +index 80f884b4a9..8dc8c20ff7 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java -@@ -1583,25 +1583,6 @@ public abstract class RecentsView Date: Mon, 20 Nov 2023 14:09:32 +0800 Subject: [PATCH 3/3] Trebuchet: Kill inverted rounded corners above the @@ -12,10 +12,10 @@ Change-Id: Ibf03a84cb8f3866b5151b02fe8a0e74167cf90ce 1 file changed, 7 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt -index d6016f1304..c77fadb9aa 100644 +index e290c3fa3d..a3e4e1835e 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt -@@ -159,13 +159,6 @@ class TaskbarBackgroundRenderer(private val context: TaskbarActivityContext) { +@@ -158,13 +158,6 @@ class TaskbarBackgroundRenderer(private val context: TaskbarActivityContext) { // Draw the background behind taskbar content. canvas.drawRect(0f, 0f, canvas.width.toFloat(), persistentTaskbarHeight, paint) } diff --git a/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch b/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch index f509b20..ae5ec2e 100644 --- a/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch +++ b/patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch @@ -1,7 +1,7 @@ -From e50480813b4a96cb3f3105dc5b1ccb7e5928ac68 Mon Sep 17 00:00:00 2001 +From 7b512450f9a8b4d65bda3daccd5d76b6d86722d3 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 8 Aug 2021 01:43:40 +0000 -Subject: [PATCH 1/9] treble: Lineage-ify +Subject: [PATCH 1/7] treble: Lineage-ify Squash of: - Proper target names @@ -31,7 +31,7 @@ Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml diff --git a/base.mk b/base.mk -index 22525cd..e40af53 100644 +index 43e261b..1c2fe3d 100644 --- a/base.mk +++ b/base.mk @@ -18,7 +18,13 @@ PRODUCT_COPY_FILES += \ diff --git a/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch b/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch index 45719af..da93e2a 100644 --- a/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch +++ b/patches_treble/device_phh_treble/0002-treble-Set-BOARD_EXT4_SHARE_DUP_BLOCKS-explicitly.patch @@ -1,7 +1,7 @@ -From 50987c84d728f49fc04c78e4a935231caaf6317f Mon Sep 17 00:00:00 2001 +From ca0a29e2a10704398ef98db53ea472c70e6d2df5 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 8 Aug 2021 09:29:32 +0000 -Subject: [PATCH 2/9] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly +Subject: [PATCH 2/7] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly Change-Id: I725443154fabde548d2e6c1b072d34c27596c421 --- diff --git a/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch b/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch index 4c77694..08720ae 100644 --- a/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch +++ b/patches_treble/device_phh_treble/0003-treble-Set-TARGET_NO_KERNEL_OVERRIDE.patch @@ -1,7 +1,7 @@ -From aece8f5deb59a054729539eef6957bd5db325bb5 Mon Sep 17 00:00:00 2001 +From 8bfd515e29aa6998c95326afcd7b9212bc50e855 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 20 Oct 2021 11:30:25 +0000 -Subject: [PATCH 3/9] treble: Set TARGET_NO_KERNEL_OVERRIDE +Subject: [PATCH 3/7] treble: Set TARGET_NO_KERNEL_OVERRIDE Taken from Lineage generic targets - skips building kernel cleanly diff --git a/patches_treble/device_phh_treble/0004-treble-Enable-call-recording.patch b/patches_treble/device_phh_treble/0004-treble-Enable-call-recording.patch index db7f7dc..84cc9ee 100644 --- a/patches_treble/device_phh_treble/0004-treble-Enable-call-recording.patch +++ b/patches_treble/device_phh_treble/0004-treble-Enable-call-recording.patch @@ -1,7 +1,7 @@ -From 29d58c7756130f41aaa10d457cef3806792b5d13 Mon Sep 17 00:00:00 2001 +From 2171319d09fd6681683c2fbb8841ff00589e826c Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Tue, 11 Oct 2022 11:29:02 +0000 -Subject: [PATCH 4/9] treble: Enable call recording +Subject: [PATCH 4/7] treble: Enable call recording Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28 --- diff --git a/patches_treble/device_phh_treble/0005-treble-Switch-to-MindTheGapps.patch b/patches_treble/device_phh_treble/0005-treble-Switch-to-MindTheGapps.patch index ee44f3c..533b269 100644 --- a/patches_treble/device_phh_treble/0005-treble-Switch-to-MindTheGapps.patch +++ b/patches_treble/device_phh_treble/0005-treble-Switch-to-MindTheGapps.patch @@ -1,7 +1,7 @@ -From 1a5f992428f38427b3d3e25984bc0b425ff6d4f1 Mon Sep 17 00:00:00 2001 +From 2f8779cb2631ddff20e81d56b4a1a7c0ec46fb19 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 5 Nov 2022 23:49:11 +0000 -Subject: [PATCH 5/9] treble: Switch to MindTheGapps +Subject: [PATCH 5/7] treble: Switch to MindTheGapps Change-Id: I1b80d4c5176cbf4af21d147c71b0abce6027c7c7 --- diff --git a/patches_treble/device_phh_treble/0009-treble-Import-prebuilt-PHH-Superuser.patch b/patches_treble/device_phh_treble/0006-treble-Import-prebuilt-PHH-Superuser.patch similarity index 99% rename from patches_treble/device_phh_treble/0009-treble-Import-prebuilt-PHH-Superuser.patch rename to patches_treble/device_phh_treble/0006-treble-Import-prebuilt-PHH-Superuser.patch index 6a38e4a..781472a 100644 --- a/patches_treble/device_phh_treble/0009-treble-Import-prebuilt-PHH-Superuser.patch +++ b/patches_treble/device_phh_treble/0006-treble-Import-prebuilt-PHH-Superuser.patch @@ -1,7 +1,7 @@ -From 4f32c09f61ab0c69b3768257764d1257e812839e Mon Sep 17 00:00:00 2001 +From 4b55f0e5ab9d96991820576f9c15e47168ce829a Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 15 Jul 2023 17:01:27 +0800 -Subject: [PATCH 9/9] treble: Import prebuilt PHH Superuser +Subject: [PATCH 6/7] treble: Import prebuilt PHH Superuser Change-Id: I9655d706ef3e1f32d0584a68384823db895e0283 --- diff --git a/patches_treble/device_phh_treble/0006-treble-Stop-securing-ADB.patch b/patches_treble/device_phh_treble/0006-treble-Stop-securing-ADB.patch deleted file mode 100644 index 6cc6b2b..0000000 --- a/patches_treble/device_phh_treble/0006-treble-Stop-securing-ADB.patch +++ /dev/null @@ -1,35 +0,0 @@ -From d0c31b8531c239d6c550ed14690496fa9d6b13d2 Mon Sep 17 00:00:00 2001 -From: Andy CrossGate Yan -Date: Tue, 22 Nov 2022 00:36:15 +0000 -Subject: [PATCH 6/9] treble: Stop securing ADB - -Seems to kill USB Debugging altogether on certain devices, -and unrelated to SN anyway -Build-time macro coupled with vendor/lineage might do better... - -Change-Id: I0215b3ed970dd53a124f48e30ca2cf4b0c6d2899 ---- - rw-system.sh | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/rw-system.sh b/rw-system.sh -index 968b903..4dd61f3 100644 ---- a/rw-system.sh -+++ b/rw-system.sh -@@ -804,13 +804,10 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then - resetprop_phh ro.boot.veritymode enforcing - resetprop_phh ro.boot.warranty_bit 0 - resetprop_phh ro.warranty_bit 0 -- resetprop_phh ro.debuggable 0 - resetprop_phh ro.secure 1 - resetprop_phh ro.build.type user - resetprop_phh --delete ro.build.selinux - -- resetprop_phh ro.adb.secure 1 -- - # Hide system/xbin/su - mount /mnt/phh/empty_dir /system/xbin - mount /mnt/phh/empty_dir /system/app/me.phh.superuser --- -2.34.1 - diff --git a/patches_treble/device_phh_treble/0007-treble-Remove-Securize-1-2.patch b/patches_treble/device_phh_treble/0007-treble-Remove-Securize-1-2.patch new file mode 100644 index 0000000..1af28a7 --- /dev/null +++ b/patches_treble/device_phh_treble/0007-treble-Remove-Securize-1-2.patch @@ -0,0 +1,166 @@ +From 6049d780bfdddc2d11a0b3f1bca6b6de6a761ed5 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Mon, 15 Jul 2024 22:30:54 +0800 +Subject: [PATCH 7/7] treble: Remove Securize (1/2) + +Leave this Play Integrity mess to the professionals + +Change-Id: Ic4ef0512d8b555b85e7497464a07913101fcc819 +--- + base.mk | 1 - + files/ota.sh | 3 --- + phh-securize.sh | 38 ----------------------------- + rw-system.sh | 63 ++++++------------------------------------------- + 4 files changed, 7 insertions(+), 98 deletions(-) + delete mode 100644 phh-securize.sh + +diff --git a/base.mk b/base.mk +index 1c2fe3d..dea8d2d 100644 +--- a/base.mk ++++ b/base.mk +@@ -178,7 +178,6 @@ PRODUCT_PACKAGES += \ + resetprop_phh + + PRODUCT_COPY_FILES += \ +- device/phh/treble/phh-securize.sh:system/bin/phh-securize.sh \ + device/phh/treble/files/ota.sh:system/bin/ota.sh \ + + PRODUCT_COPY_FILES += \ +diff --git a/files/ota.sh b/files/ota.sh +index a43ce81..78fea95 100644 +--- a/files/ota.sh ++++ b/files/ota.sh +@@ -8,9 +8,6 @@ if ! [ "$(getprop ro.boot.dynamic_partitions)" = true ];then + fi + + flavor=$(getprop ro.product.product.name) +-if [ -f /system/phh/secure ];then +- flavor=${flavor}-secure +-fi + nextVersion=$(curl --silent -L https://raw.githubusercontent.com/phhusson/treble_experimentations/master/ota/squeak/$flavor/date) + if [ -z "$nextVersion" ];then + echo "Couldn't find any OTA for $flavor" +diff --git a/phh-securize.sh b/phh-securize.sh +deleted file mode 100644 +index 80b46d7..0000000 +--- a/phh-securize.sh ++++ /dev/null +@@ -1,38 +0,0 @@ +-#!/system/bin/sh +- +-if [ -e /system/bin/magisk ] +-then +- # remove bind-mount of phh-su overriding /system/bin/su -> ./magisk +- umount -l /system/bin/magisk +- # we need to modify the real system partition +- MAGISK_MIRROR="$(magisk --path)/.magisk/mirror" +- SYSTEM=$MAGISK_MIRROR/system +- MOUNTPOINT_LIST="$MAGISK_MIRROR/system_root $MAGISK_MIRROR/system" +-else +- SYSTEM=/system +- MOUNTPOINT_LIST="/system /" +-fi +- +-# remove bind-mount of phh-su (preventing $SYSTEM/xbin/su to be removed) +-umount -l /system/xbin/su +- +-for MOUNTPOINT in $MOUNTPOINT_LIST +-do +- [ -d $MOUNTPOINT ] && mountpoint -q $MOUNTPOINT && break +-done +- +-mount -o remount,rw $MOUNTPOINT +-remount +- +-touch $SYSTEM/phh/secure +-rm $SYSTEM/xbin/su +-rm $SYSTEM/bin/phh-su +-rm $SYSTEM/etc/init/su.rc +-rm $SYSTEM/bin/phh-securize.sh +-rm -Rf $SYSTEM/{app,priv-app}/me.phh.superuser/ +-rm -Rf /data/su || true +-mount -o remount,ro $MOUNTPOINT +-sync +-mkdir /metadata/phh +-touch /metadata/phh/secure +-reboot +diff --git a/rw-system.sh b/rw-system.sh +index 3ddfdda..7546fae 100644 +--- a/rw-system.sh ++++ b/rw-system.sh +@@ -779,65 +779,16 @@ copyprop() { + resetprop_phh "$1" "$(getprop "$2")" + fi + } +-if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then +- copyprop ro.build.device ro.vendor.build.device +- copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint +- copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint +- copyprop ro.build.fingerprint ro.vendor.build.fingerprint +- copyprop ro.build.device ro.vendor.product.device +- copyprop ro.product.system.device ro.vendor.product.device +- copyprop ro.product.device ro.vendor.product.device +- copyprop ro.product.system.device ro.product.vendor.device +- copyprop ro.product.device ro.product.vendor.device +- copyprop ro.product.system.name ro.vendor.product.name +- copyprop ro.product.name ro.vendor.product.name +- copyprop ro.product.system.name ro.product.vendor.device +- copyprop ro.product.name ro.product.vendor.device +- copyprop ro.system.product.brand ro.vendor.product.brand +- copyprop ro.product.brand ro.vendor.product.brand +- copyprop ro.product.system.model ro.vendor.product.model +- copyprop ro.product.model ro.vendor.product.model +- copyprop ro.product.system.model ro.product.vendor.model +- copyprop ro.product.model ro.product.vendor.model +- copyprop ro.build.product ro.vendor.product.model +- copyprop ro.build.product ro.product.vendor.model +- copyprop ro.system.product.manufacturer ro.vendor.product.manufacturer +- copyprop ro.product.manufacturer ro.vendor.product.manufacturer +- copyprop ro.system.product.manufacturer ro.product.vendor.manufacturer +- copyprop ro.product.manufacturer ro.product.vendor.manufacturer +- (getprop ro.vendor.build.security_patch; getprop ro.keymaster.xxx.security_patch) |sort |tail -n 1 |while read v;do +- [ -n "$v" ] && resetprop_phh ro.build.version.security_patch "$v" +- done + +- resetprop_phh ro.build.tags release-keys +- resetprop_phh ro.boot.vbmeta.device_state locked +- resetprop_phh ro.boot.verifiedbootstate green +- resetprop_phh ro.boot.flash.locked 1 +- resetprop_phh ro.boot.veritymode enforcing +- resetprop_phh ro.boot.warranty_bit 0 +- resetprop_phh ro.warranty_bit 0 +- resetprop_phh ro.debuggable 0 +- resetprop_phh ro.secure 1 +- resetprop_phh ro.build.type user +- resetprop_phh --delete ro.build.selinux +- +- resetprop_phh ro.adb.secure 1 +- +- # Hide system/xbin/su +- mount /mnt/phh/empty_dir /system/xbin +- mount /mnt/phh/empty_dir /system/app/me.phh.superuser +- mount /system/phh/empty /system/xbin/phh-su +-else +- mkdir /mnt/phh/xbin +- chmod 0755 /mnt/phh/xbin +- chcon u:object_r:system_file:s0 /mnt/phh/xbin ++mkdir /mnt/phh/xbin ++chmod 0755 /mnt/phh/xbin ++chcon u:object_r:system_file:s0 /mnt/phh/xbin + +- #phh-su will bind over this empty file to make a real su +- touch /mnt/phh/xbin/su +- chcon u:object_r:system_file:s0 /mnt/phh/xbin/su ++#phh-su will bind over this empty file to make a real su ++touch /mnt/phh/xbin/su ++chcon u:object_r:system_file:s0 /mnt/phh/xbin/su + +- mount -o bind /mnt/phh/xbin /system/xbin +-fi ++mount -o bind /mnt/phh/xbin /system/xbin + + for abi in "" 64;do + f=/vendor/lib$abi/libstagefright_foundation.so +-- +2.34.1 + diff --git a/patches_treble/device_phh_treble/0007-treble-Securize-on-demand.patch b/patches_treble/device_phh_treble/0007-treble-Securize-on-demand.patch deleted file mode 100644 index 09354ad..0000000 --- a/patches_treble/device_phh_treble/0007-treble-Securize-on-demand.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 77488a9ec7f97c5b658cd6224b0ef147ef9752cd Mon Sep 17 00:00:00 2001 -From: Andy CrossGate Yan -Date: Thu, 29 Dec 2022 15:12:03 +0000 -Subject: [PATCH 7/9] treble: Securize on-demand - -Status is stored in /metadata and controlled by persist prop - -Change-Id: I8069b6f471ad87ab34c18b743689ab3584cee35b ---- - phh-prop-handler.sh | 14 ++++++++++++++ - vndk.rc | 3 +++ - 2 files changed, 17 insertions(+) - -diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh -index e187466..fe857b7 100644 ---- a/phh-prop-handler.sh -+++ b/phh-prop-handler.sh -@@ -281,3 +281,17 @@ if [ "$1" == "persist.bluetooth.system_audio_hal.enabled" ]; then - restartAudio - exit - fi -+ -+if [ "$1" == "persist.sys.phh.securize" ];then -+ if [[ "$prop_value" != "true" && "$prop_value" != "false" ]]; then -+ exit 1 -+ fi -+ -+ if [[ "$prop_value" == "true" ]]; then -+ mkdir /metadata/phh -+ touch /metadata/phh/secure -+ else -+ rm /metadata/phh/secure -+ fi -+ exit -+fi -diff --git a/vndk.rc b/vndk.rc -index 9f74ffd..dfcfcfe 100644 ---- a/vndk.rc -+++ b/vndk.rc -@@ -112,3 +112,6 @@ service watchdogd-gsi /system/bin/watchdogd 10 20 - # Fix for non-AMOLED Transsion devices where brightness would be dimmer than usual - on property:ro.vendor.transsion.backlight_12bit=* - setprop ro.vendor.transsion.backlight_hal.optimization ${ro.vendor.transsion.backlight_12bit} -+ -+on property:persist.sys.phh.securize=* -+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize" --- -2.34.1 - diff --git a/patches_treble/device_phh_treble/0008-treble-Also-use-data-adb-for-securize-status.patch b/patches_treble/device_phh_treble/0008-treble-Also-use-data-adb-for-securize-status.patch deleted file mode 100644 index b23a649..0000000 --- a/patches_treble/device_phh_treble/0008-treble-Also-use-data-adb-for-securize-status.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 74ec0afa2767a82f22e16d8499ef1a48ffa34f1c Mon Sep 17 00:00:00 2001 -From: Andy CrossGate Yan -Date: Wed, 22 Mar 2023 23:37:05 +0000 -Subject: [PATCH 8/9] treble: Also use /data/adb for securize status - -Change-Id: I778f2be5407ae0a548a098c72031cce9be83cf96 ---- - phh-prop-handler.sh | 5 ++++- - rw-system.sh | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh -index fe857b7..c21438c 100644 ---- a/phh-prop-handler.sh -+++ b/phh-prop-handler.sh -@@ -288,10 +288,13 @@ if [ "$1" == "persist.sys.phh.securize" ];then - fi - - if [[ "$prop_value" == "true" ]]; then -- mkdir /metadata/phh -+ mkdir -p /metadata/phh - touch /metadata/phh/secure -+ mkdir -p /data/adb/phh -+ touch /data/adb/phh/secure - else - rm /metadata/phh/secure -+ rm /data/adb/phh/secure - fi - exit - fi -diff --git a/rw-system.sh b/rw-system.sh -index 4dd61f3..2817795 100644 ---- a/rw-system.sh -+++ b/rw-system.sh -@@ -767,7 +767,7 @@ copyprop() { - resetprop_phh "$1" "$(getprop "$2")" - fi - } --if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then -+if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ] || [ -f /data/adb/phh/secure ];then - copyprop ro.build.device ro.vendor.build.device - copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint - copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint --- -2.34.1 - diff --git a/patches_treble/system_core/0001-Restore-sbin-for-Magisk-compatibility.patch b/patches_treble/system_core/0001-Restore-sbin-for-Magisk-compatibility.patch index d72d7bb..184882a 100644 --- a/patches_treble/system_core/0001-Restore-sbin-for-Magisk-compatibility.patch +++ b/patches_treble/system_core/0001-Restore-sbin-for-Magisk-compatibility.patch @@ -1,4 +1,4 @@ -From 7b5af6750bdcfd107e607906b886a3034d52cb53 Mon Sep 17 00:00:00 2001 +From 82927d1019eddeb325ea689cdf493717eab7bb49 Mon Sep 17 00:00:00 2001 From: Victor Bo Date: Wed, 3 Mar 2021 06:31:17 -0500 Subject: [PATCH] Restore /sbin for Magisk compatibility @@ -58,7 +58,7 @@ index 9ab7f4305..c45317d0f 100644 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" }, diff --git a/rootdir/Android.mk b/rootdir/Android.mk -index 7deb17324..aeeaad496 100644 +index 7444f963f..b74887c43 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -96,7 +96,7 @@ endif @@ -67,7 +67,7 @@ index 7deb17324..aeeaad496 100644 LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \ - dev proc sys system data data_mirror odm oem acct config storage mnt apex bootstrap-apex debug_ramdisk \ + sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex bootstrap-apex debug_ramdisk \ - linkerconfig second_stage_resources postinstall $(BOARD_ROOT_EXTRA_FOLDERS)); \ + linkerconfig second_stage_resources postinstall tmp $(BOARD_ROOT_EXTRA_FOLDERS)); \ ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \ ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \ diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in diff --git a/patches_treble/treble_app/0001-Simplify-Securize-to-CheckBoxPreference-and-persist-.patch b/patches_treble/treble_app/0001-Remove-Securize-2-2.patch similarity index 59% rename from patches_treble/treble_app/0001-Simplify-Securize-to-CheckBoxPreference-and-persist-.patch rename to patches_treble/treble_app/0001-Remove-Securize-2-2.patch index 1d33086..231599f 100644 --- a/patches_treble/treble_app/0001-Simplify-Securize-to-CheckBoxPreference-and-persist-.patch +++ b/patches_treble/treble_app/0001-Remove-Securize-2-2.patch @@ -1,42 +1,29 @@ -From 66534cd4c678494e0aa0e74197a39fcee57e313a Mon Sep 17 00:00:00 2001 +From 5de486b70139a2dc66c38b0be6df5396b74391fc Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan -Date: Thu, 29 Dec 2022 15:08:49 +0000 -Subject: [PATCH] Simplify Securize to CheckBoxPreference and persist prop +Date: Mon, 15 Jul 2024 22:14:09 +0800 +Subject: [PATCH] Remove Securize (2/2) -For "Securize on-demand" +Leave this Play Integrity mess to the professionals + +Change-Id: I36abaea9714ccdd5680be88e771143eee2a170cd --- - app/src/main/java/me/phh/treble/app/Misc.kt | 5 +++ - .../java/me/phh/treble/app/MiscSettings.kt | 33 ------------------- - app/src/main/res/xml/pref_misc.xml | 7 ++-- - 3 files changed, 10 insertions(+), 35 deletions(-) + .../java/me/phh/treble/app/MiscSettings.kt | 34 ------------------- + app/src/main/res/xml/pref_misc.xml | 6 ++-- + 2 files changed, 4 insertions(+), 36 deletions(-) -diff --git a/app/src/main/java/me/phh/treble/app/Misc.kt b/app/src/main/java/me/phh/treble/app/Misc.kt -index a56b460..8861d51 100644 ---- a/app/src/main/java/me/phh/treble/app/Misc.kt -+++ b/app/src/main/java/me/phh/treble/app/Misc.kt -@@ -302,6 +302,10 @@ object Misc: EntryStartup { - val value = sp.getString(key, "0") - SystemProperties.set("persist.sys.bt.esco_transport_unit_size", value) - } -+ MiscSettings.securize -> { -+ val value = sp.getBoolean(key, false) -+ SystemProperties.set("persist.sys.phh.securize", if (value) "true" else "false") -+ } - } - } - -@@ -328,5 +332,6 @@ object Misc: EntryStartup { - spListener.onSharedPreferenceChanged(sp, MiscSettings.noHwcomposer) - spListener.onSharedPreferenceChanged(sp, MiscSettings.storageFUSE) - spListener.onSharedPreferenceChanged(sp, MiscSettings.dt2w) -+ spListener.onSharedPreferenceChanged(sp, MiscSettings.securize) - } - } diff --git a/app/src/main/java/me/phh/treble/app/MiscSettings.kt b/app/src/main/java/me/phh/treble/app/MiscSettings.kt -index e3b5312..5fe481f 100644 +index 78556be..661abb2 100644 --- a/app/src/main/java/me/phh/treble/app/MiscSettings.kt +++ b/app/src/main/java/me/phh/treble/app/MiscSettings.kt -@@ -56,39 +56,6 @@ class MiscSettingsFragment : SettingsFragment() { +@@ -21,7 +21,6 @@ object MiscSettings : Settings { + val disableButtonsBacklight = "key_misc_disable_buttons_backlight" + val forceNavbarOff = "key_misc_force_navbar_off" + val bluetooth = "key_misc_bluetooth" +- val securize = "key_misc_securize" + val removeTelephony = "key_misc_removetelephony" + val remotectl = "key_misc_remotectl" + val disableAudioEffects = "key_misc_disable_audio_effects" +@@ -58,39 +57,6 @@ class MiscSettingsFragment : SettingsFragment() { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { super.onCreatePreferences(savedInstanceState, rootKey) @@ -77,20 +64,19 @@ index e3b5312..5fe481f 100644 removeTelephonyPref!!.setOnPreferenceClickListener { diff --git a/app/src/main/res/xml/pref_misc.xml b/app/src/main/res/xml/pref_misc.xml -index e41659d..bdf1147 100644 +index dbd8b88..0e8706d 100644 --- a/app/src/main/res/xml/pref_misc.xml +++ b/app/src/main/res/xml/pref_misc.xml -@@ -193,8 +193,11 @@ +@@ -203,8 +203,10 @@ android:entryValues="@array/pref_misc_fod_color_values" android:key="key_misc_fod_color" android:title="Under-display fp color" /> - -+ ++ diff --git a/patches_treble_prerequisite/packages_modules_Bluetooth/0001-Revert-gd-hci-Allow-disabling-selected-local-command.patch b/patches_treble_prerequisite/packages_modules_Bluetooth/0001-Revert-gd-hci-Allow-disabling-selected-local-command.patch index b6302ac..c889482 100644 --- a/patches_treble_prerequisite/packages_modules_Bluetooth/0001-Revert-gd-hci-Allow-disabling-selected-local-command.patch +++ b/patches_treble_prerequisite/packages_modules_Bluetooth/0001-Revert-gd-hci-Allow-disabling-selected-local-command.patch @@ -1,4 +1,4 @@ -From cd3589bfec212ae631772e0fdc984f21fc2bafe7 Mon Sep 17 00:00:00 2001 +From 3ddebb45d3e48e581c0ac739b0b35b11f4737acc Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 20 Nov 2023 21:59:29 +0800 Subject: [PATCH] Revert "gd: hci: Allow disabling selected local commands" @@ -9,7 +9,7 @@ This reverts commit 543afb3dd2e2b5aa4f1931a973eb7c7df634aa69. 1 file changed, 12 deletions(-) diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc -index 5576293017..c08ecab9d5 100644 +index 6facfef4c3..a6c16a9061 100644 --- a/system/gd/hci/controller.cc +++ b/system/gd/hci/controller.cc @@ -16,7 +16,6 @@ @@ -17,10 +17,10 @@ index 5576293017..c08ecab9d5 100644 #include "hci/controller.h" -#include + #include + #include - #include - #include -@@ -37,8 +36,6 @@ constexpr uint8_t kMinEncryptionKeySize = 7; // #define MIN_ENCRYPTION_KEY_SIZE +@@ -43,8 +42,6 @@ constexpr uint8_t kMinEncryptionKeySize = 7; // #define MIN_ENCRYPTION_KEY_SIZE constexpr bool kDefaultVendorCapabilitiesEnabled = true; static const std::string kPropertyVendorCapabilitiesEnabled = "bluetooth.core.le.vendor_capabilities.enabled"; @@ -29,7 +29,7 @@ index 5576293017..c08ecab9d5 100644 using os::Handler; -@@ -301,15 +298,6 @@ struct Controller::impl { +@@ -317,15 +314,6 @@ struct Controller::impl { ErrorCode status = complete_view.GetStatus(); ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); local_supported_commands_ = complete_view.GetSupportedCommands(); diff --git a/patches_treble_td/platform_frameworks_av/0001-APM-Restore-S-R-and-Q-behavior-respectively-for-tele.patch b/patches_treble_td/platform_frameworks_av/0001-APM-Restore-S-R-and-Q-behavior-respectively-for-tele.patch index cf23e13..2fd1a85 100644 --- a/patches_treble_td/platform_frameworks_av/0001-APM-Restore-S-R-and-Q-behavior-respectively-for-tele.patch +++ b/patches_treble_td/platform_frameworks_av/0001-APM-Restore-S-R-and-Q-behavior-respectively-for-tele.patch @@ -1,4 +1,4 @@ -From 4edc031741505b06ea466479f419ec86cb04718f Mon Sep 17 00:00:00 2001 +From 0c66c0bf51f8edb8b880e9d15594befe9ead217c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 18 Aug 2022 15:44:46 -0400 Subject: [PATCH 01/24] APM: Restore S, R and Q behavior respectively for @@ -36,10 +36,10 @@ Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145 2 files changed, 147 insertions(+), 62 deletions(-) diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp -index 135548fb9c..fc99bdbd78 100644 +index 3bebb1134a..1823522fe2 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp -@@ -692,6 +692,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal( +@@ -699,6 +699,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal( ALOGV("%s device rxDevice %s txDevice %s", __func__, rxDevices.itemAt(0)->toString().c_str(), txSourceDevice->toString().c_str()); @@ -57,7 +57,7 @@ index 135548fb9c..fc99bdbd78 100644 auto telephonyRxModule = mHwModules.getModuleForDeviceType(AUDIO_DEVICE_IN_TELEPHONY_RX, AUDIO_FORMAT_DEFAULT); auto telephonyTxModule = -@@ -714,9 +725,20 @@ status_t AudioPolicyManager::updateCallRoutingInternal( +@@ -721,9 +732,20 @@ status_t AudioPolicyManager::updateCallRoutingInternal( ALOGE("%s() no telephony Tx and/or RX device", __func__); return INVALID_OPERATION; } @@ -81,7 +81,7 @@ index 135548fb9c..fc99bdbd78 100644 } else { // If the RX device is on the primary HW module, then use legacy routing method for // voice calls via setOutputDevice() on primary output. -@@ -737,7 +759,14 @@ status_t AudioPolicyManager::updateCallRoutingInternal( +@@ -744,7 +766,14 @@ status_t AudioPolicyManager::updateCallRoutingInternal( } muteWaitMs = setOutputDevices(__func__, mPrimaryOutput, rxDevices, true, delayMs); } else { // create RX path audio patch @@ -97,7 +97,7 @@ index 135548fb9c..fc99bdbd78 100644 // If the TX device is on the primary HW module but RX device is // on other HW module, SinkMetaData of telephony input should handle it // assuming the device uses audio HAL V5.0 and above -@@ -752,7 +781,12 @@ status_t AudioPolicyManager::updateCallRoutingInternal( +@@ -759,7 +788,12 @@ status_t AudioPolicyManager::updateCallRoutingInternal( closeActiveClients(activeDesc); } } @@ -111,7 +111,7 @@ index 135548fb9c..fc99bdbd78 100644 } if (waitMs != nullptr) { *waitMs = muteWaitMs; -@@ -760,6 +794,36 @@ status_t AudioPolicyManager::updateCallRoutingInternal( +@@ -767,6 +801,36 @@ status_t AudioPolicyManager::updateCallRoutingInternal( return NO_ERROR; } @@ -148,7 +148,7 @@ index 135548fb9c..fc99bdbd78 100644 bool AudioPolicyManager::isDeviceOfModule( const sp& devDesc, const char *moduleId) const { sp module = mHwModules.getModuleFromName(moduleId); -@@ -5087,83 +5151,101 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch * +@@ -5192,83 +5256,101 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch * // in config XML to reach the sink so that is can be declared as available. audio_io_handle_t output = AUDIO_IO_HANDLE_NONE; sp outputDesc; @@ -308,10 +308,10 @@ index 135548fb9c..fc99bdbd78 100644 AUDIO_STREAM_PATCH; patchBuilder.addSource(srcMixPortConfig); diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h -index a1c8f6202c..ee1b595e30 100644 +index a3232a2d40..cc2cf50688 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.h +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h -@@ -964,6 +964,9 @@ protected: +@@ -980,6 +980,9 @@ protected: SoundTriggerSessionCollection mSoundTriggerSessions; diff --git a/patches_treble_td/platform_frameworks_av/0002-Fix-BT-in-call-on-CAF-devices.patch b/patches_treble_td/platform_frameworks_av/0002-Fix-BT-in-call-on-CAF-devices.patch index 4055256..244e6f7 100644 --- a/patches_treble_td/platform_frameworks_av/0002-Fix-BT-in-call-on-CAF-devices.patch +++ b/patches_treble_td/platform_frameworks_av/0002-Fix-BT-in-call-on-CAF-devices.patch @@ -1,4 +1,4 @@ -From 1a713e8b42c975a61e3751b4acf66732559c4152 Mon Sep 17 00:00:00 2001 +From 64131a132e24a38e12b9c4b2b9ba94b3d9091085 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 5 Aug 2019 18:09:50 +0200 Subject: [PATCH 02/24] Fix BT in-call on CAF devices diff --git a/patches_treble_td/platform_frameworks_av/0003-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch b/patches_treble_td/platform_frameworks_av/0003-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch index 8a798a1..e7617a7 100644 --- a/patches_treble_td/platform_frameworks_av/0003-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch +++ b/patches_treble_td/platform_frameworks_av/0003-Add-partial-cam-id-is-hardcoded-support-for-Asus-ZF6.patch @@ -1,4 +1,4 @@ -From 323d4a565abc38d9f32c4d77825f73ad0638cf1d Mon Sep 17 00:00:00 2001 +From 66a6eb4ef75d566fd86877e303ff3a5688e37165 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 1 Oct 2019 13:35:49 +0200 Subject: [PATCH 03/24] Add (partial, cam id is hardcoded) support for Asus ZF6 @@ -11,7 +11,7 @@ Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe 2 files changed, 29 insertions(+) diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp -index 6acf0b6cae..8d0f3bdab7 100644 +index 2d55f39b25..1e4001be1c 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -28,6 +28,7 @@ @@ -22,7 +22,7 @@ index 6acf0b6cae..8d0f3bdab7 100644 #include #include #include -@@ -153,6 +154,7 @@ static std::set sServiceErrorEventSet; +@@ -159,6 +160,7 @@ static std::set sServiceErrorEventSet; CameraService::CameraService( std::shared_ptr cameraServiceProxyWrapper) : @@ -30,7 +30,7 @@ index 6acf0b6cae..8d0f3bdab7 100644 mCameraServiceProxyWrapper(cameraServiceProxyWrapper == nullptr ? std::make_shared() : cameraServiceProxyWrapper), mEventLog(DEFAULT_EVENT_LOG_LENGTH), -@@ -2628,6 +2630,7 @@ Status CameraService::connectHelper(const sp& cameraCb, const std::str +@@ -2743,6 +2745,7 @@ Status CameraService::connectHelper(const sp& cameraCb, const std::str mServiceLock.lock(); } else { // Otherwise, add client to active clients list @@ -38,7 +38,7 @@ index 6acf0b6cae..8d0f3bdab7 100644 finishConnectLocked(client, partial, oomScoreOffset, systemNativeClient); } -@@ -2754,6 +2757,27 @@ status_t CameraService::addOfflineClient(const std::string &cameraId, +@@ -2869,6 +2872,27 @@ status_t CameraService::addOfflineClient(const std::string &cameraId, return OK; } @@ -66,7 +66,7 @@ index 6acf0b6cae..8d0f3bdab7 100644 Status CameraService::turnOnTorchWithStrengthLevel(const std::string& unresolvedCameraId, int32_t torchStrength, const sp& clientBinder) { Mutex::Autolock lock(mServiceLock); -@@ -4023,6 +4047,8 @@ binder::Status CameraService::BasicClient::disconnect() { +@@ -4138,6 +4162,8 @@ binder::Status CameraService::BasicClient::disconnect() { } mDisconnected = true; @@ -76,10 +76,10 @@ index 6acf0b6cae..8d0f3bdab7 100644 sCameraService->logDisconnected(mCameraIdStr, mClientPid, mClientPackageName); sCameraService->mCameraProviderManager->removeRef(CameraProviderManager::DeviceMode::CAMERA, diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h -index 7dc0b91cc9..15ea8b9064 100644 +index 8822cd37cf..e2c38a9096 100644 --- a/services/camera/libcameraservice/CameraService.h +++ b/services/camera/libcameraservice/CameraService.h -@@ -271,6 +271,9 @@ public: +@@ -276,6 +276,9 @@ public: // Register an offline client for a given active camera id status_t addOfflineClient(const std::string &cameraId, sp offlineClient); diff --git a/patches_treble_td/platform_frameworks_av/0004-APM-Optionally-force-load-audio-policy-for-system-si.patch b/patches_treble_td/platform_frameworks_av/0004-APM-Optionally-force-load-audio-policy-for-system-si.patch index 5acf256..34806f7 100644 --- a/patches_treble_td/platform_frameworks_av/0004-APM-Optionally-force-load-audio-policy-for-system-si.patch +++ b/patches_treble_td/platform_frameworks_av/0004-APM-Optionally-force-load-audio-policy-for-system-si.patch @@ -1,4 +1,4 @@ -From 521e59e5aea2093c82a3ec3171725f49885a1c92 Mon Sep 17 00:00:00 2001 +From 3708bb8a7cba3be95a53d3afad8f4a502b366ae6 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 24 Aug 2022 15:42:39 -0400 Subject: [PATCH 04/24] APM: Optionally force-load audio policy for system-side diff --git a/patches_treble_td/platform_frameworks_av/0005-APM-Remove-A2DP-audio-ports-from-the-primary-HAL.patch b/patches_treble_td/platform_frameworks_av/0005-APM-Remove-A2DP-audio-ports-from-the-primary-HAL.patch index d4cccc3..4bc895d 100644 --- a/patches_treble_td/platform_frameworks_av/0005-APM-Remove-A2DP-audio-ports-from-the-primary-HAL.patch +++ b/patches_treble_td/platform_frameworks_av/0005-APM-Remove-A2DP-audio-ports-from-the-primary-HAL.patch @@ -1,4 +1,4 @@ -From 7d9889aa8c86186b6d5d20b9f79a9cb755f7424a Mon Sep 17 00:00:00 2001 +From 70ede12fd7215948067cf687613d3eedeb57e073 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 25 Aug 2022 13:30:29 -0400 Subject: [PATCH 05/24] APM: Remove A2DP audio ports from the primary HAL diff --git a/patches_treble_td/platform_frameworks_av/0006-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch b/patches_treble_td/platform_frameworks_av/0006-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch index 57b79d8..733eb23 100644 --- a/patches_treble_td/platform_frameworks_av/0006-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch +++ b/patches_treble_td/platform_frameworks_av/0006-audiopolicy-try-again-with-trimmed-audio-port-name-i.patch @@ -1,4 +1,4 @@ -From e7aac58de94e2774f1e0d3c466fb4dafdd90feeb Mon Sep 17 00:00:00 2001 +From 3ad1c75d98330f969396240399b22e8e4c7c2601 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 23 Jan 2020 11:13:43 +0800 Subject: [PATCH 06/24] audiopolicy: try again with trimmed audio port name if diff --git a/patches_treble_td/platform_frameworks_av/0007-camera-Implement-property-to-override-default-camera.patch b/patches_treble_td/platform_frameworks_av/0007-camera-Implement-property-to-override-default-camera.patch index 8790972..63db34e 100644 --- a/patches_treble_td/platform_frameworks_av/0007-camera-Implement-property-to-override-default-camera.patch +++ b/patches_treble_td/platform_frameworks_av/0007-camera-Implement-property-to-override-default-camera.patch @@ -1,4 +1,4 @@ -From 37cd5e07843175c9d4aa5df2f11e2e00f01e378c Mon Sep 17 00:00:00 2001 +From 5a170e94d2f73ca9ff749b7cc58d90678b6ade04 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 1 Jun 2022 16:56:46 -0400 Subject: [PATCH 07/24] camera: Implement property to override default camera @@ -11,10 +11,10 @@ Change-Id: I002bfa974bafc2cc01365eeea31c7a5dcb5a2028 1 file changed, 22 insertions(+) diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp -index 1ba3de49a2..3fffb03da8 100644 +index 15e2755a98..60e4eb7b42 100644 --- a/services/camera/libcameraservice/common/CameraProviderManager.cpp +++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ #include #include #include @@ -22,7 +22,7 @@ index 1ba3de49a2..3fffb03da8 100644 #include #include #include -@@ -261,6 +262,15 @@ std::vector CameraProviderManager::getCameraDeviceIds(std::unordere +@@ -278,6 +279,15 @@ std::vector CameraProviderManager::getCameraDeviceIds(std::unordere } } } @@ -38,7 +38,7 @@ index 1ba3de49a2..3fffb03da8 100644 return deviceIds; } -@@ -327,6 +337,18 @@ std::vector CameraProviderManager::getAPI1CompatibleCameraDeviceIds +@@ -344,6 +354,18 @@ std::vector CameraProviderManager::getAPI1CompatibleCameraDeviceIds std::sort(systemDeviceIds.begin(), systemDeviceIds.end(), sortFunc); deviceIds.insert(deviceIds.end(), publicDeviceIds.begin(), publicDeviceIds.end()); deviceIds.insert(deviceIds.end(), systemDeviceIds.begin(), systemDeviceIds.end()); diff --git a/patches_treble_td/platform_frameworks_av/0008-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch b/patches_treble_td/platform_frameworks_av/0008-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch index decc3f6..e140fb6 100644 --- a/patches_treble_td/platform_frameworks_av/0008-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch +++ b/patches_treble_td/platform_frameworks_av/0008-There-are-three-SCO-devices.-Fallback-from-one-to-th.patch @@ -1,4 +1,4 @@ -From 9b1b33604d6e17d5b2f2bfccf2a1eac5f8b1334e Mon Sep 17 00:00:00 2001 +From 772f3d3d92335d509ce7e669353f15d33df17abe Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 13 Apr 2020 21:01:16 +0200 Subject: [PATCH 08/24] There are three SCO devices. Fallback from one to the @@ -10,10 +10,10 @@ Change-Id: I414dcb6b154855c00cb8520b23dc1069827864b2 1 file changed, 21 insertions(+) diff --git a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp -index cb45f5438b..ffefd5fa32 100644 +index 6696b45f03..3ea185d873 100644 --- a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp -@@ -318,6 +318,27 @@ sp HwModuleCollection::getModuleForDeviceType(audio_devices_t type, +@@ -321,6 +321,27 @@ sp HwModuleCollection::getModuleForDeviceType(audio_devices_t type, } } } diff --git a/patches_treble_td/platform_frameworks_av/0009-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch b/patches_treble_td/platform_frameworks_av/0009-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch index e1452ee..14ad69a 100644 --- a/patches_treble_td/platform_frameworks_av/0009-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch +++ b/patches_treble_td/platform_frameworks_av/0009-Add-persist.sys.phh.samsung.camera_ids-property-to-a.patch @@ -1,4 +1,4 @@ -From 39b141bbcbcef2edb0837ca8b6e89330a48b5e94 Mon Sep 17 00:00:00 2001 +From 3bdff36cbdf77acc3d9c277b3b2eef9a2fca1c3c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 14 May 2020 19:54:55 +0200 Subject: [PATCH 09/24] Add persist.sys.phh.samsung.camera_ids property to @@ -11,7 +11,7 @@ Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp -index 4883a09f37..080ccf646d 100644 +index 5b76bb0c0f..2f574133c6 100644 --- a/services/camera/libcameraservice/Android.bp +++ b/services/camera/libcameraservice/Android.bp @@ -107,6 +107,7 @@ cc_defaults { @@ -23,7 +23,7 @@ index 4883a09f37..080ccf646d 100644 "libbinderthreadstateutils", "libcameraservice_device_independent", diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp -index d2643c1e13..71aabc14b3 100644 +index 065f0c5569..1b22767779 100644 --- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp @@ -28,6 +28,7 @@ diff --git a/patches_treble_td/platform_frameworks_av/0010-Add-a-property-to-force-camera-timestamp-source.patch b/patches_treble_td/platform_frameworks_av/0010-Add-a-property-to-force-camera-timestamp-source.patch index 0bd5451..369af8d 100644 --- a/patches_treble_td/platform_frameworks_av/0010-Add-a-property-to-force-camera-timestamp-source.patch +++ b/patches_treble_td/platform_frameworks_av/0010-Add-a-property-to-force-camera-timestamp-source.patch @@ -1,4 +1,4 @@ -From 924c9942ae267e00676623718996f34478a9e541 Mon Sep 17 00:00:00 2001 +From d3b95d0b5dfff1f1470dba177541b2090c8ad85d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 19 May 2020 14:01:14 +0200 Subject: [PATCH 10/24] Add a property to force camera timestamp source @@ -18,10 +18,10 @@ timestamp source. 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp -index bdf77993ea..44394ac6ff 100644 +index 303bcfc180..29702c84c0 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp -@@ -218,8 +218,16 @@ status_t Camera3Device::initializeCommonLocked() { +@@ -209,8 +209,16 @@ status_t Camera3Device::initializeCommonLocked() { mTimestampOffset = getMonoToBoottimeOffset(); camera_metadata_entry timestampSource = mDeviceInfo.find(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE); diff --git a/patches_treble_td/platform_frameworks_av/0011-FIH-devices-Fix-Earpiece-audio-output.patch b/patches_treble_td/platform_frameworks_av/0011-FIH-devices-Fix-Earpiece-audio-output.patch index e16c107..7c2bffc 100644 --- a/patches_treble_td/platform_frameworks_av/0011-FIH-devices-Fix-Earpiece-audio-output.patch +++ b/patches_treble_td/platform_frameworks_av/0011-FIH-devices-Fix-Earpiece-audio-output.patch @@ -1,4 +1,4 @@ -From 2770f16ee043c697256171eef02146114ce70890 Mon Sep 17 00:00:00 2001 +From ab29ebc6a1d51718ee60d28921ce53241433d66c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 24 Apr 2018 00:14:28 +0200 Subject: [PATCH 11/24] FIH devices: Fix "Earpiece" audio output diff --git a/patches_treble_td/platform_frameworks_av/0012-No-longer-make-re-assigning-legacy-audio-groups-fata.patch b/patches_treble_td/platform_frameworks_av/0012-No-longer-make-re-assigning-legacy-audio-groups-fata.patch index 55545a2..9dbb9c5 100644 --- a/patches_treble_td/platform_frameworks_av/0012-No-longer-make-re-assigning-legacy-audio-groups-fata.patch +++ b/patches_treble_td/platform_frameworks_av/0012-No-longer-make-re-assigning-legacy-audio-groups-fata.patch @@ -1,4 +1,4 @@ -From 74fbe339a37e281023053dc2ede79568b6d3b280 Mon Sep 17 00:00:00 2001 +From 958fc690726a71004bd0264664968b2bd8eb08ae Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 12 Sep 2020 12:32:50 +0200 Subject: [PATCH 12/24] No longer make re-assigning legacy audio groups fatal. diff --git a/patches_treble_td/platform_frameworks_av/0013-Make-camera-IDs-filter-out-optional.patch b/patches_treble_td/platform_frameworks_av/0013-Make-camera-IDs-filter-out-optional.patch index 62b1b5c..c8cb5f7 100644 --- a/patches_treble_td/platform_frameworks_av/0013-Make-camera-IDs-filter-out-optional.patch +++ b/patches_treble_td/platform_frameworks_av/0013-Make-camera-IDs-filter-out-optional.patch @@ -1,4 +1,4 @@ -From f455aa5e0d283d4a0f06869f3f7acdeb2b7ffc4e Mon Sep 17 00:00:00 2001 +From c3dd6050d65fe5793d30771eb8a008670949ba40 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 21 Dec 2020 20:19:11 +0100 Subject: [PATCH 13/24] Make camera IDs filter-out optional @@ -11,10 +11,10 @@ Add a property for that. 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp -index 3fffb03da8..ab6cb6bd57 100644 +index 60e4eb7b42..fbfdecc2ed 100644 --- a/services/camera/libcameraservice/common/CameraProviderManager.cpp +++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp -@@ -311,7 +311,9 @@ std::vector CameraProviderManager::getAPI1CompatibleCameraDeviceIds +@@ -328,7 +328,9 @@ std::vector CameraProviderManager::getAPI1CompatibleCameraDeviceIds // API1 app doesn't handle logical and physical camera devices well. So // for each camera facing, only take the first id advertised by HAL in // all [logical, physical1, physical2, ...] id combos, and filter out the rest. @@ -25,7 +25,7 @@ index 3fffb03da8..ab6cb6bd57 100644 collectDeviceIdsLocked(providerDeviceIds, publicDeviceIds, systemDeviceIds); } auto sortFunc = -@@ -1108,10 +1110,12 @@ SystemCameraKind CameraProviderManager::ProviderInfo::DeviceInfo3::getSystemCame +@@ -1137,10 +1139,12 @@ SystemCameraKind CameraProviderManager::ProviderInfo::DeviceInfo3::getSystemCame // Go through the capabilities and check if it has // ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA diff --git a/patches_treble_td/platform_frameworks_av/0014-Support-Samsung-R-multi-cams.patch b/patches_treble_td/platform_frameworks_av/0014-Support-Samsung-R-multi-cams.patch index 9f386a6..4a1b766 100644 --- a/patches_treble_td/platform_frameworks_av/0014-Support-Samsung-R-multi-cams.patch +++ b/patches_treble_td/platform_frameworks_av/0014-Support-Samsung-R-multi-cams.patch @@ -1,4 +1,4 @@ -From 665d173a566745531c3568e958079fabdd4aa857 Mon Sep 17 00:00:00 2001 +From dfa461bb49279d406df7e6b2e1817acea65e0faa Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 13 Mar 2021 14:20:03 -0500 Subject: [PATCH 14/24] Support Samsung R multi-cams @@ -10,7 +10,7 @@ Change-Id: If46f385e8dd16185cbf37ab083e6a1242e1d1555 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp -index 080ccf646d..1ece884867 100644 +index 2f574133c6..6b7a74edb6 100644 --- a/services/camera/libcameraservice/Android.bp +++ b/services/camera/libcameraservice/Android.bp @@ -108,6 +108,7 @@ cc_defaults { @@ -22,7 +22,7 @@ index 080ccf646d..1ece884867 100644 "libbinderthreadstateutils", "libcameraservice_device_independent", diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp -index 71aabc14b3..aefd6c3d4f 100644 +index 1b22767779..c60c0c4ffa 100644 --- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp @@ -29,6 +29,7 @@ diff --git a/patches_treble_td/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch b/patches_treble_td/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch index 2da4b62..e0412e5 100644 --- a/patches_treble_td/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch +++ b/patches_treble_td/platform_frameworks_av/0015-Not-all-sources-in-a-route-are-valid.-Dont-ignore-th.patch @@ -1,4 +1,4 @@ -From 4e599885f71f64964ede94de8a4d9bc01a6f882f Mon Sep 17 00:00:00 2001 +From 566af85de4cdf5f65c0b41b78d0973befa8bb6a7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 28 Mar 2021 18:54:47 +0200 Subject: [PATCH 15/24] Not all sources in a route are valid. Dont ignore the diff --git a/patches_treble_td/platform_frameworks_av/0016-Use-a-fake-volume-policy-when-none-has-been-found.patch b/patches_treble_td/platform_frameworks_av/0016-Use-a-fake-volume-policy-when-none-has-been-found.patch index 76d383c..2ff996e 100644 --- a/patches_treble_td/platform_frameworks_av/0016-Use-a-fake-volume-policy-when-none-has-been-found.patch +++ b/patches_treble_td/platform_frameworks_av/0016-Use-a-fake-volume-policy-when-none-has-been-found.patch @@ -1,4 +1,4 @@ -From b91e6acca8daa1ea9372cc74f9da70f0a9c196ec Mon Sep 17 00:00:00 2001 +From 6f500a59e45d517f5ebcad5893fc6d58e81c496e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 28 Mar 2021 14:48:49 +0200 Subject: [PATCH 16/24] Use a fake volume policy when none has been found diff --git a/patches_treble_td/platform_frameworks_av/0017-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch b/patches_treble_td/platform_frameworks_av/0017-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch index f71a4ec..69abfc3 100644 --- a/patches_treble_td/platform_frameworks_av/0017-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch +++ b/patches_treble_td/platform_frameworks_av/0017-Revert-Remove-support-for-audio-HAL-V2-from-the-fram.patch @@ -1,4 +1,4 @@ -From eb45c9ea30fbf316b31002f0ad5f14f5db4609f2 Mon Sep 17 00:00:00 2001 +From eae358283867bea937c4b9575e352a195d2def54 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Mon, 11 Oct 2021 16:10:42 -0400 Subject: [PATCH 17/24] Revert "Remove support for audio HAL V2 from the @@ -18,7 +18,7 @@ Change-Id: Icfd638a91b22ffa6d2cd6d19a624e699a85a850a 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/media/libaudiohal/Android.bp b/media/libaudiohal/Android.bp -index 3c05b0b472..1426930603 100644 +index b8d099897f..e4a11a3fa8 100644 --- a/media/libaudiohal/Android.bp +++ b/media/libaudiohal/Android.bp @@ -23,6 +23,7 @@ cc_library_shared { @@ -26,32 +26,30 @@ index 3c05b0b472..1426930603 100644 required: [ + "libaudiohal@2.0", - "libaudiohal@4.0", "libaudiohal@5.0", "libaudiohal@6.0", + "libaudiohal@7.0", diff --git a/media/libaudiohal/FactoryHal.cpp b/media/libaudiohal/FactoryHal.cpp -index f88915d7f4..24e5adbae3 100644 +index 15cb297b5c..c922dd184d 100644 --- a/media/libaudiohal/FactoryHal.cpp +++ b/media/libaudiohal/FactoryHal.cpp -@@ -50,7 +50,7 @@ using InterfaceName = std::pair; +@@ -50,12 +50,13 @@ using InterfaceName = std::pair; * This list need to keep sync with AudioHalVersionInfo.VERSIONS in * media/java/android/media/AudioHalVersionInfo.java. */ -static const std::array sAudioHALVersions = { +static const std::array sAudioHALVersions = { - // TODO: remove this comment to get AIDL - // AudioHalVersionInfo(AudioHalVersionInfo::Type::AIDL, 1, 0), + AudioHalVersionInfo(AudioHalVersionInfo::Type::AIDL, 1, 0), AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 7, 1), -@@ -58,6 +58,7 @@ static const std::array sAudioHALVersions = { + AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 7, 0), AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 6, 0), AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 5, 0), - AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 4, 0), + AudioHalVersionInfo(AudioHalVersionInfo::Type::HIDL, 2, 0), }; static const std::map sDevicesHALInterfaces = { diff --git a/media/libaudiohal/impl/Android.bp b/media/libaudiohal/impl/Android.bp -index fb1cc34932..61611965df 100644 +index 4d81f77d8e..23d7f0465b 100644 --- a/media/libaudiohal/impl/Android.bp +++ b/media/libaudiohal/impl/Android.bp @@ -82,6 +82,32 @@ cc_defaults { @@ -85,10 +83,10 @@ index fb1cc34932..61611965df 100644 +} + cc_library_shared { - name: "libaudiohal@4.0", + name: "libaudiohal@5.0", defaults: [ diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp -index af5d4bdea0..2f3c6bf390 100644 +index ea4258c878..4d4e8a8717 100644 --- a/media/libaudiohal/impl/DeviceHalHidl.cpp +++ b/media/libaudiohal/impl/DeviceHalHidl.cpp @@ -587,6 +587,7 @@ status_t DeviceHalHidl::setConnectedState(const struct audio_port_v7 *port, bool @@ -128,7 +126,7 @@ index af5d4bdea0..2f3c6bf390 100644 status_t DeviceHalHidl::dump(int fd, const Vector& args) { diff --git a/media/libaudiohal/impl/DevicesFactoryHalHidl.cpp b/media/libaudiohal/impl/DevicesFactoryHalHidl.cpp -index eef60b506c..e303e54b41 100644 +index 1cac9dab76..78c0c56416 100644 --- a/media/libaudiohal/impl/DevicesFactoryHalHidl.cpp +++ b/media/libaudiohal/impl/DevicesFactoryHalHidl.cpp @@ -119,6 +119,7 @@ status_t DevicesFactoryHalHidl::openDevice(const char *name, sp Date: Sat, 16 Apr 2022 14:30:14 -0400 Subject: [PATCH 18/24] Add a prop to change Samsung flash strength @@ -9,7 +9,7 @@ Subject: [PATCH 18/24] Add a prop to change Samsung flash strength 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp -index 1ece884867..6599763814 100644 +index 6b7a74edb6..1e1423f42b 100644 --- a/services/camera/libcameraservice/Android.bp +++ b/services/camera/libcameraservice/Android.bp @@ -83,6 +83,8 @@ cc_defaults { @@ -22,7 +22,7 @@ index 1ece884867..6599763814 100644 "android.hardware.common.fmq-V1-ndk", "camera_platform_flags_c_lib", diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp -index aefd6c3d4f..2412f82c37 100644 +index c60c0c4ffa..9d9275c89c 100644 --- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp @@ -30,6 +30,8 @@ @@ -34,7 +34,7 @@ index aefd6c3d4f..2412f82c37 100644 namespace { const bool kEnableLazyHal(property_get_bool("ro.camera.enableLazyHal", false)); -@@ -804,7 +806,23 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( +@@ -812,7 +814,23 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( status_t HidlProviderInfo::HidlDeviceInfo3::setTorchMode(bool enabled) { using hardware::camera::common::V1_0::TorchMode; const sp interface = startDeviceInterface(); diff --git a/patches_treble_td/platform_frameworks_av/0019-voip-Fix-high-pitched-voice-on-Qualcomm-devices.patch b/patches_treble_td/platform_frameworks_av/0019-voip-Fix-high-pitched-voice-on-Qualcomm-devices.patch index 2dd4596..1be7c95 100644 --- a/patches_treble_td/platform_frameworks_av/0019-voip-Fix-high-pitched-voice-on-Qualcomm-devices.patch +++ b/patches_treble_td/platform_frameworks_av/0019-voip-Fix-high-pitched-voice-on-Qualcomm-devices.patch @@ -1,4 +1,4 @@ -From 549f75e70fdc11d688bbb1df9f326a46f9000953 Mon Sep 17 00:00:00 2001 +From 584e013e0e203cd1605073707f36385d7ebf5892 Mon Sep 17 00:00:00 2001 From: ponces Date: Mon, 24 Oct 2022 09:38:34 +0100 Subject: [PATCH 19/24] voip: Fix high pitched voice on Qualcomm devices diff --git a/patches_treble_td/platform_frameworks_av/0020-audiopolicy-Fix-broken-mic-while-video-recording-on-.patch b/patches_treble_td/platform_frameworks_av/0020-audiopolicy-Fix-broken-mic-while-video-recording-on-.patch index f0da497..b786a15 100644 --- a/patches_treble_td/platform_frameworks_av/0020-audiopolicy-Fix-broken-mic-while-video-recording-on-.patch +++ b/patches_treble_td/platform_frameworks_av/0020-audiopolicy-Fix-broken-mic-while-video-recording-on-.patch @@ -1,4 +1,4 @@ -From 3eb988f5a5eba090129128fd88d518ca2f445a77 Mon Sep 17 00:00:00 2001 +From 627bb9864b9022a3c76cbe7f21ea3f003f13e97b Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 30 Apr 2023 23:29:04 +0100 Subject: [PATCH 20/24] audiopolicy: Fix broken mic while video recording on diff --git a/patches_treble_td/platform_frameworks_av/0021-Add-a-prop-to-disable-AUDIO_OUTPUT_FLAG_FAST-from-au.patch b/patches_treble_td/platform_frameworks_av/0021-Add-a-prop-to-disable-AUDIO_OUTPUT_FLAG_FAST-from-au.patch index 5157350..b328769 100644 --- a/patches_treble_td/platform_frameworks_av/0021-Add-a-prop-to-disable-AUDIO_OUTPUT_FLAG_FAST-from-au.patch +++ b/patches_treble_td/platform_frameworks_av/0021-Add-a-prop-to-disable-AUDIO_OUTPUT_FLAG_FAST-from-au.patch @@ -1,4 +1,4 @@ -From a2e4a50178fd41f0cb039373af1a4a3169d77386 Mon Sep 17 00:00:00 2001 +From 12536fe15af67eea0aa575396e7c84eba1b1a57e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 30 Oct 2023 10:30:58 -0400 Subject: [PATCH 21/24] Add a prop to disable AUDIO_OUTPUT_FLAG_FAST from audio diff --git a/patches_treble_td/platform_frameworks_av/0022-Add-a-prop-to-fix-echo-on-incoming-or-outgoing-calls.patch b/patches_treble_td/platform_frameworks_av/0022-Add-a-prop-to-fix-echo-on-incoming-or-outgoing-calls.patch index 52adf22..24feb73 100644 --- a/patches_treble_td/platform_frameworks_av/0022-Add-a-prop-to-fix-echo-on-incoming-or-outgoing-calls.patch +++ b/patches_treble_td/platform_frameworks_av/0022-Add-a-prop-to-fix-echo-on-incoming-or-outgoing-calls.patch @@ -1,4 +1,4 @@ -From 400c8f19e138e8013518f179818dccff84b1b90f Mon Sep 17 00:00:00 2001 +From 217b56d5afb18f9cdf8391751f5c81de89044012 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 5 Nov 2023 15:18:03 +0000 Subject: [PATCH 22/24] Add a prop to fix echo on incoming or outgoing calls diff --git a/patches_treble_td/platform_frameworks_av/0023-Include-Samsung-AIDL-camera-ids.patch b/patches_treble_td/platform_frameworks_av/0023-Include-Samsung-AIDL-camera-ids.patch index 7ec0d69..975e44a 100644 --- a/patches_treble_td/platform_frameworks_av/0023-Include-Samsung-AIDL-camera-ids.patch +++ b/patches_treble_td/platform_frameworks_av/0023-Include-Samsung-AIDL-camera-ids.patch @@ -1,4 +1,4 @@ -From e4ec1cdfa0672fb9837e9b9ed843261c01eff535 Mon Sep 17 00:00:00 2001 +From d7a75909fdfbe115e2026433bc007017532ece82 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 7 Feb 2024 05:06:32 -0500 Subject: [PATCH 23/24] Include Samsung AIDL camera ids @@ -9,7 +9,7 @@ Subject: [PATCH 23/24] Include Samsung AIDL camera ids 2 files changed, 22 insertions(+) diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp -index 6599763814..d5957fc7cc 100644 +index 1e1423f42b..bfe9c8bbb5 100644 --- a/services/camera/libcameraservice/Android.bp +++ b/services/camera/libcameraservice/Android.bp @@ -111,6 +111,7 @@ cc_defaults { @@ -21,7 +21,7 @@ index 6599763814..d5957fc7cc 100644 "libbinderthreadstateutils", "libcameraservice_device_independent", diff --git a/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp b/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp -index d773af3e9a..99ddcc129b 100644 +index a721d287f4..1e16541ed6 100644 --- a/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp +++ b/services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp @@ -30,6 +30,8 @@ diff --git a/patches_treble_td/platform_frameworks_av/0024-Allow-using-camera-modes-declared-in-Samsung-proprie.patch b/patches_treble_td/platform_frameworks_av/0024-Allow-using-camera-modes-declared-in-Samsung-proprie.patch index a72ee1a..2d33e8e 100644 --- a/patches_treble_td/platform_frameworks_av/0024-Allow-using-camera-modes-declared-in-Samsung-proprie.patch +++ b/patches_treble_td/platform_frameworks_av/0024-Allow-using-camera-modes-declared-in-Samsung-proprie.patch @@ -1,4 +1,4 @@ -From 7d501facc77ebb625927748e30fbaffbfdf87b96 Mon Sep 17 00:00:00 2001 +From 68bee34347886f4cc278ec00729d0105a08defc6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 10 Feb 2024 09:30:19 -0500 Subject: [PATCH 24/24] Allow using camera modes declared in Samsung @@ -9,7 +9,7 @@ Subject: [PATCH 24/24] Allow using camera modes declared in Samsung 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp -index f03ebd84fe..7ead9b194f 100644 +index b4adf3e5b4..d4d9c433a1 100644 --- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp +++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp @@ -168,35 +168,62 @@ bool roundBufferDimensionNearest(int32_t width, int32_t height, diff --git a/patches_treble_td/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch b/patches_treble_td/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch index bf72b02..511362d 100644 --- a/patches_treble_td/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch +++ b/patches_treble_td/platform_frameworks_base/0001-Fallback-to-stupid-autobrightness-if-brightness-valu.patch @@ -1,7 +1,7 @@ -From d8e5913abba9f2de9a476124219dc804eac930e0 Mon Sep 17 00:00:00 2001 +From 9f49cb42fc4f9fdfe42d2c2fe6e2ec37bb3e87b4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 5 Oct 2021 17:59:16 -0400 -Subject: [PATCH 01/50] Fallback to stupid autobrightness if brightness values +Subject: [PATCH 01/51] Fallback to stupid autobrightness if brightness values are broken This is needed because of: @@ -14,10 +14,10 @@ Change-Id: Ieb679b34239013a5e31b34cb010b12febd9ef6d9 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java -index d97127c91fbf..3dcb84dad786 100644 +index 9b2dcc53f456..04e06b99d3ee 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java +++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java -@@ -897,9 +897,14 @@ public class DisplayDeviceConfig { +@@ -894,9 +894,14 @@ public class DisplayDeviceConfig { */ public static DisplayDeviceConfig create(Context context, boolean useConfigXml, DisplayManagerFlags flags) { diff --git a/patches_treble_td/platform_frameworks_base/0002-Fix-env-empty-string-ANDROID_STORAGE.patch b/patches_treble_td/platform_frameworks_base/0002-Fix-env-empty-string-ANDROID_STORAGE.patch index 20ddc03..e3437c2 100644 --- a/patches_treble_td/platform_frameworks_base/0002-Fix-env-empty-string-ANDROID_STORAGE.patch +++ b/patches_treble_td/platform_frameworks_base/0002-Fix-env-empty-string-ANDROID_STORAGE.patch @@ -1,7 +1,7 @@ -From 3d14aac0ee3a37ed0fcad87c1eae170300b92326 Mon Sep 17 00:00:00 2001 +From 760a17ba02bbab91feb31c26f692b6871d1e3b95 Mon Sep 17 00:00:00 2001 From: Raphael Mounier Date: Sat, 6 Aug 2022 18:08:36 +0200 -Subject: [PATCH 02/50] Fix env empty string - ANDROID_STORAGE +Subject: [PATCH 02/51] Fix env empty string - ANDROID_STORAGE Huawei hi6250 define in init.hi6250.rc ANDROID_STORAGE to "", so check empty string and replace with default path. Apply change for all env directory --- @@ -9,10 +9,10 @@ Huawei hi6250 define in init.hi6250.rc ANDROID_STORAGE to "", so check empty str 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java -index 536ef31f334a..bebab95189d7 100644 +index a459aaa42930..168825411139 100644 --- a/core/java/android/os/Environment.java +++ b/core/java/android/os/Environment.java -@@ -1523,7 +1523,7 @@ public class Environment { +@@ -1526,7 +1526,7 @@ public class Environment { static File getDirectory(String variableName, String defaultPath) { String path = System.getenv(variableName); diff --git a/patches_treble_td/platform_frameworks_base/0003-Relax-requirement-for-visible-flag-to-sdcards.patch b/patches_treble_td/platform_frameworks_base/0003-Relax-requirement-for-visible-flag-to-sdcards.patch index 6a4df56..ceee7fd 100644 --- a/patches_treble_td/platform_frameworks_base/0003-Relax-requirement-for-visible-flag-to-sdcards.patch +++ b/patches_treble_td/platform_frameworks_base/0003-Relax-requirement-for-visible-flag-to-sdcards.patch @@ -1,7 +1,7 @@ -From 9b53e0b92842a042d0fe30428ab379fc59a13c61 Mon Sep 17 00:00:00 2001 +From 6f528a2a2c0c10884ead901ed412ff2132a6bcd4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 28 Nov 2017 18:28:04 +0100 -Subject: [PATCH 03/50] Relax requirement for visible flag to sdcards +Subject: [PATCH 03/51] Relax requirement for visible flag to sdcards The vast majority of sdcard readers are stable enough to be declared by the API. (I see no counter-example) @@ -13,10 +13,10 @@ Change-Id: Ia616671c03562d1eadaff5531a5c708a62d7ad3a 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java -index c1ff9de47a32..43a0552f041b 100644 +index 9ec2327352f7..5e5199abe7a6 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java -@@ -1619,7 +1619,8 @@ class StorageManagerService extends IStorageManager.Stub +@@ -1621,7 +1621,8 @@ class StorageManagerService extends IStorageManager.Stub // Adoptable public disks are visible to apps, since they meet // public API requirement of being in a stable location. diff --git a/patches_treble_td/platform_frameworks_base/0004-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch b/patches_treble_td/platform_frameworks_base/0004-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch index 7d9a63e..77b9da2 100644 --- a/patches_treble_td/platform_frameworks_base/0004-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch +++ b/patches_treble_td/platform_frameworks_base/0004-Don-t-crash-if-there-is-IR-HAL-is-not-declared.patch @@ -1,7 +1,7 @@ -From 433f12c138c7cedeabb88ac38ef438a9907c480c Mon Sep 17 00:00:00 2001 +From 501399a9fc8705c6e3967236413af35c157bf051 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 17 May 2018 20:28:35 +0200 -Subject: [PATCH 04/50] Don't crash if there is IR HAL is not declared +Subject: [PATCH 04/51] Don't crash if there is IR HAL is not declared Change-Id: I3afded27441bbee8244d5fda544b3e6d1238dc1b --- diff --git a/patches_treble_td/platform_frameworks_base/0005-Implement-a-persistent-property-to-override-the-defa.patch b/patches_treble_td/platform_frameworks_base/0005-Implement-a-persistent-property-to-override-the-defa.patch index 285a44b..b3d80b2 100644 --- a/patches_treble_td/platform_frameworks_base/0005-Implement-a-persistent-property-to-override-the-defa.patch +++ b/patches_treble_td/platform_frameworks_base/0005-Implement-a-persistent-property-to-override-the-defa.patch @@ -1,7 +1,7 @@ -From 29e5a30910687e3239aa08885a5c3e350ca81f6f Mon Sep 17 00:00:00 2001 +From 58f6aff63f9c4f42230be0b88f4a84994a0e2f00 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 1 Jun 2022 16:56:20 -0400 -Subject: [PATCH 05/50] Implement a persistent property to override the default +Subject: [PATCH 05/51] Implement a persistent property to override the default primary camera (0) Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b @@ -11,10 +11,10 @@ Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b 2 files changed, 14 insertions(+) diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java -index 66f001e30b30..260611fd41ac 100644 +index f5de97d698be..f0c6df1c7f2d 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java -@@ -450,6 +450,11 @@ public class Camera { +@@ -441,6 +441,11 @@ public class Camera { * @see #open(int) */ public static Camera open() { @@ -27,10 +27,10 @@ index 66f001e30b30..260611fd41ac 100644 CameraInfo cameraInfo = new CameraInfo(); for (int i = 0; i < numberOfCameras; i++) { diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java -index cfccaa73bd08..3048702c62eb 100644 +index b772d1ba4e9c..b06012320562 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java -@@ -2238,6 +2238,15 @@ public final class CameraManager { +@@ -2200,6 +2200,15 @@ public final class CameraManager { } }}); diff --git a/patches_treble_td/platform_frameworks_base/0006-Show-APN-Settings-for-CDMA-carriers.patch b/patches_treble_td/platform_frameworks_base/0006-Show-APN-Settings-for-CDMA-carriers.patch index eecac65..fe88025 100644 --- a/patches_treble_td/platform_frameworks_base/0006-Show-APN-Settings-for-CDMA-carriers.patch +++ b/patches_treble_td/platform_frameworks_base/0006-Show-APN-Settings-for-CDMA-carriers.patch @@ -1,19 +1,19 @@ -From e608b14cbbfae9250b40d7aaeeb00cac7cf2d539 Mon Sep 17 00:00:00 2001 +From 20f793880b1009b6a8f4baa97366d947effe25d3 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 6 Aug 2018 12:49:00 +0200 -Subject: [PATCH 06/50] Show APN Settings for CDMA carriers +Subject: [PATCH 06/51] Show APN Settings for CDMA carriers --- telephony/java/android/telephony/CarrierConfigManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java -index 7cb2cc398c46..1655dab30f6a 100644 +index 5d99acd87dd3..cf914d41cac9 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java -@@ -10139,7 +10139,7 @@ public class CarrierConfigManager { - sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true); +@@ -10347,7 +10347,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_PREFER_2G_BOOL, false); + sDefaults.putBoolean(KEY_PREFER_3G_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_4G_ONLY_BOOL, false); - sDefaults.putBoolean(KEY_SHOW_APN_SETTING_CDMA_BOOL, false); + sDefaults.putBoolean(KEY_SHOW_APN_SETTING_CDMA_BOOL, true); diff --git a/patches_treble_td/platform_frameworks_base/0007-Re-order-services-so-that-it-works-even-without-qtag.patch b/patches_treble_td/platform_frameworks_base/0007-Re-order-services-so-that-it-works-even-without-qtag.patch index 561beb8..ec9c83f 100644 --- a/patches_treble_td/platform_frameworks_base/0007-Re-order-services-so-that-it-works-even-without-qtag.patch +++ b/patches_treble_td/platform_frameworks_base/0007-Re-order-services-so-that-it-works-even-without-qtag.patch @@ -1,7 +1,7 @@ -From d8b94297131b965a2d4282f53c368f267b9e9251 Mon Sep 17 00:00:00 2001 +From 831dcfef08229154dee1300a8224f527d43e8b53 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 8 Nov 2018 23:04:03 +0100 -Subject: [PATCH 07/50] Re-order services so that it works even without qtaguid +Subject: [PATCH 07/51] Re-order services so that it works even without qtaguid Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df --- @@ -9,10 +9,10 @@ Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java -index 841f8a46aeb1..c941da5c5a74 100644 +index 53637d2c5f44..3465e1b31b6c 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java -@@ -983,6 +983,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { +@@ -1032,6 +1032,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "systemReady"); final int oldPriority = Process.getThreadPriority(Process.myTid()); try { @@ -23,7 +23,7 @@ index 841f8a46aeb1..c941da5c5a74 100644 // Boost thread's priority during system server init Process.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND); if (!isBandwidthControlEnabled()) { -@@ -990,10 +994,6 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { +@@ -1039,10 +1043,6 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { return; } diff --git a/patches_treble_td/platform_frameworks_base/0008-Support-samsung-Pie-and-Q-light-hal.patch b/patches_treble_td/platform_frameworks_base/0008-Support-samsung-Pie-and-Q-light-hal.patch index a73bc06..a10553b 100644 --- a/patches_treble_td/platform_frameworks_base/0008-Support-samsung-Pie-and-Q-light-hal.patch +++ b/patches_treble_td/platform_frameworks_base/0008-Support-samsung-Pie-and-Q-light-hal.patch @@ -1,7 +1,7 @@ -From b25663e9303b4544cf037a3e565832b48d637f5d Mon Sep 17 00:00:00 2001 +From 24816a5a9e825447d5f752c53dab6b5ec5567a5b Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 24 Mar 2019 23:05:14 +0100 -Subject: [PATCH 08/50] Support samsung Pie and Q light hal +Subject: [PATCH 08/51] Support samsung Pie and Q light hal Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6 --- @@ -9,10 +9,10 @@ Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6 1 file changed, 2 insertions(+) diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp -index 1ca147b91e8a..f4a22ef80c61 100644 +index e078c6e34912..3fa42184d653 100644 --- a/services/core/jni/Android.bp +++ b/services/core/jni/Android.bp -@@ -214,6 +214,8 @@ cc_defaults { +@@ -216,6 +216,8 @@ cc_defaults { "android.system.suspend-V1-ndk", "server_configurable_flags", "service.incremental", diff --git a/patches_treble_td/platform_frameworks_base/0009-Add-support-for-samsung-touch-physical-and-hover-pro.patch b/patches_treble_td/platform_frameworks_base/0009-Add-support-for-samsung-touch-physical-and-hover-pro.patch index 9cecc56..f133b01 100644 --- a/patches_treble_td/platform_frameworks_base/0009-Add-support-for-samsung-touch-physical-and-hover-pro.patch +++ b/patches_treble_td/platform_frameworks_base/0009-Add-support-for-samsung-touch-physical-and-hover-pro.patch @@ -1,19 +1,40 @@ -From 2584719094b8025923ce2f88e7af5d29f4329f54 Mon Sep 17 00:00:00 2001 +From ce7edaed1d3855037559a1ca9face8de8dc4d2ec Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 12 Aug 2019 23:08:26 +0200 -Subject: [PATCH 09/50] Add support for samsung touch, physical and hover +Subject: [PATCH 09/51] Add support for samsung touch, physical and hover proximity sensor as fallback to real proximity sensor Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865 --- - .../display/DisplayPowerController.java | 35 +++++++++++++++++++ + .../DisplayPowerProximityStateController.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) -diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java -index ae96e92cf22b..603c7a5d0086 100644 ---- a/services/core/java/com/android/server/display/DisplayPowerController.java -+++ b/services/core/java/com/android/server/display/DisplayPowerController.java -@@ -2465,6 +2465,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call +diff --git a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java +index 882c02faedf9..c517aa794aa1 100644 +--- a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java ++++ b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java +@@ -80,6 +80,20 @@ public final class DisplayPowerProximityStateController { + public void onSensorChanged(SensorEvent event) { + if (mProximitySensorEnabled) { + final long time = mClock.uptimeMillis(); ++ if("com.samsung.sensor.touch_proximity".equals(mProximitySensor.getStringType())) { ++ int v = (int)event.values[0]; ++ boolean positive = (v <= 4); ++ android.util.Log.d("PHH", "Samsung sensor changed " + positive + ":" + v); ++ handleProximitySensorEvent(time, positive); ++ return; ++ } ++ if("com.samsung.sensor.hover_proximity".equals(mProximitySensor.getStringType())) { ++ float v = event.values[0]; ++ boolean positive = (v >= 0.5f && v <= 4.5); ++ android.util.Log.d("PHH", "Samsung hover sensor changed " + positive + ":" + v); ++ handleProximitySensorEvent(time, positive); ++ return; ++ } + final float distance = event.values[0]; + boolean positive = distance >= 0.0f && distance < mProximityThreshold; + handleProximitySensorEvent(time, positive); +@@ -360,6 +374,27 @@ public final class DisplayPowerProximityStateController { } mProximitySensor = SensorUtils.findSensor(mSensorManager, mDisplayDeviceConfig.getProximitySensor(), Sensor.TYPE_PROXIMITY); @@ -41,27 +62,6 @@ index ae96e92cf22b..603c7a5d0086 100644 if (mProximitySensor != null) { mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(), TYPICAL_PROXIMITY_THRESHOLD); -@@ -3512,6 +3533,20 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call - public void onSensorChanged(SensorEvent event) { - if (mProximitySensorEnabled) { - final long time = mClock.uptimeMillis(); -+ if("com.samsung.sensor.touch_proximity".equals(mProximitySensor.getStringType())) { -+ int v = (int)event.values[0]; -+ boolean positive = (v <= 4); -+ android.util.Log.d("PHH", "Samsung sensor changed " + positive + ":" + v); -+ handleProximitySensorEvent(time, positive); -+ return; -+ } -+ if("com.samsung.sensor.hover_proximity".equals(mProximitySensor.getStringType())) { -+ float v = event.values[0]; -+ boolean positive = (v >= 0.5f && v <= 4.5); -+ android.util.Log.d("PHH", "Samsung hover sensor changed " + positive + ":" + v); -+ handleProximitySensorEvent(time, positive); -+ return; -+ } - final float distance = event.values[0]; - boolean positive = distance >= 0.0f && distance < mProximityThreshold; - handleProximitySensorEvent(time, positive); -- 2.34.1 diff --git a/patches_treble_td/platform_frameworks_base/0010-Always-allow-overriding-the-number-of-work-profiles.patch b/patches_treble_td/platform_frameworks_base/0010-Always-allow-overriding-the-number-of-work-profiles.patch index 95214ae..6eb60cd 100644 --- a/patches_treble_td/platform_frameworks_base/0010-Always-allow-overriding-the-number-of-work-profiles.patch +++ b/patches_treble_td/platform_frameworks_base/0010-Always-allow-overriding-the-number-of-work-profiles.patch @@ -1,7 +1,7 @@ -From 22418b0a3aae42784dc0003c063d0a306e8befa8 Mon Sep 17 00:00:00 2001 +From dd7dbc8f59d4fba55fcc965416c56751f319599f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 5 Apr 2020 16:32:46 +0200 -Subject: [PATCH 10/50] Always allow overriding the number of work profiles +Subject: [PATCH 10/51] Always allow overriding the number of work profiles Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a --- @@ -9,10 +9,10 @@ Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java -index 6f75a96c05db..c7b305cf120b 100644 +index 7349755402b1..0d1930db746a 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java -@@ -7560,12 +7560,8 @@ public class UserManagerService extends IUserManager.Stub { +@@ -7883,12 +7883,8 @@ public class UserManagerService extends IUserManager.Stub { */ private static int getMaxUsersOfTypePerParent(UserTypeDetails userTypeDetails) { final int defaultMax = userTypeDetails.getMaxAllowedPerParent(); diff --git a/patches_treble_td/platform_frameworks_base/0011-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch b/patches_treble_td/platform_frameworks_base/0011-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch index 0415929..ae81a84 100644 --- a/patches_treble_td/platform_frameworks_base/0011-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch +++ b/patches_treble_td/platform_frameworks_base/0011-HOME-deserves-to-wake-up-devices-just-as-well-as-bac.patch @@ -1,7 +1,7 @@ -From 0c9251a2cfa2635957040d76b0fe11738aa1ce41 Mon Sep 17 00:00:00 2001 +From 5521bfbb90d180097e069a8f3c50f1e6de0831b2 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 6 Jun 2020 18:21:56 +0200 -Subject: [PATCH 11/50] HOME deserves to wake-up devices just as well as back +Subject: [PATCH 11/51] HOME deserves to wake-up devices just as well as back and menu Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a @@ -10,10 +10,10 @@ Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a 1 file changed, 1 insertion(+) diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java -index 442a8a7cc571..09675dfbdafd 100644 +index 650992404913..2d32ef9bd096 100644 --- a/core/java/android/view/KeyEvent.java +++ b/core/java/android/view/KeyEvent.java -@@ -2084,6 +2084,7 @@ public class KeyEvent extends InputEvent implements Parcelable { +@@ -2104,6 +2104,7 @@ public class KeyEvent extends InputEvent implements Parcelable { case KeyEvent.KEYCODE_CAMERA: case KeyEvent.KEYCODE_FOCUS: case KeyEvent.KEYCODE_MENU: diff --git a/patches_treble_td/platform_frameworks_base/0012-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch b/patches_treble_td/platform_frameworks_base/0012-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch index 89ff91a..95867b1 100644 --- a/patches_treble_td/platform_frameworks_base/0012-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch +++ b/patches_treble_td/platform_frameworks_base/0012-Some-devices-have-proximity-sensor-reporting-NaN-as-.patch @@ -1,19 +1,19 @@ -From 99a33652a6b39bf603d2bb8aed674a61de8575f4 Mon Sep 17 00:00:00 2001 +From 393fb490f58dbf7ef5a3efe3e9e163887b4e2c14 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:39:47 +0200 -Subject: [PATCH 12/50] Some devices have proximity sensor reporting NaN as max +Subject: [PATCH 12/51] Some devices have proximity sensor reporting NaN as max range for some reason. Make them behave standard way by setting 5 cm Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612 --- - .../com/android/server/display/DisplayPowerController.java | 3 +++ + .../server/display/DisplayPowerProximityStateController.java | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java -index 603c7a5d0086..deb5651791e3 100644 ---- a/services/core/java/com/android/server/display/DisplayPowerController.java -+++ b/services/core/java/com/android/server/display/DisplayPowerController.java -@@ -2489,6 +2489,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call +diff --git a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java +index c517aa794aa1..565cbcd6bb56 100644 +--- a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java ++++ b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java +@@ -398,6 +398,9 @@ public final class DisplayPowerProximityStateController { if (mProximitySensor != null) { mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(), TYPICAL_PROXIMITY_THRESHOLD); diff --git a/patches_treble_td/platform_frameworks_base/0013-Fix-brightness-range-not-being-complete-on-Samsung-d.patch b/patches_treble_td/platform_frameworks_base/0013-Fix-brightness-range-not-being-complete-on-Samsung-d.patch index 08b3895..0ac544a 100644 --- a/patches_treble_td/platform_frameworks_base/0013-Fix-brightness-range-not-being-complete-on-Samsung-d.patch +++ b/patches_treble_td/platform_frameworks_base/0013-Fix-brightness-range-not-being-complete-on-Samsung-d.patch @@ -1,7 +1,7 @@ -From 36b81b62e53dcd1c2caa04e1e647c97c7ed783b4 Mon Sep 17 00:00:00 2001 +From d441b5a5df04f49bae09cb9d43675da26bf722bb Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 29 Sep 2020 22:40:10 +0200 -Subject: [PATCH 13/50] Fix brightness range not being complete on Samsung +Subject: [PATCH 13/51] Fix brightness range not being complete on Samsung devices On some devices, minimum brightness is 0, which totally messes with @@ -15,10 +15,10 @@ Change-Id: I4d97cbc32490949e83272b81ec6320a5483310b1 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java -index 422d38d3a2ca..475a09b0e910 100644 +index 2f8d9b795630..d7a46c545c14 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java -@@ -1243,9 +1243,11 @@ public final class PowerManagerService extends SystemService +@@ -1258,9 +1258,11 @@ public final class PowerManagerService extends SystemService if (min == INVALID_BRIGHTNESS_IN_CONFIG || max == INVALID_BRIGHTNESS_IN_CONFIG || def == INVALID_BRIGHTNESS_IN_CONFIG) { diff --git a/patches_treble_td/platform_frameworks_base/0014-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch b/patches_treble_td/platform_frameworks_base/0014-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch index 3f1e691..a34b24b 100644 --- a/patches_treble_td/platform_frameworks_base/0014-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch +++ b/patches_treble_td/platform_frameworks_base/0014-Re-implement-fnmatch-like-behaviour-for-RRO-java-sid.patch @@ -1,7 +1,7 @@ -From 69281cf6072b7290c232b1877460fcf2c2ba5e93 Mon Sep 17 00:00:00 2001 +From 4765587bd7258f49fd56bd3c41c79bd402290ef5 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 25 Oct 2020 23:57:26 +0100 -Subject: [PATCH 14/50] Re-implement fnmatch-like behaviour for RRO java-side +Subject: [PATCH 14/51] Re-implement fnmatch-like behaviour for RRO java-side T: Also apply to FrameworkParsingPackageUtils (@PeterCxy) diff --git a/patches_treble_td/platform_frameworks_base/0015-Remove-useless-notification-about-console-service-be.patch b/patches_treble_td/platform_frameworks_base/0015-Remove-useless-notification-about-console-service-be.patch index 0b77ffb..849478c 100644 --- a/patches_treble_td/platform_frameworks_base/0015-Remove-useless-notification-about-console-service-be.patch +++ b/patches_treble_td/platform_frameworks_base/0015-Remove-useless-notification-about-console-service-be.patch @@ -1,7 +1,7 @@ -From 197b3fc43e8728854b48218e7fe46ec960a05119 Mon Sep 17 00:00:00 2001 +From 0ea1b1e75dbb31fa21beda1d7b2f52f71c8377d3 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 11 Dec 2020 14:41:09 +0100 -Subject: [PATCH 15/50] Remove useless notification about "console" service +Subject: [PATCH 15/51] Remove useless notification about "console" service being running --- @@ -9,10 +9,10 @@ Subject: [PATCH 15/50] Remove useless notification about "console" service 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java -index 89b53aab1539..90d0666189c8 100644 +index 7f5a865935b4..48bf47a910ef 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java -@@ -5222,7 +5222,7 @@ public class ActivityManagerService extends IActivityManager.Stub +@@ -5247,7 +5247,7 @@ public class ActivityManagerService extends IActivityManager.Stub } private void showConsoleNotificationIfActive() { diff --git a/patches_treble_td/platform_frameworks_base/0016-Revert-Remove-unused-SystemProperties.set.patch b/patches_treble_td/platform_frameworks_base/0016-Revert-Remove-unused-SystemProperties.set.patch index bb08596..9394c0f 100644 --- a/patches_treble_td/platform_frameworks_base/0016-Revert-Remove-unused-SystemProperties.set.patch +++ b/patches_treble_td/platform_frameworks_base/0016-Revert-Remove-unused-SystemProperties.set.patch @@ -1,7 +1,7 @@ -From 511b30e50770302215590d22dc7f02217bdbb653 Mon Sep 17 00:00:00 2001 +From 8be4d9e18eb9dd627d77a3e80849b1c7f73c1cf9 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:24:12 +0800 -Subject: [PATCH 16/50] Revert "Remove unused SystemProperties.set" +Subject: [PATCH 16/51] Revert "Remove unused SystemProperties.set" This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f. @@ -11,10 +11,10 @@ This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f. 1 file changed, 69 insertions(+) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java -index f206987ddbf6..73c957c47892 100644 +index 88acbabc0e0f..9d2ea48dce30 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java -@@ -8152,6 +8152,75 @@ public class TelephonyManager { +@@ -8504,6 +8504,75 @@ public class TelephonyManager { } } diff --git a/patches_treble_td/platform_frameworks_base/0017-TelephonyManager-bring-back-getNetworkClass.patch b/patches_treble_td/platform_frameworks_base/0017-TelephonyManager-bring-back-getNetworkClass.patch index 2aa613b..e1afffd 100644 --- a/patches_treble_td/platform_frameworks_base/0017-TelephonyManager-bring-back-getNetworkClass.patch +++ b/patches_treble_td/platform_frameworks_base/0017-TelephonyManager-bring-back-getNetworkClass.patch @@ -1,7 +1,7 @@ -From 35fdd748c2c978cecd68e8f6d147e24a4efef916 Mon Sep 17 00:00:00 2001 +From 3ac937465aea31c403d6bc768f5bd2dd4011f2d2 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 13:46:15 +0800 -Subject: [PATCH 17/50] TelephonyManager: bring back getNetworkClass() +Subject: [PATCH 17/51] TelephonyManager: bring back getNetworkClass() This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf. @@ -11,10 +11,10 @@ This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf. 1 file changed, 58 insertions(+) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java -index 73c957c47892..0cd5ab7fad20 100644 +index 9d2ea48dce30..0c1857754fd5 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java -@@ -3256,6 +3256,64 @@ public class TelephonyManager { +@@ -3351,6 +3351,64 @@ public class TelephonyManager { } } diff --git a/patches_treble_td/platform_frameworks_base/0018-TelephonyManager-add-API-annotations-for-setTelephon.patch b/patches_treble_td/platform_frameworks_base/0018-TelephonyManager-add-API-annotations-for-setTelephon.patch index ef4389f..ba59480 100644 --- a/patches_treble_td/platform_frameworks_base/0018-TelephonyManager-add-API-annotations-for-setTelephon.patch +++ b/patches_treble_td/platform_frameworks_base/0018-TelephonyManager-add-API-annotations-for-setTelephon.patch @@ -1,7 +1,7 @@ -From 4a5c645b6ad129a63f02be32da7d0e7fa9940968 Mon Sep 17 00:00:00 2001 +From adc958b22938d1200a25c14ea8e963f716b35ad8 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 16 Dec 2020 21:26:45 +0800 -Subject: [PATCH 18/50] TelephonyManager: add API annotations for +Subject: [PATCH 18/51] TelephonyManager: add API annotations for setTelephonyProperty * This method was added back by reverting commit @@ -14,10 +14,10 @@ Subject: [PATCH 18/50] TelephonyManager: add API annotations for 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java -index 0cd5ab7fad20..bd5255d4a21a 100644 +index 0c1857754fd5..0c9601ad7b30 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java -@@ -8216,7 +8216,7 @@ public class TelephonyManager { +@@ -8568,7 +8568,7 @@ public class TelephonyManager { * @hide */ @UnsupportedAppUsage @@ -26,7 +26,7 @@ index 0cd5ab7fad20..bd5255d4a21a 100644 String propVal = ""; String p[] = null; String prop = SystemProperties.get(property); -@@ -8270,7 +8270,8 @@ public class TelephonyManager { +@@ -8622,7 +8622,8 @@ public class TelephonyManager { * * @hide */ diff --git a/patches_treble_td/platform_frameworks_base/0019-Fix-Wakelock-issue.patch b/patches_treble_td/platform_frameworks_base/0019-Fix-Wakelock-issue.patch index 897d3e9..6a58dc1 100644 --- a/patches_treble_td/platform_frameworks_base/0019-Fix-Wakelock-issue.patch +++ b/patches_treble_td/platform_frameworks_base/0019-Fix-Wakelock-issue.patch @@ -1,7 +1,7 @@ -From c4c128d8577afa55ec70de0552cf428e7bb579c7 Mon Sep 17 00:00:00 2001 +From 56f66013c55aec2a7825219daab763ca72665a62 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Tue, 2 Feb 2021 10:20:51 +0000 -Subject: [PATCH 19/50] Fix Wakelock issue +Subject: [PATCH 19/51] Fix Wakelock issue Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released --- @@ -9,10 +9,10 @@ Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only r 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java b/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java -index 6128feee8116..b60905b39e32 100644 +index 707751a58d84..72a522e22693 100644 --- a/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java +++ b/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java -@@ -143,7 +143,9 @@ public interface WakeLock { +@@ -150,7 +150,9 @@ public interface WakeLock { if (logger != null) { logger.logRelease(inner, why, count); } diff --git a/patches_treble_td/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch b/patches_treble_td/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch index 8606261..ac3c070 100644 --- a/patches_treble_td/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch +++ b/patches_treble_td/platform_frameworks_base/0020-Automatically-detect-pick-up-sensor-so-that-an-overl.patch @@ -1,7 +1,7 @@ -From 5bbd2dbb36c770256dc53a63735d4959cc4c52c3 Mon Sep 17 00:00:00 2001 +From 4bcd5fa89b3eb05aa46cc91270a7ed576355632d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 20 Mar 2021 14:31:01 +0100 -Subject: [PATCH 20/50] Automatically detect pick up sensor, so that an overlay +Subject: [PATCH 20/51] Automatically detect pick up sensor, so that an overlay is required for the sole purpose of enabling pulse doze on pick up sensor --- diff --git a/patches_treble_td/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch b/patches_treble_td/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch index 7721142..3353d62 100644 --- a/patches_treble_td/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch +++ b/patches_treble_td/platform_frameworks_base/0021-Catch-broken-mainBuiltInDisplayCutoutRectApproximati.patch @@ -1,7 +1,7 @@ -From 0e6f55f0b8ab83f74fb9b268630c2f411d2c7a28 Mon Sep 17 00:00:00 2001 +From e05c0928aa368491144213c614d8fa758e9f466a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 23 Mar 2021 19:43:26 +0100 -Subject: [PATCH 21/50] Catch broken mainBuiltInDisplayCutoutRectApproximation +Subject: [PATCH 21/51] Catch broken mainBuiltInDisplayCutoutRectApproximation Some devices (Redmi Note 9T) have: mainBuiltInDisplayCutoutRectApproximation = @android:mainBuiltInDisplayCutout @@ -14,14 +14,14 @@ Fix it by catching it, and parsing mainBuiltInDisplayCutout instead Change-Id: I03b6e78bac2cc38f3a623c8add801405ad6ba7ba --- - core/java/android/view/DisplayCutout.java | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) + core/java/android/view/DisplayCutout.java | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java -index 712d1d67c942..5d929873f18d 100644 +index db665a92ec5c..fcf7152f503c 100644 --- a/core/java/android/view/DisplayCutout.java +++ b/core/java/android/view/DisplayCutout.java -@@ -1056,11 +1056,19 @@ public final class DisplayCutout { +@@ -1188,12 +1188,21 @@ public final class DisplayCutout { public static DisplayCutout fromResourcesRectApproximation(Resources res, String displayUniqueId, int physicalDisplayWidth, int physicalDisplayHeight, int displayWidth, int displayHeight) { @@ -29,19 +29,22 @@ index 712d1d67c942..5d929873f18d 100644 - getDisplayCutoutApproximationRect(res, displayUniqueId), physicalDisplayWidth, - physicalDisplayHeight, displayWidth, displayHeight, - DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT, -- getWaterfallInsets(res, displayUniqueId)).second; +- getWaterfallInsets(res, displayUniqueId), +- getDisplayCutoutSideOverrides(res, displayUniqueId)).second; + try { + return pathAndDisplayCutoutFromSpec(getDisplayCutoutPath(res, displayUniqueId), + getDisplayCutoutApproximationRect(res, displayUniqueId), physicalDisplayWidth, + physicalDisplayHeight, displayWidth, displayHeight, + DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT, -+ getWaterfallInsets(res, displayUniqueId)).second; ++ getWaterfallInsets(res, displayUniqueId), ++ getDisplayCutoutSideOverrides(res, displayUniqueId)).second; + } catch(Throwable t) { + return pathAndDisplayCutoutFromSpec(getDisplayCutoutPath(res, displayUniqueId), + null, physicalDisplayWidth, + physicalDisplayHeight, displayWidth, displayHeight, + DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT, -+ getWaterfallInsets(res, displayUniqueId)).second; ++ getWaterfallInsets(res, displayUniqueId), ++ getDisplayCutoutSideOverrides(res, displayUniqueId)).second; + } } diff --git a/patches_treble_td/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch b/patches_treble_td/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch index 46ad428..d9f5326 100644 --- a/patches_treble_td/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch +++ b/patches_treble_td/platform_frameworks_base/0022-backlight-Fix-backlight-control-on-Galaxy-S9.patch @@ -1,7 +1,7 @@ -From 8716b7ebe29b4b66fc7a085f3244164140672ffa Mon Sep 17 00:00:00 2001 +From 5c18d4ac27568eac3ca2564dc884ed388d764390 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 24 Mar 2018 08:01:48 +0100 -Subject: [PATCH 22/50] backlight: Fix backlight control on Galaxy S9(+) +Subject: [PATCH 22/51] backlight: Fix backlight control on Galaxy S9(+) Change-Id: I1fbbb47939c377597ef8ad6b88b2acea5f4acaa6 @@ -53,7 +53,7 @@ Change-Id: I4e85178327d2bb63d5d0a37786058843662a89ba 1 file changed, 46 insertions(+) diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java -index 4d26f43307b2..c94d334b280b 100644 +index 76cf1348d313..39c4e361e00d 100644 --- a/services/core/java/com/android/server/lights/LightsService.java +++ b/services/core/java/com/android/server/lights/LightsService.java @@ -32,6 +32,7 @@ import android.os.Looper; diff --git a/patches_treble_td/platform_frameworks_base/0023-Revert-Switch-long-press-power-behavior-in-AOSP.patch b/patches_treble_td/platform_frameworks_base/0023-Revert-Switch-long-press-power-behavior-in-AOSP.patch index 624954b..2c1bded 100644 --- a/patches_treble_td/platform_frameworks_base/0023-Revert-Switch-long-press-power-behavior-in-AOSP.patch +++ b/patches_treble_td/platform_frameworks_base/0023-Revert-Switch-long-press-power-behavior-in-AOSP.patch @@ -1,7 +1,7 @@ -From 51f840e3a7afd5cbab39b28a96a62b2f99ef6647 Mon Sep 17 00:00:00 2001 +From cd01809407740ccbe45a1b97c4407d531c99a140 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 4 Sep 2021 08:26:30 +0000 -Subject: [PATCH 23/50] Revert "Switch long-press power behavior in AOSP." +Subject: [PATCH 23/51] Revert "Switch long-press power behavior in AOSP." This reverts commit 803c77a0a24624111944832098c6f65158051dc4. --- @@ -9,10 +9,10 @@ This reverts commit 803c77a0a24624111944832098c6f65158051dc4. 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml -index 3bc33bac37bc..19a03cac127e 100644 +index 0a4fc6515368..b8327ebba49f 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml -@@ -1131,7 +1131,7 @@ +@@ -1147,7 +1147,7 @@ 5 - Go to assistant (Settings.Secure.ASSISTANT) 6 - Toggle torch on / off (if screen is off) --> @@ -21,7 +21,7 @@ index 3bc33bac37bc..19a03cac127e 100644 500 -@@ -1163,7 +1163,7 @@ +@@ -1179,7 +1179,7 @@ 1 - Mute toggle 2 - Global actions menu --> diff --git a/patches_treble_td/platform_frameworks_base/0024-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch b/patches_treble_td/platform_frameworks_base/0024-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch index ad6f269..1954f8e 100644 --- a/patches_treble_td/platform_frameworks_base/0024-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch +++ b/patches_treble_td/platform_frameworks_base/0024-Allow-disabling-of-fingerprint-cleanups-needed-on-so.patch @@ -1,7 +1,7 @@ -From ce76ec2757c8140fc8f594bbd545ecbcb54c3e09 Mon Sep 17 00:00:00 2001 +From 44471da6ce761a2ff56142d8051bb701d5960d81 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 2 Apr 2022 18:04:01 -0400 -Subject: [PATCH 24/50] Allow disabling of fingerprint cleanups, needed on some +Subject: [PATCH 24/51] Allow disabling of fingerprint cleanups, needed on some Realme devices that cant enumerate --- @@ -9,10 +9,10 @@ Subject: [PATCH 24/50] Allow disabling of fingerprint cleanups, needed on some 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java -index d3cecd0e34c7..91f515161146 100644 +index 33e448bbe612..387693f2737d 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java -@@ -1004,6 +1004,8 @@ public class Fingerprint21 implements IHwBinder.DeathRecipient, ServiceProvider +@@ -1007,6 +1007,8 @@ public class Fingerprint21 implements IHwBinder.DeathRecipient, ServiceProvider private void scheduleInternalCleanup(int userId, @Nullable ClientMonitorCallback callback) { diff --git a/patches_treble_td/platform_frameworks_base/0025-Dynamically-resize-boot-animation-to-match-screen-si.patch b/patches_treble_td/platform_frameworks_base/0025-Dynamically-resize-boot-animation-to-match-screen-si.patch index 6ec22d1..5352c7c 100644 --- a/patches_treble_td/platform_frameworks_base/0025-Dynamically-resize-boot-animation-to-match-screen-si.patch +++ b/patches_treble_td/platform_frameworks_base/0025-Dynamically-resize-boot-animation-to-match-screen-si.patch @@ -1,7 +1,7 @@ -From 4897371a2b91eb8179cdc35abf12e380bb5675dc Mon Sep 17 00:00:00 2001 +From 29254fbb9a0ad465268f85693c66891231dbffe4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 20 Dec 2021 15:01:41 -0500 -Subject: [PATCH 25/50] Dynamically resize boot animation to match screen size +Subject: [PATCH 25/51] Dynamically resize boot animation to match screen size Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205 --- @@ -9,7 +9,7 @@ Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205 1 file changed, 22 insertions(+) diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp -index f5271aca5c59..560f73bf7e35 100644 +index 58d8ebf25e96..5329e6528b4c 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -635,6 +635,28 @@ status_t BootAnimation::readyToRun() { diff --git a/patches_treble_td/platform_frameworks_base/0026-Revert-Remove-more-FDE-methods-from-StorageManager.patch b/patches_treble_td/platform_frameworks_base/0026-Revert-Remove-more-FDE-methods-from-StorageManager.patch index b5de988..f1d2712 100644 --- a/patches_treble_td/platform_frameworks_base/0026-Revert-Remove-more-FDE-methods-from-StorageManager.patch +++ b/patches_treble_td/platform_frameworks_base/0026-Revert-Remove-more-FDE-methods-from-StorageManager.patch @@ -1,7 +1,7 @@ -From 639de917a53c7313597f9491fe425058764d7590 Mon Sep 17 00:00:00 2001 +From d5427d078f946fc8b98cf2b6cfc882b44fbd2b85 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 15 Oct 2022 09:33:56 +0000 -Subject: [PATCH 26/50] Revert "Remove more FDE methods from StorageManager" +Subject: [PATCH 26/51] Revert "Remove more FDE methods from StorageManager" This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676. @@ -12,10 +12,10 @@ Change-Id: Ic394934ec27b1a486c60123130825d44dad73412 2 files changed, 78 insertions(+) diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java -index 78a12f75a508..f9999fa8fde8 100644 +index d45a17f7194e..6850e261e6ad 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java -@@ -1714,6 +1714,15 @@ public class StorageManager { +@@ -1709,6 +1709,15 @@ public class StorageManager { return false; } @@ -31,7 +31,7 @@ index 78a12f75a508..f9999fa8fde8 100644 /** {@hide} * Is this device encrypted? *

-@@ -1738,6 +1747,71 @@ public class StorageManager { +@@ -1733,6 +1742,71 @@ public class StorageManager { return RoSystemProperties.CRYPTO_FILE_ENCRYPTED; } diff --git a/patches_treble_td/platform_frameworks_base/0027-Set-old-fingerprint-sensors-to-security-strong.patch b/patches_treble_td/platform_frameworks_base/0027-Set-old-fingerprint-sensors-to-security-strong.patch index 13cad44..3e1eb0b 100644 --- a/patches_treble_td/platform_frameworks_base/0027-Set-old-fingerprint-sensors-to-security-strong.patch +++ b/patches_treble_td/platform_frameworks_base/0027-Set-old-fingerprint-sensors-to-security-strong.patch @@ -1,7 +1,7 @@ -From 47b3844e2e84eddf67de5bbff2905dbec47c1a07 Mon Sep 17 00:00:00 2001 +From d65196ba35c1b8a02944ae0479cf0569784e58b3 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 3 Dec 2022 17:13:24 -0500 -Subject: [PATCH 27/50] Set old fingerprint sensors to security "strong" +Subject: [PATCH 27/51] Set old fingerprint sensors to security "strong" This allows removing config_biometric_sensors from overlays, which led to Pixels not booting, because they are using AIDL biometric sensor, and @@ -11,10 +11,10 @@ despite its name, config_biometric_sensors is HIDL-specific 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java -index 51b85f06ec46..5279073cd71a 100644 +index 755b64e97a6d..eef5e79e4ed5 100644 --- a/services/core/java/com/android/server/biometrics/AuthService.java +++ b/services/core/java/com/android/server/biometrics/AuthService.java -@@ -704,7 +704,7 @@ public class AuthService extends SystemService { +@@ -765,7 +765,7 @@ public class AuthService extends SystemService { final int firstApiLevel = SystemProperties.getInt(SYSPROP_FIRST_API_LEVEL, 0); final int apiLevel = SystemProperties.getInt(SYSPROP_API_LEVEL, firstApiLevel); String[] configStrings = mInjector.getConfiguration(getContext()); @@ -23,7 +23,7 @@ index 51b85f06ec46..5279073cd71a 100644 // For backwards compatibility with R where biometrics could work without being // configured in config_biometric_sensors. In the absence of a vendor provided // configuration, we assume the weakest biometric strength (i.e. convenience). -@@ -739,7 +739,7 @@ public class AuthService extends SystemService { +@@ -927,7 +927,7 @@ public class AuthService extends SystemService { if (pm.hasSystemFeature(PackageManager.FEATURE_FACE)) { modalities.add(String.valueOf(BiometricAuthenticator.TYPE_FACE)); } diff --git a/patches_treble_td/platform_frameworks_base/0028-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch b/patches_treble_td/platform_frameworks_base/0028-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch index 756d191..cfa426c 100644 --- a/patches_treble_td/platform_frameworks_base/0028-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch +++ b/patches_treble_td/platform_frameworks_base/0028-Call-Samsung-s-ISehSysInputDev-to-report-screen-stat.patch @@ -1,7 +1,7 @@ -From 2df1f2c9fbb7ceee139431a88cc53871859cb4db Mon Sep 17 00:00:00 2001 +From aadce93c923e2c8faa16e6d0e115b587c5b8c014 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 14 Dec 2022 17:21:00 -0500 -Subject: [PATCH 28/50] Call Samsung's ISehSysInputDev to report screen state +Subject: [PATCH 28/51] Call Samsung's ISehSysInputDev to report screen state to touchscreen driver This fixes touchscreen not waking up on Galaxy F23 @@ -11,22 +11,22 @@ This fixes touchscreen not waking up on Galaxy F23 2 files changed, 32 insertions(+) diff --git a/services/core/Android.bp b/services/core/Android.bp -index ffe5f3402037..a760814b8a40 100644 +index 5106e7695401..e7ed90dffb9d 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp -@@ -205,6 +205,7 @@ java_library_static { - "com_android_wm_shell_flags_lib", - "com.android.server.utils_aconfig-java", - "service-jobscheduler-deviceidle.flags-aconfig-java", +@@ -256,6 +256,7 @@ java_library_static { + "net_flags_lib", + "stats_flags_lib", + "core_os_flags_lib", + "vendor.samsung.hardware.sysinput-V1.2-java", // HIDL ], javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java -index 22898a65c5de..f9dbd91e6b5a 100644 +index 88c24e0a7eff..ac4a9c474c9e 100644 --- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java +++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java -@@ -35,6 +35,7 @@ import android.os.Trace; +@@ -38,6 +38,7 @@ import android.os.Trace; import android.util.DisplayUtils; import android.util.LongSparseArray; import android.util.Slog; @@ -34,7 +34,7 @@ index 22898a65c5de..f9dbd91e6b5a 100644 import android.util.SparseArray; import android.view.Display; import android.view.DisplayAddress; -@@ -55,6 +56,8 @@ import com.android.server.display.notifications.DisplayNotificationManager; +@@ -58,6 +59,8 @@ import com.android.server.display.notifications.DisplayNotificationManager; import com.android.server.lights.LightsManager; import com.android.server.lights.LogicalLight; @@ -43,8 +43,8 @@ index 22898a65c5de..f9dbd91e6b5a 100644 import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; -@@ -244,6 +247,8 @@ final class LocalDisplayAdapter extends DisplayAdapter { - private float mActiveRenderFrameRate; +@@ -251,6 +254,8 @@ final class LocalDisplayAdapter extends DisplayAdapter { + private DisplayEventReceiver.FrameRateOverride[] mFrameRateOverrides = new DisplayEventReceiver.FrameRateOverride[0]; + private boolean triedSamsungHal = false; @@ -52,7 +52,7 @@ index 22898a65c5de..f9dbd91e6b5a 100644 LocalDisplayDevice(IBinder displayToken, long physicalDisplayId, SurfaceControl.StaticDisplayInfo staticDisplayInfo, -@@ -850,16 +855,42 @@ final class LocalDisplayAdapter extends DisplayAdapter { +@@ -859,16 +864,42 @@ final class LocalDisplayAdapter extends DisplayAdapter { } } diff --git a/patches_treble_td/platform_frameworks_base/0029-Try-catch-around-constrainNitsAndBacklightArrays-and.patch b/patches_treble_td/platform_frameworks_base/0029-Try-catch-around-constrainNitsAndBacklightArrays-and.patch index ef8277f..d6735f9 100644 --- a/patches_treble_td/platform_frameworks_base/0029-Try-catch-around-constrainNitsAndBacklightArrays-and.patch +++ b/patches_treble_td/platform_frameworks_base/0029-Try-catch-around-constrainNitsAndBacklightArrays-and.patch @@ -1,7 +1,7 @@ -From b55da71220b0268eeb913f974dbf64dc9bff3e45 Mon Sep 17 00:00:00 2001 +From d5421f90ac947e0f130c0f9f0541dc5a435bd8b0 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 2 Jun 2023 19:19:31 -0400 -Subject: [PATCH 29/50] Try catch around constrainNitsAndBacklightArrays, and +Subject: [PATCH 29/51] Try catch around constrainNitsAndBacklightArrays, and falls back to dumb curve. It crashes on Xperia 1 IV. --- @@ -9,10 +9,10 @@ Subject: [PATCH 29/50] Try catch around constrainNitsAndBacklightArrays, and 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java -index 3dcb84dad786..9585bdc712cd 100644 +index 04e06b99d3ee..663f78f78e50 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java +++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java -@@ -2120,37 +2120,43 @@ public class DisplayDeviceConfig { +@@ -2145,37 +2145,43 @@ public class DisplayDeviceConfig { return; } diff --git a/patches_treble_td/platform_frameworks_base/0030-Add-Mediatek-power-hints-on-touch.patch b/patches_treble_td/platform_frameworks_base/0030-Add-Mediatek-power-hints-on-touch.patch index 3705e77..9b6d6af 100644 --- a/patches_treble_td/platform_frameworks_base/0030-Add-Mediatek-power-hints-on-touch.patch +++ b/patches_treble_td/platform_frameworks_base/0030-Add-Mediatek-power-hints-on-touch.patch @@ -1,7 +1,7 @@ -From aafc127180d05be573855ff8a5022959b3c6f8ce Mon Sep 17 00:00:00 2001 +From 7de442051c8745bf2dd55fdf24645c2eb42af403 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 17 Jun 2023 08:31:55 -0400 -Subject: [PATCH 30/50] Add Mediatek power hints on touch +Subject: [PATCH 30/51] Add Mediatek power hints on touch Mediatek has multiple HALs (which existed concurrently), so it is a bit of a mess. @@ -27,13 +27,13 @@ Change-Id: I9f1eac5a20b98920a5d0c8204fe4d165ba069f5a 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/services/core/Android.bp b/services/core/Android.bp -index a760814b8a40..fc9600992dbb 100644 +index e7ed90dffb9d..7638a7e36a64 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp -@@ -205,7 +205,9 @@ java_library_static { - "com_android_wm_shell_flags_lib", - "com.android.server.utils_aconfig-java", - "service-jobscheduler-deviceidle.flags-aconfig-java", +@@ -256,7 +256,9 @@ java_library_static { + "net_flags_lib", + "stats_flags_lib", + "core_os_flags_lib", - "vendor.samsung.hardware.sysinput-V1.2-java", // HIDL + // HIDL + "vendor.mediatek.hardware.mtkpower-V1.1-java", @@ -42,10 +42,10 @@ index a760814b8a40..fc9600992dbb 100644 javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java -index a85038f5d656..7becec71be48 100644 +index b6e614b55041..68013dd54778 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java -@@ -219,6 +219,9 @@ public class DisplayPolicy { +@@ -220,6 +220,9 @@ public class DisplayPolicy { */ private boolean mRemoteInsetsControllerControlsSystemBars; @@ -55,7 +55,7 @@ index a85038f5d656..7becec71be48 100644 StatusBarManagerInternal getStatusBarManagerInternal() { synchronized (mServiceAcquireLock) { if (mStatusBarManagerInternal == null) { -@@ -449,6 +452,19 @@ public class DisplayPolicy { +@@ -450,6 +453,19 @@ public class DisplayPolicy { mScreenOnEarly = true; mScreenOnFully = true; } @@ -75,7 +75,7 @@ index a85038f5d656..7becec71be48 100644 final Looper looper = UiThread.getHandler().getLooper(); mHandler = new PolicyHandler(looper); -@@ -533,6 +549,17 @@ public class DisplayPolicy { +@@ -534,6 +550,17 @@ public class DisplayPolicy { mService.mPowerManagerInternal.setPowerBoost( Boost.INTERACTION, duration); } @@ -93,7 +93,7 @@ index a85038f5d656..7becec71be48 100644 } @Override -@@ -551,6 +578,28 @@ public class DisplayPolicy { +@@ -552,6 +579,28 @@ public class DisplayPolicy { if (listener != null) { listener.onTouchStart(); } diff --git a/patches_treble_td/platform_frameworks_base/0031-Detect-Moto-dynamic-hardware-feature.patch b/patches_treble_td/platform_frameworks_base/0031-Detect-Moto-dynamic-hardware-feature.patch index 0fb3d25..034276b 100644 --- a/patches_treble_td/platform_frameworks_base/0031-Detect-Moto-dynamic-hardware-feature.patch +++ b/patches_treble_td/platform_frameworks_base/0031-Detect-Moto-dynamic-hardware-feature.patch @@ -1,7 +1,7 @@ -From 9b75172e57381886f96fa52bdbd7441622bc9f91 Mon Sep 17 00:00:00 2001 +From 456d4ad497ad7cbe4edcd4bcb2e4c3757a169095 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 5 Jul 2023 10:50:36 -0400 -Subject: [PATCH 31/50] Detect Moto dynamic hardware feature +Subject: [PATCH 31/51] Detect Moto dynamic hardware feature Moto added a custom node in sysconfig XMLs: @@ -14,10 +14,10 @@ NFC-less variants 1 file changed, 19 insertions(+) diff --git a/services/core/java/com/android/server/SystemConfig.java b/services/core/java/com/android/server/SystemConfig.java -index 40b29d7b09d5..38e82d8cac36 100644 +index e1d7be121865..c8dafc5024d7 100644 --- a/services/core/java/com/android/server/SystemConfig.java +++ b/services/core/java/com/android/server/SystemConfig.java -@@ -946,6 +946,25 @@ public class SystemConfig { +@@ -989,6 +989,25 @@ public class SystemConfig { } XmlUtils.skipCurrentTag(parser); } break; diff --git a/patches_treble_td/platform_frameworks_base/0032-Restore-getSimStateForSlotIndex-in-SubscriptionManag.patch b/patches_treble_td/platform_frameworks_base/0032-Restore-getSimStateForSlotIndex-in-SubscriptionManag.patch index 768d11a..9986236 100644 --- a/patches_treble_td/platform_frameworks_base/0032-Restore-getSimStateForSlotIndex-in-SubscriptionManag.patch +++ b/patches_treble_td/platform_frameworks_base/0032-Restore-getSimStateForSlotIndex-in-SubscriptionManag.patch @@ -1,7 +1,7 @@ -From 6bec6832764642598ec0bcd5c83721b47eb8ba93 Mon Sep 17 00:00:00 2001 +From 307ac5b06deb7a70f05c8a2bd738ef11876f221a Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Wed, 2 Aug 2023 20:59:53 +0800 -Subject: [PATCH 32/50] Restore getSimStateForSlotIndex in SubscriptionManager +Subject: [PATCH 32/51] Restore getSimStateForSlotIndex in SubscriptionManager MTK IMS still needs it here @@ -11,10 +11,10 @@ Change-Id: I41bac57c68055f369232359a464642daab94403b 1 file changed, 14 insertions(+) diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java -index 326b6f5af613..b994888362b0 100644 +index c5f2d42389e5..1324741145bd 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java -@@ -2693,6 +2693,20 @@ public class SubscriptionManager { +@@ -2902,6 +2902,20 @@ public class SubscriptionManager { return TelephonyManager.getDefault().isNetworkRoaming(subId); } diff --git a/patches_treble_td/platform_frameworks_base/0033-Add-runWithCleanCallingIdentity-variant-with-both-ex.patch b/patches_treble_td/platform_frameworks_base/0033-Add-runWithCleanCallingIdentity-variant-with-both-ex.patch index 6b32d4d..8ec0f04 100644 --- a/patches_treble_td/platform_frameworks_base/0033-Add-runWithCleanCallingIdentity-variant-with-both-ex.patch +++ b/patches_treble_td/platform_frameworks_base/0033-Add-runWithCleanCallingIdentity-variant-with-both-ex.patch @@ -1,7 +1,7 @@ -From 03de5a219b4353b4f7e362b1721632c98bd7fcf2 Mon Sep 17 00:00:00 2001 +From c9a1412315773301a7240ede72e49d136b142935 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 12 Aug 2023 20:11:17 +0800 -Subject: [PATCH 33/50] Add runWithCleanCallingIdentity variant with both +Subject: [PATCH 33/51] Add runWithCleanCallingIdentity variant with both executor and return value This complements the fixup to ImsPhoneCallTracker (in fw/o/t) for U @@ -12,10 +12,10 @@ Change-Id: If444290787025e130dce4bdeaf92372ae32793fe 1 file changed, 30 insertions(+) diff --git a/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java b/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java -index aed8fb8c4503..1467e7f2fc29 100644 +index a63db88cb614..1d5a36885307 100644 --- a/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java +++ b/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java -@@ -42,7 +42,9 @@ import com.android.internal.telephony.ITelephony; +@@ -44,7 +44,9 @@ import com.android.internal.telephony.ITelephony; import java.io.PrintWriter; import java.util.Collections; import java.util.List; @@ -25,7 +25,7 @@ index aed8fb8c4503..1467e7f2fc29 100644 import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; -@@ -151,6 +153,34 @@ public final class TelephonyUtils { +@@ -153,6 +155,34 @@ public final class TelephonyUtils { } } diff --git a/patches_treble_td/platform_frameworks_base/0034-Catch-NPE-in-SystemUI.patch b/patches_treble_td/platform_frameworks_base/0034-Catch-NPE-in-SystemUI.patch index a2deea7..7fd4e38 100644 --- a/patches_treble_td/platform_frameworks_base/0034-Catch-NPE-in-SystemUI.patch +++ b/patches_treble_td/platform_frameworks_base/0034-Catch-NPE-in-SystemUI.patch @@ -1,7 +1,7 @@ -From ae422fc5fe1f076d9387bd99668cdc026a6eb70d Mon Sep 17 00:00:00 2001 +From ef11482e4f6d1d9d985f556dc4cf3f88cd8cfe8d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 6 Oct 2023 10:57:13 -0400 -Subject: [PATCH 34/50] Catch NPE in SystemUI +Subject: [PATCH 34/51] Catch NPE in SystemUI No idea why it triggers, but it crashes SystemUI on boot for my TV device @@ -10,10 +10,10 @@ device 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java -index 81856ac16575..65b4834fb3c7 100644 +index 6034e92be873..627e6acf6955 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java -@@ -3450,7 +3450,11 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, +@@ -3486,7 +3486,11 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, Trace.beginSection("KeyguardViewMediator#handleMotifyStartedWakingUp"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyWakingUp"); diff --git a/patches_treble_td/platform_frameworks_base/0035-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch b/patches_treble_td/platform_frameworks_base/0035-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch index 90af4f5..ebc845e 100644 --- a/patches_treble_td/platform_frameworks_base/0035-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch +++ b/patches_treble_td/platform_frameworks_base/0035-Once-we-integrate-Samsung-Power-hal-in-libpowermanag.patch @@ -1,7 +1,7 @@ -From 2cef379821b7666bce2127f7dd24b69bbfabebae Mon Sep 17 00:00:00 2001 +From aee1f3126d76337515a39d5f311993aa621b0bfe Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 27 Dec 2021 17:57:11 -0500 -Subject: [PATCH 35/50] Once we integrate Samsung Power hal in libpowermanager, +Subject: [PATCH 35/51] Once we integrate Samsung Power hal in libpowermanager, libpowermanager and its deps require linking against vendor.samsung.hardware.miscpower@2.0 @@ -11,10 +11,10 @@ Change-Id: I9084f64e505009abe9420d28b44199605cee52d8 1 file changed, 1 insertion(+) diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp -index f4a22ef80c61..41d63267eccb 100644 +index 3fa42184d653..476a1f50530a 100644 --- a/services/core/jni/Android.bp +++ b/services/core/jni/Android.bp -@@ -216,6 +216,7 @@ cc_defaults { +@@ -218,6 +218,7 @@ cc_defaults { "service.incremental", "vendor.samsung.hardware.light@2.0", "vendor.samsung.hardware.light@3.0", diff --git a/patches_treble_td/platform_frameworks_base/0036-FOD-support-for-Asus-Samsung-recent-Xiaomi-and-RedMa.patch b/patches_treble_td/platform_frameworks_base/0036-FOD-support-for-Asus-Samsung-recent-Xiaomi-and-RedMa.patch index 5d6148c..49d7afb 100644 --- a/patches_treble_td/platform_frameworks_base/0036-FOD-support-for-Asus-Samsung-recent-Xiaomi-and-RedMa.patch +++ b/patches_treble_td/platform_frameworks_base/0036-FOD-support-for-Asus-Samsung-recent-Xiaomi-and-RedMa.patch @@ -1,7 +1,7 @@ -From 638ac773a3011d91734fbb7905652aced8e31812 Mon Sep 17 00:00:00 2001 +From 3dbb0649398207ef6fc9581f036fc766eadb3133 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 18 Dec 2022 18:20:40 -0500 -Subject: [PATCH 36/50] FOD support for Asus, Samsung recent Xiaomi and +Subject: [PATCH 36/51] FOD support for Asus, Samsung recent Xiaomi and RedMagic 8 devices Thanks Asus for providing a free device to make this support @@ -23,7 +23,7 @@ Also override UDFPS infos on AIDL fingerprints -- needed for FP on S24 Try catch the Xiaomi calls Typo in observing Samsung brightness -Change-Id: I091e0dac57d6d14f0a8805f8c9c332bfd9d8048b +Change-Id: I58008d312f0e9fd28b3cec989298d5b32c135320 --- packages/SystemUI/Android.bp | 4 + .../systemui/biometrics/UdfpsController.java | 76 ++++- @@ -37,12 +37,12 @@ Change-Id: I091e0dac57d6d14f0a8805f8c9c332bfd9d8048b 9 files changed, 640 insertions(+), 10 deletions(-) diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp -index d099dd511a01..40eefa935471 100644 +index 2fff124c6cb1..5ff640ee9b5f 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp -@@ -206,6 +206,10 @@ android_library { - "motion_tool_lib", - "notification_flags_lib", +@@ -165,6 +165,10 @@ android_library { + "androidx.activity_activity-compose", + "androidx.compose.animation_animation-graphics", "vendor.lineage.powershare-V1.0-java", + "vendor.goodix.hardware.biometrics.fingerprint-V2.1-java", + "vendor.xiaomi.hw.touchfeature-V1.0-java", @@ -52,7 +52,7 @@ index d099dd511a01..40eefa935471 100644 libs: [ "keepanno-annotations", diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java -index 65668b56a9f3..0f95ad8a8f45 100644 +index 2c3ebe901850..c17e6eed6098 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java @@ -41,11 +41,13 @@ import android.hardware.fingerprint.FingerprintSensorProperties; @@ -69,7 +69,7 @@ index 65668b56a9f3..0f95ad8a8f45 100644 import android.os.VibrationAttributes; import android.os.VibrationEffect; import android.util.Log; -@@ -113,9 +115,13 @@ import java.util.ArrayList; +@@ -115,8 +117,12 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Executor; @@ -78,12 +78,11 @@ index 65668b56a9f3..0f95ad8a8f45 100644 +import java.io.IOException; import javax.inject.Inject; - import javax.inject.Provider; +import vendor.nubia.ifaa.V1_0.IIfaa; + import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.ExperimentalCoroutinesApi; - -@@ -177,6 +183,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -182,6 +188,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final UdfpsKeyguardAccessibilityDelegate mUdfpsKeyguardAccessibilityDelegate; @NonNull private final SelectedUserInteractor mSelectedUserInteractor; @NonNull private final FpsUnlockTracker mFpsUnlockTracker; @@ -92,7 +91,7 @@ index 65668b56a9f3..0f95ad8a8f45 100644 private final boolean mIgnoreRefreshRate; private final KeyguardTransitionInteractor mKeyguardTransitionInteractor; -@@ -249,6 +257,46 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -254,6 +262,46 @@ public class UdfpsController implements DozeReceiver, Dumpable { mScreenOn = false; } }; @@ -139,17 +138,17 @@ index 65668b56a9f3..0f95ad8a8f45 100644 @Override public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { -@@ -671,7 +719,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { - @NonNull FpsUnlockTracker fpsUnlockTracker, - @NonNull KeyguardTransitionInteractor keyguardTransitionInteractor, - Lazy deviceEntryUdfpsTouchOverlayViewModel, -- Lazy defaultUdfpsTouchOverlayViewModel) { -+ Lazy defaultUdfpsTouchOverlayViewModel, +@@ -687,7 +735,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { + Lazy defaultUdfpsTouchOverlayViewModel, + @NonNull UdfpsOverlayInteractor udfpsOverlayInteractor, + @NonNull PowerInteractor powerInteractor, +- @Application CoroutineScope scope) { ++ @Application CoroutineScope scope, + @NonNull ColorDisplayManager colorDisplayManager) { mContext = context; mExecution = execution; mVibrator = vibrator; -@@ -717,6 +766,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -737,6 +786,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { mFpsUnlockTracker = fpsUnlockTracker; mFpsUnlockTracker.startTracking(); mKeyguardTransitionInteractor = keyguardTransitionInteractor; @@ -157,7 +156,7 @@ index 65668b56a9f3..0f95ad8a8f45 100644 mTouchProcessor = singlePointerTouchProcessor; mSessionTracker = sessionTracker; -@@ -790,7 +840,10 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -809,7 +859,10 @@ public class UdfpsController implements DozeReceiver, Dumpable { private void showUdfpsOverlay(@NonNull UdfpsControllerOverlay overlay) { mExecution.assertIsMainThread(); @@ -169,7 +168,7 @@ index 65668b56a9f3..0f95ad8a8f45 100644 mOverlay = overlay; final int requestReason = overlay.getRequestReason(); if (requestReason == REASON_AUTH_KEYGUARD -@@ -1016,6 +1069,10 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -1035,6 +1088,10 @@ public class UdfpsController implements DozeReceiver, Dumpable { return; } if (isOptical()) { @@ -180,7 +179,7 @@ index 65668b56a9f3..0f95ad8a8f45 100644 mLatencyTracker.onActionStart(ACTION_UDFPS_ILLUMINATE); } if (getBiometricSessionType() == SESSION_KEYGUARD) { -@@ -1047,10 +1104,17 @@ public class UdfpsController implements DozeReceiver, Dumpable { +@@ -1066,10 +1123,17 @@ public class UdfpsController implements DozeReceiver, Dumpable { } } } @@ -198,8 +197,8 @@ index 65668b56a9f3..0f95ad8a8f45 100644 } private void onFingerUp(long requestId, @NonNull View view) { -@@ -1084,8 +1148,16 @@ public class UdfpsController implements DozeReceiver, Dumpable { - mActivePointerId = -1; +@@ -1103,8 +1167,16 @@ public class UdfpsController implements DozeReceiver, Dumpable { + mActivePointerId = MotionEvent.INVALID_POINTER_ID; mAcquiredReceived = false; if (mOnFingerDown) { + if (mIgnoreExtraDim && isOptical()) { @@ -216,10 +215,10 @@ index 65668b56a9f3..0f95ad8a8f45 100644 cb.onFingerUp(); } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt -index dae6d08f7331..7761251f2378 100644 +index 16865ca809d9..6619be426ca9 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt -@@ -141,7 +141,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor( +@@ -168,7 +168,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor( gravity = android.view.Gravity.TOP or android.view.Gravity.LEFT layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS flags = (Utils.FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS or @@ -230,9 +229,9 @@ index dae6d08f7331..7761251f2378 100644 privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY // Avoid announcing window title. accessibilityTitle = " " -@@ -222,6 +224,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor( +@@ -252,6 +254,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor( - windowManager.addView(this, coreLayoutParams.updateDimensions(animation)) + addViewNowOrLater(this, animation) sensorRect = sensorBounds + dimUpdate = { + windowManager.updateViewLayout(this, coreLayoutParams.updateDimensions(animation).apply { dimAmount = it }) @@ -534,10 +533,10 @@ index b5d5803ca6fb..68f74f3ed6f3 100644 /** * Called to ensure code is only run when the flag is enabled. This protects users from the diff --git a/services/core/Android.bp b/services/core/Android.bp -index fc9600992dbb..bf0b5d92db7f 100644 +index 7638a7e36a64..ef02e6eeec79 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp -@@ -208,6 +208,11 @@ java_library_static { +@@ -259,6 +259,11 @@ java_library_static { // HIDL "vendor.mediatek.hardware.mtkpower-V1.1-java", "vendor.samsung.hardware.sysinput-V1.2-java", @@ -550,10 +549,10 @@ index fc9600992dbb..bf0b5d92db7f 100644 javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java -index 5279073cd71a..f6f0fea8e3e7 100644 +index eef5e79e4ed5..b1f06482dc19 100644 --- a/services/core/java/com/android/server/biometrics/AuthService.java +++ b/services/core/java/com/android/server/biometrics/AuthService.java -@@ -80,6 +80,25 @@ import java.util.ArrayList; +@@ -85,6 +85,25 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -579,7 +578,7 @@ index 5279073cd71a..f6f0fea8e3e7 100644 /** * System service that provides an interface for authenticating with biometrics and * PIN/pattern/password to BiometricPrompt and lock screen. -@@ -98,6 +117,11 @@ public class AuthService extends SystemService { +@@ -103,6 +122,11 @@ public class AuthService extends SystemService { @VisibleForTesting final IAuthService.Stub mImpl; @@ -591,7 +590,7 @@ index 5279073cd71a..f6f0fea8e3e7 100644 /** * Class for injecting dependencies into AuthService. * TODO(b/141025588): Replace with a dependency injection framework (e.g. Guice, Dagger). -@@ -704,11 +728,11 @@ public class AuthService extends SystemService { +@@ -765,11 +789,11 @@ public class AuthService extends SystemService { final int firstApiLevel = SystemProperties.getInt(SYSPROP_FIRST_API_LEVEL, 0); final int apiLevel = SystemProperties.getInt(SYSPROP_API_LEVEL, firstApiLevel); String[] configStrings = mInjector.getConfiguration(getContext()); @@ -605,8 +604,8 @@ index 5279073cd71a..f6f0fea8e3e7 100644 configStrings = generateRSdkCompatibleConfiguration(); } hidlConfigs = new SensorConfig[configStrings.length]; -@@ -723,6 +747,102 @@ public class AuthService extends SystemService { - registerAuthenticators(hidlConfigs); +@@ -788,6 +812,102 @@ public class AuthService extends SystemService { + } mInjector.publishBinderService(this, mImpl); + try { @@ -707,8 +706,8 @@ index 5279073cd71a..f6f0fea8e3e7 100644 + } } - /** -@@ -846,18 +966,123 @@ public class AuthService extends SystemService { + private void registerAuthenticators() { +@@ -1039,18 +1159,123 @@ public class AuthService extends SystemService { ? modality : (modality & ~BiometricAuthenticator.TYPE_CREDENTIAL); } @@ -834,7 +833,7 @@ index 5279073cd71a..f6f0fea8e3e7 100644 // config_is_powerbutton_fps indicates whether device has a power button fingerprint sensor. final boolean isPowerbuttonFps = getContext().getResources().getBoolean( -@@ -925,4 +1150,67 @@ public class AuthService extends SystemService { +@@ -1118,4 +1343,67 @@ public class AuthService extends SystemService { componentInfo, resetLockoutRequiresHardwareAuthToken, resetLockoutRequiresChallenge); } @@ -903,10 +902,10 @@ index 5279073cd71a..f6f0fea8e3e7 100644 + } } diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java -index 83b306b07c27..28b45a59ee62 100644 +index 1ba12134ab29..41a7eb0acffa 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java -@@ -889,8 +889,9 @@ public class FingerprintService extends SystemService { +@@ -913,8 +913,9 @@ public class FingerprintService extends SystemService { filteredInstances = filterAvailableHalInstances(hidlSensors, aidlSensors); final List providers = new ArrayList<>(); @@ -918,59 +917,59 @@ index 83b306b07c27..28b45a59ee62 100644 return providers; }); diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java -index 07a69d9ebd00..2bb568bedabc 100644 +index 158179dca499..2f113a08eae2 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java -@@ -37,6 +37,7 @@ import android.hardware.biometrics.common.ComponentInfo; +@@ -38,6 +38,7 @@ import android.hardware.biometrics.common.ComponentInfo; import android.hardware.biometrics.fingerprint.IFingerprint; import android.hardware.biometrics.fingerprint.PointerContext; import android.hardware.biometrics.fingerprint.SensorProps; +import android.hardware.biometrics.fingerprint.SensorLocation; import android.hardware.fingerprint.Fingerprint; import android.hardware.fingerprint.FingerprintAuthenticateOptions; - import android.hardware.fingerprint.FingerprintManager; -@@ -204,9 +205,32 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi - }); + import android.hardware.fingerprint.FingerprintEnrollOptions; +@@ -249,9 +250,32 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi + } else { + final List workaroundLocations = + getWorkaroundSensorProps(mContext); ++ android.util.Log.e("PHH-Enroll", "Poping AIDL fp provider"); - final List workaroundLocations = getWorkaroundSensorProps(context); -+android.util.Log.e("PHH-Enroll", "Poping AIDL fp provider"); - - for (SensorProps prop : props) { - final int sensorId = prop.commonProps.sensorId; -+ SensorLocation[] locations = prop.sensorLocations; + for (SensorProps prop : props) { + final int sensorId = prop.commonProps.sensorId; ++ SensorLocation[] locations = prop.sensorLocations; + -+ android.util.Log.e("PHH-Enroll", "Got fp props -- pre"); -+ for(SensorLocation loc: locations) { -+ android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); -+ } -+ if (locations.length == 1 && locations[0].sensorLocationX == 0) { -+ int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(context); -+ if (otherValues.length > 0) { -+ SensorLocation loc = new SensorLocation(); -+ loc.sensorLocationX = otherValues[0]; -+ loc.sensorLocationY = otherValues[1]; -+ loc.sensorRadius = otherValues[2]; -+ locations[0] = loc; ++ android.util.Log.e("PHH-Enroll", "Got fp props -- pre"); ++ for(SensorLocation loc: locations) { ++ android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); ++ } ++ if (locations.length == 1 && locations[0].sensorLocationX == 0) { ++ int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(context); ++ if (otherValues.length > 0) { ++ SensorLocation loc = new SensorLocation(); ++ loc.sensorLocationX = otherValues[0]; ++ loc.sensorLocationY = otherValues[1]; ++ loc.sensorRadius = otherValues[2]; ++ locations[0] = loc; ++ } + } -+ } + -+ android.util.Log.e("PHH-Enroll", "Got fp props -- post"); -+ for(SensorLocation loc: locations) { -+ android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); -+ } ++ android.util.Log.e("PHH-Enroll", "Got fp props -- post"); ++ for(SensorLocation loc: locations) { ++ android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); ++ } + - - final List componentInfo = new ArrayList<>(); - if (prop.commonProps.componentInfo != null) { -@@ -226,7 +250,7 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi - prop.halControlsIllumination, - true /* resetLockoutRequiresHardwareAuthToken */, - !workaroundLocations.isEmpty() ? workaroundLocations : -- Arrays.stream(prop.sensorLocations).map(location -> -+ Arrays.stream(locations).map(location -> - new SensorLocationInternal( - location.display, - location.sensorLocationX, + final List componentInfo = new ArrayList<>(); + if (prop.commonProps.componentInfo != null) { + for (ComponentInfo info : prop.commonProps.componentInfo) { +@@ -269,7 +293,7 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi + prop.halControlsIllumination, + true /* resetLockoutRequiresHardwareAuthToken */, + !workaroundLocations.isEmpty() ? workaroundLocations : +- Arrays.stream(prop.sensorLocations).map( ++ Arrays.stream(locations).map( + location -> new SensorLocationInternal( + location.display, + location.sensorLocationX, -- 2.34.1 diff --git a/patches_treble_td/platform_frameworks_base/0037-Fix-brightness-slider-curve-for-some-devices.patch b/patches_treble_td/platform_frameworks_base/0037-Fix-brightness-slider-curve-for-some-devices.patch index 5070366..d169476 100644 --- a/patches_treble_td/platform_frameworks_base/0037-Fix-brightness-slider-curve-for-some-devices.patch +++ b/patches_treble_td/platform_frameworks_base/0037-Fix-brightness-slider-curve-for-some-devices.patch @@ -1,7 +1,7 @@ -From 2caf7271a3841feb8a90d18f7d69866c9afe3dab Mon Sep 17 00:00:00 2001 +From 9186c997014accd6cd08ec2e61477cf0280da31e Mon Sep 17 00:00:00 2001 From: ChonDoit Date: Thu, 24 Aug 2023 15:58:15 -0300 -Subject: [PATCH 37/50] Fix brightness slider curve for some devices +Subject: [PATCH 37/51] Fix brightness slider curve for some devices Some devices report max brightness as 2047 or 4095 --- diff --git a/patches_treble_td/platform_frameworks_base/0038-Ignore-cgroup-creation-errors.patch b/patches_treble_td/platform_frameworks_base/0038-Ignore-cgroup-creation-errors.patch index 808401d..740a2f7 100644 --- a/patches_treble_td/platform_frameworks_base/0038-Ignore-cgroup-creation-errors.patch +++ b/patches_treble_td/platform_frameworks_base/0038-Ignore-cgroup-creation-errors.patch @@ -1,7 +1,7 @@ -From 541e55d24e8ab0e01d7dd9e117ecc43a79bc0b16 Mon Sep 17 00:00:00 2001 +From 83fc09d801e31646f3c1ad2be40ca08286d6ff78 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 18 Oct 2023 16:53:40 -0400 -Subject: [PATCH 38/50] Ignore cgroup creation errors +Subject: [PATCH 38/51] Ignore cgroup creation errors For old kernels who don't have those modern cgroups --- @@ -10,11 +10,11 @@ For old kernels who don't have those modern cgroups 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp -index 7c5885adb220..c2f45e3727bb 100644 +index 3ed9f49ede26..90c6e6d145c0 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp -@@ -1943,10 +1943,12 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, - if (!is_system_server && getuid() == 0) { +@@ -1968,10 +1968,12 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, + if (getuid() == 0) { const int rc = createProcessGroup(uid, getpid()); if (rc != 0) { +#if 0 @@ -27,10 +27,10 @@ index 7c5885adb220..c2f45e3727bb 100644 } diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java -index 3156e9da0ae9..e5949f95b6d1 100644 +index 89c89944e92e..641b2cc824e0 100644 --- a/services/core/java/com/android/server/am/ProcessList.java +++ b/services/core/java/com/android/server/am/ProcessList.java -@@ -2516,14 +2516,9 @@ public final class ProcessList { +@@ -2513,14 +2513,9 @@ public final class ProcessList { // If we're not told to skip the process group creation, go create it. final int res = Process.createProcessGroup(uid, startResult.pid); if (res < 0) { diff --git a/patches_treble_td/platform_frameworks_base/0039-Samsung-tablets-use-SW_MACHINE_COVER-rather-than-SW_.patch b/patches_treble_td/platform_frameworks_base/0039-Samsung-tablets-use-SW_MACHINE_COVER-rather-than-SW_.patch index 6faa8e4..7a7f3b8 100644 --- a/patches_treble_td/platform_frameworks_base/0039-Samsung-tablets-use-SW_MACHINE_COVER-rather-than-SW_.patch +++ b/patches_treble_td/platform_frameworks_base/0039-Samsung-tablets-use-SW_MACHINE_COVER-rather-than-SW_.patch @@ -1,7 +1,7 @@ -From 0ec9abbe99e9836d694eed10559c7776531d1378 Mon Sep 17 00:00:00 2001 +From 0faff8144a45bfd70395614b4cd0d611d0b3cc2a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 18 Oct 2023 16:57:34 -0400 -Subject: [PATCH 39/50] Samsung tablets use SW_MACHINE_COVER rather than SW_LID +Subject: [PATCH 39/51] Samsung tablets use SW_MACHINE_COVER rather than SW_LID So check whether SW_MACHINE_COVER is declared, then use it Otherwise stick to SW_LID @@ -12,10 +12,10 @@ Should fix https://github.com/phhusson/treble_experimentations/issues/2572 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java -index 972f85793556..2f813324b75f 100644 +index 05b1cb69235b..0f44f37e2262 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java -@@ -373,6 +373,9 @@ public class InputManagerService extends IInputManager.Stub +@@ -376,6 +376,9 @@ public class InputManagerService extends IInputManager.Stub /** Switch code: Microphone. When set, the mic is muted. */ public static final int SW_MUTE_DEVICE = 0x0e; @@ -25,7 +25,7 @@ index 972f85793556..2f813324b75f 100644 public static final int SW_LID_BIT = 1 << SW_LID; public static final int SW_TABLET_MODE_BIT = 1 << SW_TABLET_MODE; public static final int SW_KEYPAD_SLIDE_BIT = 1 << SW_KEYPAD_SLIDE; -@@ -384,6 +387,8 @@ public class InputManagerService extends IInputManager.Stub +@@ -387,6 +390,8 @@ public class InputManagerService extends IInputManager.Stub SW_HEADPHONE_INSERT_BIT | SW_MICROPHONE_INSERT_BIT | SW_JACK_PHYSICAL_INSERT_BIT | SW_LINEOUT_INSERT_BIT; public static final int SW_CAMERA_LENS_COVER_BIT = 1 << SW_CAMERA_LENS_COVER; public static final int SW_MUTE_DEVICE_BIT = 1 << SW_MUTE_DEVICE; @@ -34,7 +34,7 @@ index 972f85793556..2f813324b75f 100644 // The following are layer numbers used for z-ordering the input overlay layers on the display. // This is used for ordering layers inside {@code DisplayContent#getInputOverlayLayer()}. -@@ -494,6 +499,16 @@ public class InputManagerService extends IInputManager.Stub +@@ -499,6 +504,16 @@ public class InputManagerService extends IInputManager.Stub mWiredAccessoryCallbacks = callbacks; } @@ -51,7 +51,7 @@ index 972f85793556..2f813324b75f 100644 void registerLidSwitchCallbackInternal(@NonNull LidSwitchCallback callback) { synchronized (mLidSwitchLock) { mLidSwitchCallbacks.add(callback); -@@ -502,7 +517,8 @@ public class InputManagerService extends IInputManager.Stub +@@ -507,7 +522,8 @@ public class InputManagerService extends IInputManager.Stub // state will be reported as KEY_STATE_UNKNOWN. The callback will be triggered in // systemRunning(). if (mSystemReady) { @@ -61,7 +61,7 @@ index 972f85793556..2f813324b75f 100644 == KEY_STATE_UP; callback.notifyLidSwitchChanged(0 /* whenNanos */, lidOpen); } -@@ -540,7 +556,8 @@ public class InputManagerService extends IInputManager.Stub +@@ -545,7 +561,8 @@ public class InputManagerService extends IInputManager.Stub // Send the initial lid switch state to any callback registered before the system was // ready. @@ -71,7 +71,7 @@ index 972f85793556..2f813324b75f 100644 for (int i = 0; i < mLidSwitchCallbacks.size(); i++) { LidSwitchCallback callback = mLidSwitchCallbacks.get(i); callback.notifyLidSwitchChanged(0 /* whenNanos */, switchState == KEY_STATE_UP); -@@ -2355,8 +2372,8 @@ public class InputManagerService extends IInputManager.Stub +@@ -2370,8 +2387,8 @@ public class InputManagerService extends IInputManager.Stub + ", mask=" + Integer.toHexString(switchMask)); } diff --git a/patches_treble_td/platform_frameworks_base/0040-Revert-Removed-IWLAN-legacy-mode-support.patch b/patches_treble_td/platform_frameworks_base/0040-Revert-Removed-IWLAN-legacy-mode-support.patch index 1df4961..8a88662 100644 --- a/patches_treble_td/platform_frameworks_base/0040-Revert-Removed-IWLAN-legacy-mode-support.patch +++ b/patches_treble_td/platform_frameworks_base/0040-Revert-Removed-IWLAN-legacy-mode-support.patch @@ -1,7 +1,7 @@ -From 59a5f752cd9c87b48dedbca083e95bf7045c84d5 Mon Sep 17 00:00:00 2001 +From 89d3e2c4a761ed2e7b8cc9d12de529746130e668 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Fri, 20 Oct 2023 09:26:19 +0000 -Subject: [PATCH 40/50] Revert "Removed IWLAN legacy mode support" +Subject: [PATCH 40/51] Revert "Removed IWLAN legacy mode support" This reverts commit 2832dee607ab33eee688abea206f4adfcfc896f1. --- @@ -9,10 +9,10 @@ This reverts commit 2832dee607ab33eee688abea206f4adfcfc896f1. 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java -index 85a85c6dfadb..6c96ac4bc712 100644 +index db167c0592df..ef64fc9fcc65 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java -@@ -1215,8 +1215,13 @@ public class ServiceState implements Parcelable { +@@ -1217,8 +1217,13 @@ public class ServiceState implements Parcelable { /** * Initialize the service state. Set everything to the default value. @@ -27,7 +27,7 @@ index 85a85c6dfadb..6c96ac4bc712 100644 if (DBG) Rlog.d(LOG_TAG, "init"); mVoiceRegState = STATE_OUT_OF_SERVICE; mDataRegState = STATE_OUT_OF_SERVICE; -@@ -1248,11 +1253,13 @@ public class ServiceState implements Parcelable { +@@ -1250,11 +1255,13 @@ public class ServiceState implements Parcelable { .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); @@ -46,7 +46,7 @@ index 85a85c6dfadb..6c96ac4bc712 100644 } mOperatorAlphaLongRaw = null; mOperatorAlphaShortRaw = null; -@@ -1261,11 +1268,11 @@ public class ServiceState implements Parcelable { +@@ -1263,11 +1270,11 @@ public class ServiceState implements Parcelable { } public void setStateOutOfService() { @@ -60,7 +60,7 @@ index 85a85c6dfadb..6c96ac4bc712 100644 mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; } -@@ -1273,11 +1280,14 @@ public class ServiceState implements Parcelable { +@@ -1275,11 +1282,14 @@ public class ServiceState implements Parcelable { /** * Set the service state to out-of-service * diff --git a/patches_treble_td/platform_frameworks_base/0041-Add-a-prop-to-use-linear-backlight-control.patch b/patches_treble_td/platform_frameworks_base/0041-Add-a-prop-to-use-linear-backlight-control.patch index 585a6e9..b11d941 100644 --- a/patches_treble_td/platform_frameworks_base/0041-Add-a-prop-to-use-linear-backlight-control.patch +++ b/patches_treble_td/platform_frameworks_base/0041-Add-a-prop-to-use-linear-backlight-control.patch @@ -1,14 +1,14 @@ -From d2957b70a3c2b5d4e524d61dee5208148273c480 Mon Sep 17 00:00:00 2001 +From 63259a8182cc222a25f0c22bd7b5eb16382baa9d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 30 Oct 2023 19:25:27 -0400 -Subject: [PATCH 41/50] Add a prop to use linear backlight control +Subject: [PATCH 41/51] Add a prop to use linear backlight control --- .../settings/brightness/BrightnessController.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java -index 520f841cb736..a7ed04dad7c4 100644 +index a48da045360c..d327870ed754 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java +++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java @@ -362,9 +362,15 @@ public class BrightnessController implements ToggleSlider.Listener, MirroredBrig diff --git a/patches_treble_td/platform_frameworks_base/0042-Add-support-for-Samsung-full-brightness-on-their-AID.patch b/patches_treble_td/platform_frameworks_base/0042-Add-support-for-Samsung-full-brightness-on-their-AID.patch index abe8ecb..1591b9d 100644 --- a/patches_treble_td/platform_frameworks_base/0042-Add-support-for-Samsung-full-brightness-on-their-AID.patch +++ b/patches_treble_td/platform_frameworks_base/0042-Add-support-for-Samsung-full-brightness-on-their-AID.patch @@ -1,7 +1,7 @@ -From c5f9230959c480e46c95dd5a7dbdd6e236d80801 Mon Sep 17 00:00:00 2001 +From f010b259dfdcb010248580dd9ec6fcd1f309e91b Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 10 Dec 2023 18:04:49 -0500 -Subject: [PATCH 42/50] Add support for Samsung full brightness on their AIDL +Subject: [PATCH 42/51] Add support for Samsung full brightness on their AIDL HAL --- @@ -10,10 +10,10 @@ Subject: [PATCH 42/50] Add support for Samsung full brightness on their AIDL 2 files changed, 44 insertions(+) diff --git a/services/core/Android.bp b/services/core/Android.bp -index bf0b5d92db7f..848512dc7835 100644 +index ef02e6eeec79..5e8a5bc0916c 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp -@@ -213,6 +213,10 @@ java_library_static { +@@ -264,6 +264,10 @@ java_library_static { "vendor.oplus.hardware.biometrics.fingerprint-V2.1-java", "vendor.oppo.hardware.biometrics.fingerprint-V2.1-java", "vendor.xiaomi.hardware.fingerprintextension-V1.0-java", @@ -25,7 +25,7 @@ index bf0b5d92db7f..848512dc7835 100644 javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java -index c94d334b280b..9d9e905fdf48 100644 +index 39c4e361e00d..57d824d5720c 100644 --- a/services/core/java/com/android/server/lights/LightsService.java +++ b/services/core/java/com/android/server/lights/LightsService.java @@ -45,8 +45,10 @@ import com.android.internal.util.DumpUtils; @@ -77,7 +77,7 @@ index c94d334b280b..9d9e905fdf48 100644 String fp = SystemProperties.get("ro.vendor.build.fingerprint", "hello"); if(fp.matches(".*astarqlte.*")) { int newBrightness = brightnessInt; -@@ -516,6 +535,27 @@ public class LightsService extends SystemService { +@@ -525,6 +544,27 @@ public class LightsService extends SystemService { mH = new Handler(looper); mVintfLights = service.get() != null ? service : null; diff --git a/patches_treble_td/platform_frameworks_base/0043-Add-Samsung-sysinput.patch b/patches_treble_td/platform_frameworks_base/0043-Add-Samsung-sysinput.patch index 86afbb6..ca156dd 100644 --- a/patches_treble_td/platform_frameworks_base/0043-Add-Samsung-sysinput.patch +++ b/patches_treble_td/platform_frameworks_base/0043-Add-Samsung-sysinput.patch @@ -1,17 +1,17 @@ -From 58d8f2d374863b2e3d8ad7964718ca34f3e61f99 Mon Sep 17 00:00:00 2001 +From 8d090a934b549dc7619d83a8f8a395dd3847c0e9 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 29 Jan 2024 17:07:07 -0500 -Subject: [PATCH 43/50] Add Samsung sysinput +Subject: [PATCH 43/51] Add Samsung sysinput --- services/core/Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/Android.bp b/services/core/Android.bp -index 848512dc7835..52f8c57dcdc1 100644 +index 5e8a5bc0916c..8f547e246298 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp -@@ -215,6 +215,7 @@ java_library_static { +@@ -266,6 +266,7 @@ java_library_static { "vendor.xiaomi.hardware.fingerprintextension-V1.0-java", //AIDL diff --git a/patches_treble_td/platform_frameworks_base/0044-Bunch-of-FOD-stuff-commonize-refreshing-the-services.patch b/patches_treble_td/platform_frameworks_base/0044-Bunch-of-FOD-stuff-commonize-refreshing-the-services.patch index 70d188f..90fb88a 100644 --- a/patches_treble_td/platform_frameworks_base/0044-Bunch-of-FOD-stuff-commonize-refreshing-the-services.patch +++ b/patches_treble_td/platform_frameworks_base/0044-Bunch-of-FOD-stuff-commonize-refreshing-the-services.patch @@ -1,7 +1,7 @@ -From a3ae2f7a7aa63c58a0b43fb39a056e0a24d131de Mon Sep 17 00:00:00 2001 +From 2c6fee0675db102440d32b4e55f38faf672f24ac Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 29 Jan 2024 17:15:38 -0500 -Subject: [PATCH 44/50] Bunch of FOD stuff -- commonize refreshing the +Subject: [PATCH 44/51] Bunch of FOD stuff -- commonize refreshing the services, start supporting AIDL Samsung --- @@ -9,10 +9,10 @@ Subject: [PATCH 44/50] Bunch of FOD stuff -- commonize refreshing the 1 file changed, 138 insertions(+), 19 deletions(-) diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java -index f6f0fea8e3e7..62c8bcf37960 100644 +index b1f06482dc19..62f6a7125b6a 100644 --- a/services/core/java/com/android/server/biometrics/AuthService.java +++ b/services/core/java/com/android/server/biometrics/AuthService.java -@@ -47,6 +47,7 @@ import android.hardware.biometrics.IAuthService; +@@ -48,6 +48,7 @@ import android.hardware.biometrics.IAuthService; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricService; import android.hardware.biometrics.IBiometricServiceReceiver; @@ -20,7 +20,7 @@ index f6f0fea8e3e7..62c8bcf37960 100644 import android.hardware.biometrics.IInvalidationCallback; import android.hardware.biometrics.ITestSession; import android.hardware.biometrics.ITestSessionCallback; -@@ -96,6 +97,7 @@ import android.os.Build; +@@ -101,6 +102,7 @@ import android.os.Build; import vendor.samsung.hardware.biometrics.fingerprint.V3_0.ISehBiometricsFingerprint; import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon; import vendor.samsung.hardware.sysinput.V1_0.ISehSysInputDev; @@ -28,7 +28,7 @@ index f6f0fea8e3e7..62c8bcf37960 100644 import vendor.xiaomi.hardware.fingerprintextension.V1_0.IXiaomiFingerprint; -@@ -119,6 +121,8 @@ public class AuthService extends SystemService { +@@ -124,6 +126,8 @@ public class AuthService extends SystemService { private FileObserver fodFileObserver = null; private ISehBiometricsFingerprint mSamsungFingerprint = null; @@ -37,7 +37,7 @@ index f6f0fea8e3e7..62c8bcf37960 100644 private IXiaomiFingerprint mXiaomiFingerprint = null; -@@ -719,6 +723,101 @@ public class AuthService extends SystemService { +@@ -780,6 +784,101 @@ public class AuthService extends SystemService { * └── for (s : p.sensors) * └── BiometricService.registerAuthenticator(s) */ @@ -139,9 +139,9 @@ index f6f0fea8e3e7..62c8bcf37960 100644 @Override public void onStart() { mBiometricService = mInjector.getBiometricService(); -@@ -746,20 +845,11 @@ public class AuthService extends SystemService { - // Registers HIDL and AIDL authenticators, but only HIDL configs need to be provided. - registerAuthenticators(hidlConfigs); +@@ -811,20 +910,11 @@ public class AuthService extends SystemService { + registerAuthenticators(hidlConfigs); + } + refreshVendorServices(); + @@ -164,7 +164,7 @@ index f6f0fea8e3e7..62c8bcf37960 100644 samsungCmd("fod_enable,1,1,0"); String actualMaskBrightnessPath = "/sys/class/lcd/panel/actual_mask_brightness"; android.util.Log.e("PHH-Enroll", "Reading actual brightness file gives " + readFile(actualMaskBrightnessPath)); -@@ -767,9 +857,7 @@ public class AuthService extends SystemService { +@@ -832,9 +922,7 @@ public class AuthService extends SystemService { @Override public void onEvent(int event, String path) { String actualMask = readFile(actualMaskBrightnessPath); @@ -175,7 +175,7 @@ index f6f0fea8e3e7..62c8bcf37960 100644 Slog.d("PHH-Enroll", "New actual mask brightness is " + actualMask); try { int eventReq = 0; -@@ -1014,22 +1102,53 @@ public class AuthService extends SystemService { +@@ -1207,22 +1295,53 @@ public class AuthService extends SystemService { udfpsProps[2] = (int)mW; try { diff --git a/patches_treble_td/platform_frameworks_base/0045-Some-Samsung-devices-use-SW_FLIP-0x15-rather-than-SW.patch b/patches_treble_td/platform_frameworks_base/0045-Some-Samsung-devices-use-SW_FLIP-0x15-rather-than-SW.patch index 3338367..3cfadf3 100644 --- a/patches_treble_td/platform_frameworks_base/0045-Some-Samsung-devices-use-SW_FLIP-0x15-rather-than-SW.patch +++ b/patches_treble_td/platform_frameworks_base/0045-Some-Samsung-devices-use-SW_FLIP-0x15-rather-than-SW.patch @@ -1,7 +1,7 @@ -From fd972adec5cecd44b735a16554139846a3ab5c85 Mon Sep 17 00:00:00 2001 +From 77e0e4b81b7749de76010e9fb666294d8f7df856 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 4 Feb 2024 18:01:07 -0500 -Subject: [PATCH 45/50] Some Samsung devices use SW_FLIP 0x15 rather than +Subject: [PATCH 45/51] Some Samsung devices use SW_FLIP 0x15 rather than SW_MACHINE_COVER 0x10, so use that --- @@ -9,10 +9,10 @@ Subject: [PATCH 45/50] Some Samsung devices use SW_FLIP 0x15 rather than 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java -index 2f813324b75f..09f8e2a337cd 100644 +index 0f44f37e2262..d3d29ef85c62 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java -@@ -375,6 +375,8 @@ public class InputManagerService extends IInputManager.Stub +@@ -378,6 +378,8 @@ public class InputManagerService extends IInputManager.Stub /** Switch code: Cover. When set, the cover is closed. */ public static final int SW_MACHINE_COVER = 0x10; @@ -21,7 +21,7 @@ index 2f813324b75f..09f8e2a337cd 100644 public static final int SW_LID_BIT = 1 << SW_LID; public static final int SW_TABLET_MODE_BIT = 1 << SW_TABLET_MODE; -@@ -500,13 +502,22 @@ public class InputManagerService extends IInputManager.Stub +@@ -505,13 +507,22 @@ public class InputManagerService extends IInputManager.Stub } private void checkForSwMachineCover() { diff --git a/patches_treble_td/platform_frameworks_base/0046-Include-vendor.samsung.hardware.radio.network-V1-jav.patch b/patches_treble_td/platform_frameworks_base/0046-Include-vendor.samsung.hardware.radio.network-V1-jav.patch index 8b86667..e23e7a7 100644 --- a/patches_treble_td/platform_frameworks_base/0046-Include-vendor.samsung.hardware.radio.network-V1-jav.patch +++ b/patches_treble_td/platform_frameworks_base/0046-Include-vendor.samsung.hardware.radio.network-V1-jav.patch @@ -1,7 +1,7 @@ -From 9f26d51690a7486becabcb6090ffc34e051f3551 Mon Sep 17 00:00:00 2001 +From 66a169e155ad58d7ad2f1b38d9139a225b0308f0 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 21 Feb 2024 12:41:46 -0500 -Subject: [PATCH 46/50] Include vendor.samsung.hardware.radio.network-V1-java +Subject: [PATCH 46/51] Include vendor.samsung.hardware.radio.network-V1-java in base libs, will be used by f/o/telephony --- @@ -9,10 +9,10 @@ Subject: [PATCH 46/50] Include vendor.samsung.hardware.radio.network-V1-java 1 file changed, 1 insertion(+) diff --git a/Android.bp b/Android.bp -index c63068db1660..e1c218caaf88 100644 +index af1074b7a998..ca9c8a600028 100644 --- a/Android.bp +++ b/Android.bp -@@ -232,6 +232,7 @@ java_library { +@@ -240,6 +240,7 @@ java_library { "android.hardware.radio.messaging-V3-java", "android.hardware.radio.modem-V3-java", "android.hardware.radio.network-V3-java", diff --git a/patches_treble_td/platform_frameworks_base/0047-Include-vendor.samsung.hardware.radio-V2.2-java-HIDL.patch b/patches_treble_td/platform_frameworks_base/0047-Include-vendor.samsung.hardware.radio-V2.2-java-HIDL.patch index 79d1b03..0778fca 100644 --- a/patches_treble_td/platform_frameworks_base/0047-Include-vendor.samsung.hardware.radio-V2.2-java-HIDL.patch +++ b/patches_treble_td/platform_frameworks_base/0047-Include-vendor.samsung.hardware.radio-V2.2-java-HIDL.patch @@ -1,7 +1,7 @@ -From 4ffbef7659e91ea50c94b8b9d7bb2b07d9cf6873 Mon Sep 17 00:00:00 2001 +From 6c711ea6fdc11f7dd4e01f77f59b5448a930588e Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 21 Feb 2024 16:19:47 -0500 -Subject: [PATCH 47/50] Include vendor.samsung.hardware.radio-V2.2-java HIDL in +Subject: [PATCH 47/51] Include vendor.samsung.hardware.radio-V2.2-java HIDL in base libs, will be used by f/o/telephony --- @@ -9,10 +9,10 @@ Subject: [PATCH 47/50] Include vendor.samsung.hardware.radio-V2.2-java HIDL in 1 file changed, 1 insertion(+) diff --git a/Android.bp b/Android.bp -index e1c218caaf88..63413e5618d3 100644 +index ca9c8a600028..b8a44b325130 100644 --- a/Android.bp +++ b/Android.bp -@@ -227,6 +227,7 @@ java_library { +@@ -235,6 +235,7 @@ java_library { "android.hardware.gnss-V2.1-java", "android.hardware.health-V1.0-java-constants", "android.hardware.radio-V1.6-java", diff --git a/patches_treble_td/platform_frameworks_base/0048-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch b/patches_treble_td/platform_frameworks_base/0048-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch index b504595..69372be 100644 --- a/patches_treble_td/platform_frameworks_base/0048-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch +++ b/patches_treble_td/platform_frameworks_base/0048-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch @@ -1,7 +1,7 @@ -From e14be2031caccce4e8d420f6352d374b0b47d7b1 Mon Sep 17 00:00:00 2001 +From e78c740845b99ec7adaf327ce28875e3e7fb8b06 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Sun, 31 Mar 2024 23:38:19 +0000 -Subject: [PATCH 48/50] Revert "Remove deprecated IRadio <1.4 APIs and +Subject: [PATCH 48/51] Revert "Remove deprecated IRadio <1.4 APIs and references" This reverts commit 4d53aa0caec7029bf6c9b5789c1708bc4bb71b76. @@ -12,11 +12,11 @@ This reverts commit 4d53aa0caec7029bf6c9b5789c1708bc4bb71b76. 3 files changed, 39 insertions(+) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java -index bd5255d4a21a..859326ee0ca4 100644 +index 0c9601ad7b30..4ac056a15f1e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java -@@ -11472,6 +11472,29 @@ public class TelephonyManager { - return false; +@@ -11488,6 +11488,29 @@ public class TelephonyManager { + return result; } + /** @@ -43,10 +43,10 @@ index bd5255d4a21a..859326ee0ca4 100644 + } + /** - * @deprecated Use {@link android.telephony.ims.ImsMmTelManager#setVtSettingEnabled(boolean)} - * instead. + * Shut down all the live radios over all the slot indexes. + * diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl -index 397fb2d6db96..192ead0fb163 100644 +index ff2ee27abc60..d7ca28c447a6 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -1194,6 +1194,17 @@ interface ITelephony { @@ -68,7 +68,7 @@ index 397fb2d6db96..192ead0fb163 100644 * Check if any mobile Radios need to be shutdown. * diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java -index 50590177f791..69ea593a3a00 100644 +index b7dd4df1c843..5f5e21916bd0 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -298,6 +298,11 @@ public interface RILConstants { diff --git a/patches_treble_td/platform_frameworks_base/0049-Don-t-crash-system_server-if-we-fail-to-parse-dynami.patch b/patches_treble_td/platform_frameworks_base/0049-Don-t-crash-system_server-if-we-fail-to-parse-dynami.patch index 2333ccd..f3230e1 100644 --- a/patches_treble_td/platform_frameworks_base/0049-Don-t-crash-system_server-if-we-fail-to-parse-dynami.patch +++ b/patches_treble_td/platform_frameworks_base/0049-Don-t-crash-system_server-if-we-fail-to-parse-dynami.patch @@ -1,41 +1,42 @@ -From 08d6872962f964e285c631af4d28db9262eee00f Mon Sep 17 00:00:00 2001 +From 329b060dc0633e28c2da11e17dd0578f7409fa59 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 17 Apr 2024 04:49:18 -0400 -Subject: [PATCH 49/50] Don't crash system_server if we fail to parse dynamic +Subject: [PATCH 49/51] Don't crash system_server if we fail to parse dynamic udfps position +Change-Id: I2168fd08f0632c58b1c35d25cfd52071f779aa20 --- .../fingerprint/aidl/FingerprintProvider.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java -index 2bb568bedabc..73b502dca8c1 100644 +index 2f113a08eae2..556ca0004079 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java -@@ -216,13 +216,17 @@ android.util.Log.e("PHH-Enroll", "Poping AIDL fp provider"); - android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); - } - if (locations.length == 1 && locations[0].sensorLocationX == 0) { -- int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(context); -- if (otherValues.length > 0) { -- SensorLocation loc = new SensorLocation(); -- loc.sensorLocationX = otherValues[0]; -- loc.sensorLocationY = otherValues[1]; -- loc.sensorRadius = otherValues[2]; -- locations[0] = loc; -+ try { -+ int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(context); -+ if (otherValues.length > 0) { -+ SensorLocation loc = new SensorLocation(); -+ loc.sensorLocationX = otherValues[0]; -+ loc.sensorLocationY = otherValues[1]; -+ loc.sensorRadius = otherValues[2]; -+ locations[0] = loc; -+ } -+ } catch(Throwable t) { -+ android.util.Log.e("PHH-Enroll", "FingerprintProvider dynamicUdfpsProps", t); +@@ -261,13 +261,17 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi + android.util.Log.e("PHH-Enroll", " - " + loc.sensorLocationX + ", " + loc.sensorLocationY + ", " +loc.sensorRadius + ", disp =" + loc.display + ", shape " + loc.sensorShape); + } + if (locations.length == 1 && locations[0].sensorLocationX == 0) { +- int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(context); +- if (otherValues.length > 0) { +- SensorLocation loc = new SensorLocation(); +- loc.sensorLocationX = otherValues[0]; +- loc.sensorLocationY = otherValues[1]; +- loc.sensorRadius = otherValues[2]; +- locations[0] = loc; ++ try { ++ int[] otherValues = com.android.server.biometrics.AuthService.dynamicUdfpsProps(mContext); ++ if (otherValues.length > 0) { ++ SensorLocation loc = new SensorLocation(); ++ loc.sensorLocationX = otherValues[0]; ++ loc.sensorLocationY = otherValues[1]; ++ loc.sensorRadius = otherValues[2]; ++ locations[0] = loc; ++ } ++ } catch(Throwable t) { ++ android.util.Log.e("PHH-Enroll", "FingerprintProvider dynamicUdfpsProps", t); + } } - } -- 2.34.1 diff --git a/patches_treble_td/platform_frameworks_base/0050-Add-a-prop-to-disable-animation-in-for-sysui-media-c.patch b/patches_treble_td/platform_frameworks_base/0050-Add-a-prop-to-disable-animation-in-for-sysui-media-c.patch index a45c62a..a9701e6 100644 --- a/patches_treble_td/platform_frameworks_base/0050-Add-a-prop-to-disable-animation-in-for-sysui-media-c.patch +++ b/patches_treble_td/platform_frameworks_base/0050-Add-a-prop-to-disable-animation-in-for-sysui-media-c.patch @@ -1,26 +1,26 @@ -From 6923bfc96d529de7620b0652adeadac4f4612710 Mon Sep 17 00:00:00 2001 +From c0fe31ff8a4ebc3372d0e50eb082991ec32da9d7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 8 May 2024 11:55:07 -0400 -Subject: [PATCH 50/50] Add a prop to disable animation in for sysui media +Subject: [PATCH 50/51] Add a prop to disable animation in for sysui media carousel --- - .../systemui/media/controls/ui/MediaCarouselController.kt | 3 ++- + .../media/controls/ui/controller/MediaCarouselController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaCarouselController.kt -index 992eeca77e54..f8fed58d2553 100644 ---- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaCarouselController.kt -+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaCarouselController.kt +diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt +index b721236eab01..8da1ddc2010f 100644 +--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt ++++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt @@ -22,6 +22,7 @@ import android.content.Intent import android.content.res.ColorStateList import android.content.res.Configuration import android.database.ContentObserver -+import android.os.SystemProperties; ++import android.os.SystemProperties import android.provider.Settings import android.provider.Settings.ACTION_MEDIA_CONTROLS_SETTINGS import android.util.Log -@@ -1047,7 +1048,7 @@ constructor( +@@ -1050,7 +1051,7 @@ constructor( desiredHostState.showsOnlyActiveMedia for (mediaPlayer in MediaPlayerData.players()) { diff --git a/patches_treble_td/platform_frameworks_base/0051-Allow-APKs-of-a-certain-signature-to-install-work-li.patch b/patches_treble_td/platform_frameworks_base/0051-Allow-APKs-of-a-certain-signature-to-install-work-li.patch new file mode 100644 index 0000000..a1b93aa --- /dev/null +++ b/patches_treble_td/platform_frameworks_base/0051-Allow-APKs-of-a-certain-signature-to-install-work-li.patch @@ -0,0 +1,93 @@ +From 92baead82c113777ad33ff0069ad54094b1595ca Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 7 Jul 2024 21:55:42 +0800 +Subject: [PATCH 51/51] Allow APKs of a certain signature to install/work like + platform-signed + +Intended usecase - one authoritative set of signed IMS APKs for any GSI, regardless of their signature + +Change-Id: Ia1a13edec8eb8ecf0ea25fffaee4aeff9c75a5e1 +--- + .../android/server/pm/PackageManagerServiceUtils.java | 11 +++++++++++ + .../core/java/com/android/server/pm/SELinuxMMAC.java | 5 +++++ + .../java/com/android/server/pm/ScanPackageUtils.java | 5 ++++- + 3 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +index d7e0fca87059..675be60ea412 100644 +--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java ++++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +@@ -221,6 +221,8 @@ public class PackageManagerServiceUtils { + */ + private static final boolean FORCE_PACKAGE_PARSED_CACHE_ENABLED = false; + ++ private static final Signature PHH_SIGNATURE = new Signature("308205fb308203e3a00302010202144cd9cede3ae98180d0c500b979c371be9189d42d300d06092a864886f70d01010b050030818b310b3009060355040613024652310f300d06035504080c064672616e6365310e300c06035504070c05506172697331143012060355040a0c0b547265626c6544726f696431143012060355040b0c0b547265626c6544726f69643114301206035504030c0b547265626c6544726f69643119301706092a864886f70d010901160a706868407068682e6d653020170d3234303731333136313435375a180f32303531313132393136313435375a30818b310b3009060355040613024652310f300d06035504080c064672616e6365310e300c06035504070c05506172697331143012060355040a0c0b547265626c6544726f696431143012060355040b0c0b547265626c6544726f69643114301206035504030c0b547265626c6544726f69643119301706092a864886f70d010901160a706868407068682e6d6530820222300d06092a864886f70d01010105000382020f003082020a0282020100ea313fa144409b3f52c489fb1401f98c0e2c1f66933c67e4f4b3ec1757b33b72d996de4f60fb6316aaab04b1c973e27833f8dca1bd109cb74525c48fda9a2d0f3fe2ff943e69042290f41f36c996b3c3c327a9cc6398ec3b4da7bd4a281005d10b6d022f4d871c113051b685d9e2059b68ffb00c174c2516cfa3c64d3d1e51f7f100fde5bf4a7af00f2c8bbb258f066fa1c4a077ee32ba1a3f56edec8f1e05b609aadb6dbe63487275812b8447881ada997d1ddf278008246565e97f1665943b6cbc6f4fe2f2982894d3b2dfec0eb5bc2f91e6d6d7497aef732b90c82531d7065bbacf234a73d53111cb8f2d117c67c9e873c326117410b9ea7a18d12811db8e2d0b183c37b53b5a4d066b7b5e2a6741748c7082f7fb0d7d8b21ad0c93ded88c71844f54fd25255f9a6eb7a7910475a1a2264110f5e0f267df671ea42d76a3381a632dde6c7f63f5e15d8d573b7f926e3106ead126d1ef0c0b22d909a6bfd6f3c444803d782a9aec3e4695016b055e180ccc1b7c24b532c226839d1ad1a5d7fe51f6e9e43460b8d706ca3d484b5994fb68fe212dbc2662935d0effb52ff018a9c760086b5ad5b7cd6549543677742cbf2f6bf409b2f70abb0ec6e042d30768eac5b61e1038f8b9c8dd4e801357cc7bfa2bfaebcbe59dc27331b5f388642d829a20893be0384bedab4287b881ef7a9a27765ba6910036a70128d8606f194acf070203010001a3533051301d0603551d0e04160414124752cf65d60fd9a632855450ae4124ebe78e3c301f0603551d23041830168014124752cf65d60fd9a632855450ae4124ebe78e3c300f0603551d130101ff040530030101ff300d06092a864886f70d01010b0500038202010045d310fab3cf34fda5c59a651853fe47ba759195db454b18727692fd54613fef6401ed31aff26a2579362fd6c0ae563b3c32472bafb919eb3e0a1173b0a3a9b0c475bf10db328d157eead62af2615b2b5bfa84cf51a3af38222ba737e5e47c5cdad3d2c8505796fa8b205e5fe39f2ff2516c961972c279c9197e913c2e6cc5951fe69bd8cbc09a9ee1664ce7a784b17ce721b8b61fa7a79c7919bed3de48b386eec4b5a1dd0bc4cde32ada097c2cb0fe13fc772d38740235866b0b304e79071a292ba77a8fb5532545df2452a11d53e7365851a515a9640c691d6d2570fee2d9b97cb1d52213411b3a29a16a5eb789000e2e2e2a4a33d38fc93d32c2511c57e6c420c29b5d1346904d9346537290bbefd7566c2ff3245db663ab5e21e721cbac1adada3e84defbc9758dbd1340cbd9b2a8e98542057eb517938462a5401825e31d640d57f881305d8474a9372db8459293fc9a2ccace877517bbedb759eb6eea45b5fcd5ea149d531ddf6a1ccf5f7dbe4d139a308af94049f717c09ff022a5ba0a2fbd35c4ce18671dfce2eccf292ac48b073d8e85a158ceac6f9253a1e6607b743fc2f557f55a1366716eda5653e9cb272e611c77e7949310ca3f294f1689efdfde087512a53bdf460029b9f0adb8fb7fada5e1443bdfdc8c8c29914b7856aa995c8cbf1866ac7d6c65e2d4c7c6738d7a8cb56d7ba9230ba9bc056d02e48f41"); ++ + /** + * Returns the registered PackageManagerLocal instance, or else throws an unchecked error. + */ +@@ -306,6 +308,11 @@ public class PackageManagerServiceUtils { + return maxModifiedTime; + } + ++ protected static boolean doesSignatureMatchPHH(SigningDetails signingDetails) { ++ return signingDetails.getSignatures() != null ++ && Signature.areExactMatch(signingDetails, new Signature[]{PHH_SIGNATURE}); ++ } ++ + private static File getSettingsProblemFile() { + File dataDir = Environment.getDataDirectory(); + File systemDir = new File(dataDir, "system"); +@@ -579,6 +586,10 @@ public class PackageManagerServiceUtils { + boolean compareCompat, boolean compareRecover, boolean isRollback) + throws PackageManagerException { + final String packageName = pkgSetting.getPackageName(); ++ if (doesSignatureMatchPHH(parsedSignatures)) { ++ Slog.w(TAG, "Package " + packageName + " has PHH signature, skipping subsequent checks"); ++ return false; ++ } + boolean compatMatch = false; + if (pkgSetting.getSigningDetails().getSignatures() != null) { + // For an already existing package, make sure the parsed signatures from the package +diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java +index e667bfe36d18..e08a6ba24807 100644 +--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java ++++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java +@@ -448,6 +448,11 @@ public final class SELinuxMMAC { + } + } + ++ if (pkg.getSigningDetails() != SigningDetails.UNKNOWN && ++ PackageManagerServiceUtils.doesSignatureMatchPHH(pkg.getSigningDetails())) { ++ seInfo = "platform"; ++ } ++ + if (seInfo == null) { + seInfo = DEFAULT_SEINFO; + } +diff --git a/services/core/java/com/android/server/pm/ScanPackageUtils.java b/services/core/java/com/android/server/pm/ScanPackageUtils.java +index 2e67b2f41520..20a614235e6e 100644 +--- a/services/core/java/com/android/server/pm/ScanPackageUtils.java ++++ b/services/core/java/com/android/server/pm/ScanPackageUtils.java +@@ -47,6 +47,7 @@ import static com.android.server.pm.PackageManagerService.TAG; + import static com.android.server.pm.PackageManagerServiceUtils.compareSignatures; + import static com.android.server.pm.PackageManagerServiceUtils.compressedFileExists; + import static com.android.server.pm.PackageManagerServiceUtils.deriveAbiOverride; ++import static com.android.server.pm.PackageManagerServiceUtils.doesSignatureMatchPHH; + import static com.android.server.pm.PackageManagerServiceUtils.getLastModifiedTime; + + import android.annotation.NonNull; +@@ -918,7 +919,9 @@ final class ScanPackageUtils { + || (platformPkg != null && compareSignatures( + platformPkg.getSigningDetails(), + parsedPackage.getSigningDetails() +- ) == PackageManager.SIGNATURE_MATCH)) ++ ) == PackageManager.SIGNATURE_MATCH) ++ || doesSignatureMatchPHH( ++ parsedPackage.getSigningDetails())) + ); + + if (!isSystemApp) { +-- +2.34.1 + diff --git a/patches_treble_td/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch b/patches_treble_td/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch index 2403161..0af56ab 100644 --- a/patches_treble_td/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch +++ b/patches_treble_td/platform_frameworks_native/0001-On-Samsung-we-need-to-send-a-hack-message-to-HAL-to-.patch @@ -1,7 +1,7 @@ -From 973eeeb60ccce408e525055c88e079984dcd1356 Mon Sep 17 00:00:00 2001 +From df3ccdbd5bba67105536281c7be4ba375329ef40 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 14 Aug 2019 23:37:10 +0200 -Subject: [PATCH 01/12] On Samsung, we need to send a hack-message to HAL to +Subject: [PATCH 01/13] On Samsung, we need to send a hack-message to HAL to get all Sensors Change-Id: Id6a1fa48340de61c418493668e9abd22c2599376 @@ -10,18 +10,18 @@ Change-Id: Id6a1fa48340de61c418493668e9abd22c2599376 1 file changed, 3 insertions(+) diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp -index dd83fdefc3..1996b306a4 100644 +index f62562ce9d..be7d33ba62 100644 --- a/services/sensorservice/SensorDevice.cpp +++ b/services/sensorservice/SensorDevice.cpp @@ -40,6 +40,7 @@ - #include - #include + #include "android/hardware/sensors/2.1/types.h" + #include "convertV2_1.h" +#include using namespace android::hardware::sensors; using android::util::ProtoOutputStream; - -@@ -78,6 +79,8 @@ SensorDevice::SensorDevice() : mInHalBypassMode(false) { + namespace sensorservice_flags = com::android::frameworks::sensorservice::flags; +@@ -79,6 +80,8 @@ SensorDevice::SensorDevice() : mInHalBypassMode(false) { } void SensorDevice::initializeSensorList() { diff --git a/patches_treble_td/platform_frameworks_native/0002-Matching-an-input-with-a-display-uses-uniqueId.patch b/patches_treble_td/platform_frameworks_native/0002-Matching-an-input-with-a-display-uses-uniqueId.patch index 903a54d..17e6feb 100644 --- a/patches_treble_td/platform_frameworks_native/0002-Matching-an-input-with-a-display-uses-uniqueId.patch +++ b/patches_treble_td/platform_frameworks_native/0002-Matching-an-input-with-a-display-uses-uniqueId.patch @@ -1,7 +1,7 @@ -From 4cc0d0871d389cd823d22bf04ae6f3cf3f3ec514 Mon Sep 17 00:00:00 2001 +From a4588f6d82cdfce0caa5544e6ab9dc74df039087 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 22 Oct 2020 23:22:46 +0200 -Subject: [PATCH 02/12] Matching an input with a display uses uniqueId +Subject: [PATCH 02/13] Matching an input with a display uses uniqueId Not all devices have a `location`, notably bluetooth devices. However, we might still want to associate them with a screen, @@ -15,10 +15,10 @@ Change-Id: Ifcbc8329d54386f58e013270d9888316c0f516b6 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/inputflinger/reader/InputDevice.cpp b/services/inputflinger/reader/InputDevice.cpp -index fb32f96482..23c0123ab0 100644 +index 4d8ffb68bb..1d041e1498 100644 --- a/services/inputflinger/reader/InputDevice.cpp +++ b/services/inputflinger/reader/InputDevice.cpp -@@ -269,7 +269,10 @@ std::list InputDevice::configureInternal(nsecs_t when, +@@ -272,7 +272,10 @@ std::list InputDevice::configureInternal(nsecs_t when, mAssociatedDisplayUniqueId = std::nullopt; mAssociatedViewport = std::nullopt; // Find the display port that corresponds to the current input port. diff --git a/patches_treble_td/platform_frameworks_native/0003-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch b/patches_treble_td/platform_frameworks_native/0003-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch index 2112721..641e715 100644 --- a/patches_treble_td/platform_frameworks_native/0003-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch +++ b/patches_treble_td/platform_frameworks_native/0003-unshared_oob-didn-t-exist-in-O-P-so-detect-its-suppo.patch @@ -1,7 +1,7 @@ -From 4ec36ad5c8b19969da7c48101c619132ec2356bd Mon Sep 17 00:00:00 2001 +From a36d0f7b1b9dc341b10c47c43dff42d932684703 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 5 Jan 2021 23:44:00 +0100 -Subject: [PATCH 03/12] unshared_oob didn't exist in O/P, so detect its +Subject: [PATCH 03/13] unshared_oob didn't exist in O/P, so detect its supported based on vndk version --- diff --git a/patches_treble_td/platform_frameworks_native/0004-Remove-Samsung-system-permission-on-sensors.patch b/patches_treble_td/platform_frameworks_native/0004-Remove-Samsung-system-permission-on-sensors.patch index 5a2d20e..642f593 100644 --- a/patches_treble_td/platform_frameworks_native/0004-Remove-Samsung-system-permission-on-sensors.patch +++ b/patches_treble_td/platform_frameworks_native/0004-Remove-Samsung-system-permission-on-sensors.patch @@ -1,7 +1,7 @@ -From d5c6be141d42f5cb4742ab45e748dc9e430ddc03 Mon Sep 17 00:00:00 2001 +From a44f9348ba6db34781bf5c5463bc4a4a7406d0b4 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 31 Mar 2021 23:36:03 +0200 -Subject: [PATCH 04/12] Remove Samsung system permission on sensors +Subject: [PATCH 04/13] Remove Samsung system permission on sensors --- libs/sensor/Sensor.cpp | 1 + diff --git a/patches_treble_td/platform_frameworks_native/0005-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch b/patches_treble_td/platform_frameworks_native/0005-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch index 29a7451..5ca1b6e 100644 --- a/patches_treble_td/platform_frameworks_native/0005-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch +++ b/patches_treble_td/platform_frameworks_native/0005-Mark-accelerometer-input-as-sensor-exclusively-if-th.patch @@ -1,7 +1,7 @@ -From 2659dfeef5200660db8d349fd80aab4d614e3d78 Mon Sep 17 00:00:00 2001 +From 5bb33677124b9403f3002342f1bca42b2f2f9266 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 12 Dec 2021 08:45:36 -0500 -Subject: [PATCH 05/12] Mark accelerometer input as sensor exclusively if there +Subject: [PATCH 05/13] Mark accelerometer input as sensor exclusively if there are ABS axis The reason this is needed is that on -fucked up- Xiami Mi A2 Lite and @@ -15,10 +15,10 @@ Change-Id: I491ab89724c908ef09a23a6427d24a8889bf806a 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/inputflinger/reader/EventHub.cpp b/services/inputflinger/reader/EventHub.cpp -index f7bbc511f9..ad2394d791 100644 +index 3ca691efba..a2b5d7d8b0 100644 --- a/services/inputflinger/reader/EventHub.cpp +++ b/services/inputflinger/reader/EventHub.cpp -@@ -2409,7 +2409,13 @@ void EventHub::openDeviceLocked(const std::string& devicePath) { +@@ -2431,7 +2431,13 @@ void EventHub::openDeviceLocked(const std::string& devicePath) { // Check whether this device is an accelerometer. if (device->propBitmask.test(INPUT_PROP_ACCELEROMETER)) { diff --git a/patches_treble_td/platform_frameworks_native/0006-MIUI13-devices-hide-their-vibrator-HAL-behind-non-de.patch b/patches_treble_td/platform_frameworks_native/0006-MIUI13-devices-hide-their-vibrator-HAL-behind-non-de.patch index ba209bb..4497d8a 100644 --- a/patches_treble_td/platform_frameworks_native/0006-MIUI13-devices-hide-their-vibrator-HAL-behind-non-de.patch +++ b/patches_treble_td/platform_frameworks_native/0006-MIUI13-devices-hide-their-vibrator-HAL-behind-non-de.patch @@ -1,7 +1,7 @@ -From ff5ba8c1185122fd748f875d2457a3ea1facdb72 Mon Sep 17 00:00:00 2001 +From 0d55f5113d95dcbc02676ec1e6e642f2a8241f3d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 25 Mar 2022 05:37:56 -0400 -Subject: [PATCH 06/12] MIUI13 devices hide their vibrator HAL behind +Subject: [PATCH 06/13] MIUI13 devices hide their vibrator HAL behind non-default name: "vibratorfeature" --- diff --git a/patches_treble_td/platform_frameworks_native/0007-powermanager-Add-support-Samsung-miscpower-HAL.patch b/patches_treble_td/platform_frameworks_native/0007-powermanager-Add-support-Samsung-miscpower-HAL.patch index 0fc5202..cd0850a 100644 --- a/patches_treble_td/platform_frameworks_native/0007-powermanager-Add-support-Samsung-miscpower-HAL.patch +++ b/patches_treble_td/platform_frameworks_native/0007-powermanager-Add-support-Samsung-miscpower-HAL.patch @@ -1,7 +1,7 @@ -From 754326bcb221b75d944997c3d8aefc42c1a992d1 Mon Sep 17 00:00:00 2001 +From 564728e2daa306134f8b9855bae53a86197699ab Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 27 Dec 2021 18:00:43 -0500 -Subject: [PATCH 07/12] powermanager: Add support Samsung miscpower HAL +Subject: [PATCH 07/13] powermanager: Add support Samsung miscpower HAL Several various configurations need to be supported: - Android Pie vendors have a android.hardware.power HIDL default + "miscpower" @@ -55,20 +55,20 @@ index cbbfa597ba..c27a833a07 100644 static sp loadHidlV1_0Locked() EXCLUSIVE_LOCKS_REQUIRED(gHalMutex); diff --git a/include/powermanager/PowerHalWrapper.h b/include/powermanager/PowerHalWrapper.h -index 4e4a1b000d..0411f9f8cf 100644 +index e2da014606..66bb910ec2 100644 --- a/include/powermanager/PowerHalWrapper.h +++ b/include/powermanager/PowerHalWrapper.h -@@ -26,6 +26,7 @@ +@@ -27,6 +27,7 @@ #include #include #include +#include - namespace android { + #include -@@ -240,8 +241,10 @@ protected: +@@ -278,8 +279,10 @@ protected: // Wrapper for the AIDL Power HAL. - class AidlHalWrapper : public HalWrapper { + class AidlHalWrapper : public EmptyHalWrapper { public: - explicit AidlHalWrapper(std::shared_ptr handle) - : mHandle(std::move(handle)) {} @@ -79,7 +79,7 @@ index 4e4a1b000d..0411f9f8cf 100644 ~AidlHalWrapper() override = default; HalResult setBoost(aidl::android::hardware::power::Boost boost, -@@ -257,6 +260,7 @@ private: +@@ -307,6 +310,7 @@ private: std::mutex mBoostMutex; std::mutex mModeMutex; std::shared_ptr mHandle; @@ -87,11 +87,11 @@ index 4e4a1b000d..0411f9f8cf 100644 // Android framework only sends boost upto DISPLAY_UPDATE_IMMINENT. // Need to increase the array size if more boost supported. std::array< -@@ -271,6 +275,34 @@ private: +@@ -321,6 +325,34 @@ private: mModeSupportedArray GUARDED_BY(mModeMutex) = {HalSupport::UNKNOWN}; }; -+class HidlHalWrapperSeh : public HalWrapper { ++class HidlHalWrapperSeh : public EmptyHalWrapper { +public: + explicit HidlHalWrapperSeh(sp hal1, + sp hal2, @@ -143,7 +143,7 @@ index 1f72e8ba2c..d7eea4dfc7 100644 cflags: [ diff --git a/services/powermanager/PowerHalController.cpp b/services/powermanager/PowerHalController.cpp -index 9a23c848c9..4949d49db7 100644 +index bc178bce8f..98dc5adefc 100644 --- a/services/powermanager/PowerHalController.cpp +++ b/services/powermanager/PowerHalController.cpp @@ -20,6 +20,7 @@ @@ -229,10 +229,10 @@ index 22144615da..5823fa697d 100644 // ------------------------------------------------------------------------------------------------- diff --git a/services/powermanager/PowerHalWrapper.cpp b/services/powermanager/PowerHalWrapper.cpp -index 76afbfc646..1d40252d7d 100644 +index 1009100cc2..79605a1309 100644 --- a/services/powermanager/PowerHalWrapper.cpp +++ b/services/powermanager/PowerHalWrapper.cpp -@@ -221,6 +221,10 @@ HalResult AidlHalWrapper::setMode(Aidl::Mode mode, bool enabled) { +@@ -232,6 +232,10 @@ HalResult AidlHalWrapper::setMode(Aidl::Mode mode, bool enabled) { std::unique_lock lock(mModeMutex); size_t idx = static_cast(mode); @@ -242,9 +242,9 @@ index 76afbfc646..1d40252d7d 100644 + // Quick return if mode is not supported by HAL if (idx >= mModeSupportedArray.size() || mModeSupportedArray[idx] == HalSupport::OFF) { - ALOGV("Skipped setMode %s because Power HAL doesn't support it", toString(mode).c_str()); -@@ -260,6 +264,72 @@ HalResult AidlHalWrapper::getHintSessionPreferredRate() { - return HalResult::fromStatus(result, rate); + ALOGV("Skipped setMode %s because %s", toString(mode).c_str(), getUnsupportedMessage()); +@@ -294,6 +298,72 @@ const char* AidlHalWrapper::getUnsupportedMessage() { + return "Power HAL doesn't support it"; } +HalResult HidlHalWrapperSeh::setBoost(Aidl::Boost boost, int32_t durationMs) { @@ -317,10 +317,10 @@ index 76afbfc646..1d40252d7d 100644 } // namespace power diff --git a/services/surfaceflinger/CompositionEngine/Android.bp b/services/surfaceflinger/CompositionEngine/Android.bp -index ae2f2dbbf5..96ae9aa8de 100644 +index 0b01c666a4..4c9220bb28 100644 --- a/services/surfaceflinger/CompositionEngine/Android.bp +++ b/services/surfaceflinger/CompositionEngine/Android.bp -@@ -38,6 +38,7 @@ cc_defaults { +@@ -39,6 +39,7 @@ cc_defaults { "libui", "libutils", "server_configurable_flags", diff --git a/patches_treble_td/platform_frameworks_native/0008-FOD-support-for-Samsung-and-Asus.patch b/patches_treble_td/platform_frameworks_native/0008-FOD-support-for-Samsung-and-Asus.patch index f8964f6..39eee82 100644 --- a/patches_treble_td/platform_frameworks_native/0008-FOD-support-for-Samsung-and-Asus.patch +++ b/patches_treble_td/platform_frameworks_native/0008-FOD-support-for-Samsung-and-Asus.patch @@ -1,7 +1,7 @@ -From 08b5b5e7445ec5ae2e9d5c80f5b150a0a058d07a Mon Sep 17 00:00:00 2001 +From 69fd045a02add4fb326f46b36a8b9f57a721b57c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 18 Dec 2022 18:17:30 -0500 -Subject: [PATCH 08/12] FOD support for Samsung and Asus +Subject: [PATCH 08/13] FOD support for Samsung and Asus --- libs/gui/BLASTBufferQueue.cpp | 20 ++++++++++++++-- @@ -65,7 +65,7 @@ index f317a2eea0..6a55bb3f70 100644 static std::atomic nextId = 0; mProducerId = nextId++; diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp -index 877b46908e..78e71c7ffa 100644 +index 41306b51f6..3badc79606 100644 --- a/libs/ui/Gralloc2.cpp +++ b/libs/ui/Gralloc2.cpp @@ -115,7 +115,6 @@ status_t Gralloc2Mapper::validateBufferDescriptorInfo( @@ -77,7 +77,7 @@ index 877b46908e..78e71c7ffa 100644 // Gralloc2 implementations never understand non-BLOB with GPU_DATA_BUFFER diff --git a/libs/ui/Gralloc3.cpp b/libs/ui/Gralloc3.cpp -index d2b92bb221..eff02330d8 100644 +index e9aa9c8d54..f29ce686c2 100644 --- a/libs/ui/Gralloc3.cpp +++ b/libs/ui/Gralloc3.cpp @@ -106,7 +106,6 @@ status_t Gralloc3Mapper::validateBufferDescriptorInfo( @@ -89,7 +89,7 @@ index d2b92bb221..eff02330d8 100644 // Gralloc3 implementations never understand non-BLOB with GPU_DATA_BUFFER diff --git a/libs/ui/Gralloc4.cpp b/libs/ui/Gralloc4.cpp -index 7e6802d1e0..1ce29dc8e4 100644 +index f1322f1e4c..c3ff48a262 100644 --- a/libs/ui/Gralloc4.cpp +++ b/libs/ui/Gralloc4.cpp @@ -129,7 +129,6 @@ static status_t validateBufferDescriptorInfo(IMapper::BufferDescriptorInfo* desc @@ -101,7 +101,7 @@ index 7e6802d1e0..1ce29dc8e4 100644 // Combinations that are only allowed with gralloc 4.1. diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp -index 7fe3369f88..afd9942d5e 100644 +index 091c207464..60e095c49b 100644 --- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp +++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp @@ -26,6 +26,7 @@ @@ -122,7 +122,7 @@ index 7fe3369f88..afd9942d5e 100644 using aidl::android::hardware::graphics::composer3::Composition; namespace android::compositionengine { -@@ -442,6 +446,26 @@ void OutputLayer::writeOutputDependentGeometryStateToHWC(HWC2::Layer* hwcLayer, +@@ -441,6 +445,26 @@ void OutputLayer::writeOutputDependentGeometryStateToHWC(HWC2::Layer* hwcLayer, ->getHeight())); } @@ -150,10 +150,10 @@ index 7fe3369f88..afd9942d5e 100644 displayFrame.right, displayFrame.bottom); diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp -index 64a8ae7fcd..b7da02cdcc 100644 +index 362ab9c39e..62c2ed8f8d 100644 --- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp +++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp -@@ -1680,5 +1680,13 @@ void AidlComposer::addDisplay(Display display) { +@@ -1686,5 +1686,13 @@ void AidlComposer::addDisplay(Display display) { void AidlComposer::onHotplugConnect(Display display) { addDisplay(display); } @@ -195,10 +195,10 @@ index bc067a0e5d..c0fcff6a7d 100644 } // namespace Hwc2 diff --git a/services/surfaceflinger/DisplayHardware/HWC2.cpp b/services/surfaceflinger/DisplayHardware/HWC2.cpp -index 24a9e22a2b..52777b1e74 100644 +index 84f668d9df..7f867c10c7 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2.cpp +++ b/services/surfaceflinger/DisplayHardware/HWC2.cpp -@@ -1014,6 +1014,14 @@ Error Layer::setBlockingRegion(const Region& region) { +@@ -1030,6 +1030,14 @@ Error Layer::setBlockingRegion(const Region& region) { return static_cast(intError); } @@ -214,10 +214,10 @@ index 24a9e22a2b..52777b1e74 100644 } // namespace HWC2 } // namespace android diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h -index f907061774..04513ae0fe 100644 +index de044e0b76..09454e26e2 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2.h +++ b/services/surfaceflinger/DisplayHardware/HWC2.h -@@ -349,6 +349,9 @@ public: +@@ -353,6 +353,9 @@ public: // AIDL HAL [[nodiscard]] virtual hal::Error setBrightness(float brightness) = 0; [[nodiscard]] virtual hal::Error setBlockingRegion(const android::Region& region) = 0; @@ -227,7 +227,7 @@ index f907061774..04513ae0fe 100644 }; namespace impl { -@@ -400,6 +403,8 @@ public: +@@ -404,6 +407,8 @@ public: hal::Error setBrightness(float brightness) override; hal::Error setBlockingRegion(const android::Region& region) override; @@ -237,10 +237,10 @@ index f907061774..04513ae0fe 100644 // These are references to data owned by HWComposer, which will outlive // this HWC2::Layer, so these references are guaranteed to be valid for diff --git a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp -index c4ff9cc6be..bd158ad5ad 100644 +index 12ab2c284a..d34ed04127 100644 --- a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp +++ b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp -@@ -1434,6 +1434,13 @@ Error HidlComposer::getPhysicalDisplayOrientation(Display, AidlTransform*) { +@@ -1435,6 +1435,13 @@ Error HidlComposer::getPhysicalDisplayOrientation(Display, AidlTransform*) { "OptionalFeature::PhysicalDisplayOrientation is not supported on HIDL"); } diff --git a/patches_treble_td/platform_frameworks_native/0009-Add-MTK-GED-KPI-support-to-fix-broken-Mediatek-gpufr.patch b/patches_treble_td/platform_frameworks_native/0009-Add-MTK-GED-KPI-support-to-fix-broken-Mediatek-gpufr.patch index f162057..c9dd322 100644 --- a/patches_treble_td/platform_frameworks_native/0009-Add-MTK-GED-KPI-support-to-fix-broken-Mediatek-gpufr.patch +++ b/patches_treble_td/platform_frameworks_native/0009-Add-MTK-GED-KPI-support-to-fix-broken-Mediatek-gpufr.patch @@ -1,7 +1,7 @@ -From eb49ecb179bed79bf47cd23c003b89451a75b018 Mon Sep 17 00:00:00 2001 +From ff686d23404fd88ae37148da50a7b1504d9ce7b1 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 25 Nov 2023 08:15:28 -0500 -Subject: [PATCH 09/12] Add MTK GED KPI support to fix broken Mediatek gpufreq +Subject: [PATCH 09/13] Add MTK GED KPI support to fix broken Mediatek gpufreq Mediatek GPU scheduler likes to have the timestamps of the frames to be able to adjust DVFS. @@ -22,7 +22,7 @@ well) 2 files changed, 205 insertions(+) diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp -index 07a0cfed63..1d527c089f 100644 +index 086544e48a..6e73c38a63 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -24,6 +24,9 @@ @@ -131,7 +131,7 @@ index 07a0cfed63..1d527c089f 100644 } Surface::~Surface() { -@@ -647,6 +725,36 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) { +@@ -668,6 +746,36 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) { } } @@ -168,7 +168,7 @@ index 07a0cfed63..1d527c089f 100644 if (fence->isValid()) { *fenceFd = fence->dup(); if (*fenceFd == -1) { -@@ -1090,6 +1198,60 @@ void Surface::onBufferQueuedLocked(int slot, sp fence, +@@ -1111,6 +1219,60 @@ void Surface::onBufferQueuedLocked(int slot, sp fence, } mQueueBufferCondition.broadcast(); @@ -229,7 +229,7 @@ index 07a0cfed63..1d527c089f 100644 if (CC_UNLIKELY(atrace_is_tag_enabled(ATRACE_TAG_GRAPHICS))) { static gui::FenceMonitor gpuCompletionThread("GPU completion"); -@@ -1857,6 +2019,46 @@ int Surface::connect( +@@ -1878,6 +2040,46 @@ int Surface::connect( mConsumerRunningBehind = (output.numPendingBuffers >= 2); } diff --git a/patches_treble_td/platform_frameworks_native/0010-Fix-loading-unnamed-GLES.patch b/patches_treble_td/platform_frameworks_native/0010-Fix-loading-unnamed-GLES.patch index 9c21d12..a831c7d 100644 --- a/patches_treble_td/platform_frameworks_native/0010-Fix-loading-unnamed-GLES.patch +++ b/patches_treble_td/platform_frameworks_native/0010-Fix-loading-unnamed-GLES.patch @@ -1,7 +1,7 @@ -From 2a9428f4a5b5d76294698e523c1887d064b59a85 Mon Sep 17 00:00:00 2001 +From 8b7f5bcb50a9442ff254ef40072aaa5284fbcae2 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 20 Dec 2023 09:48:04 -0500 -Subject: [PATCH 10/12] Fix loading unnamed GLES +Subject: [PATCH 10/13] Fix loading unnamed GLES Normally Android loads libGLES_${ro.hardware.egl}.so But up to Android 14, it was allowed not to set ro.hardware.egl diff --git a/patches_treble_td/platform_frameworks_native/0011-Increase-SW_MAX-4.patch b/patches_treble_td/platform_frameworks_native/0011-Increase-SW_MAX-4.patch index c76a846..4291ba3 100644 --- a/patches_treble_td/platform_frameworks_native/0011-Increase-SW_MAX-4.patch +++ b/patches_treble_td/platform_frameworks_native/0011-Increase-SW_MAX-4.patch @@ -1,7 +1,7 @@ -From 856149e68cafecbe745370a92f7d0421d62957bc Mon Sep 17 00:00:00 2001 +From a67c4b0acf7f15fab1ef00303c6f2c7ea5e7ae89 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 3 Feb 2024 07:38:33 -0500 -Subject: [PATCH 11/12] Increase SW_MAX *= 4 +Subject: [PATCH 11/13] Increase SW_MAX *= 4 We increase the size of SW_MAX for two reasons: 1. SW_MACHINE_COVER which is SW_MAX is ignored, guessing an off by one @@ -14,10 +14,10 @@ We increase the size of SW_MAX for two reasons: 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/inputflinger/reader/EventHub.cpp b/services/inputflinger/reader/EventHub.cpp -index ad2394d791..18742c6b37 100644 +index a2b5d7d8b0..2697ae1d36 100644 --- a/services/inputflinger/reader/EventHub.cpp +++ b/services/inputflinger/reader/EventHub.cpp -@@ -1112,7 +1112,7 @@ int32_t EventHub::getKeyCodeForKeyLocation(int32_t deviceId, int32_t locationKey +@@ -1118,7 +1118,7 @@ int32_t EventHub::getKeyCodeForKeyLocation(int32_t deviceId, int32_t locationKey } int32_t EventHub::getSwitchState(int32_t deviceId, int32_t sw) const { @@ -26,7 +26,7 @@ index ad2394d791..18742c6b37 100644 return AKEY_STATE_UNKNOWN; } std::scoped_lock _l(mLock); -@@ -2419,7 +2419,7 @@ void EventHub::openDeviceLocked(const std::string& devicePath) { +@@ -2441,7 +2441,7 @@ void EventHub::openDeviceLocked(const std::string& devicePath) { } // Check whether this device has switches. @@ -36,10 +36,10 @@ index ad2394d791..18742c6b37 100644 device->classes |= InputDeviceClass::SWITCH; break; diff --git a/services/inputflinger/reader/include/EventHub.h b/services/inputflinger/reader/include/EventHub.h -index 0bcab42417..5659ffb006 100644 +index a7e06756d0..f33ee5aa96 100644 --- a/services/inputflinger/reader/include/EventHub.h +++ b/services/inputflinger/reader/include/EventHub.h -@@ -629,8 +629,8 @@ private: +@@ -635,8 +635,8 @@ private: BitArray keyBitmask; BitArray keyState; BitArray relBitmask; diff --git a/patches_treble_td/platform_frameworks_native/0012-Disable-gpuservice-on-old-BPF-less-kernel.patch b/patches_treble_td/platform_frameworks_native/0012-Disable-gpuservice-on-old-BPF-less-kernel.patch index 24d6fe2..e701ce5 100644 --- a/patches_treble_td/platform_frameworks_native/0012-Disable-gpuservice-on-old-BPF-less-kernel.patch +++ b/patches_treble_td/platform_frameworks_native/0012-Disable-gpuservice-on-old-BPF-less-kernel.patch @@ -1,7 +1,7 @@ -From 947438c1004fc9a82a265f52f520820f84675610 Mon Sep 17 00:00:00 2001 +From c3de268864c2633395936b6e8815591e9d570f10 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 7 May 2024 22:34:40 +0000 -Subject: [PATCH 12/12] Disable gpuservice on old BPF-less kernel +Subject: [PATCH 12/13] Disable gpuservice on old BPF-less kernel Change-Id: I8e1626e2e9d12ee0dc03d758799bc88085899476 --- diff --git a/patches_treble_td/platform_frameworks_native/0013-SurfaceFlinger-Disable-SF-HWC-backpressure.patch b/patches_treble_td/platform_frameworks_native/0013-SurfaceFlinger-Disable-SF-HWC-backpressure.patch new file mode 100644 index 0000000..6c14957 --- /dev/null +++ b/patches_treble_td/platform_frameworks_native/0013-SurfaceFlinger-Disable-SF-HWC-backpressure.patch @@ -0,0 +1,26 @@ +From f46d54958764bc0ddef9f441de062c7680cdbc81 Mon Sep 17 00:00:00 2001 +From: Andy CrossGate Yan +Date: Sun, 26 May 2024 21:34:17 +0800 +Subject: [PATCH 13/13] SurfaceFlinger: Disable SF HWC backpressure + +--- + services/surfaceflinger/SurfaceFlinger.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp +index 95829c7bd6..ae149b3ab7 100644 +--- a/services/surfaceflinger/SurfaceFlinger.cpp ++++ b/services/surfaceflinger/SurfaceFlinger.cpp +@@ -2557,7 +2557,8 @@ bool SurfaceFlinger::commit(PhysicalDisplayId pacesetterId, + } + } + +- if (pacesetterFrameTarget.isFramePending()) { ++ if (base::GetBoolProperty("persist.sys.phh.enable_sf_hwc_backpressure"s, true) ++ && pacesetterFrameTarget.isFramePending()) { + if (mBackpressureGpuComposition || pacesetterFrameTarget.didMissHwcFrame()) { + if (FlagManager::getInstance().vrr_config()) { + mScheduler->getVsyncSchedule()->getTracker().onFrameMissed( +-- +2.34.1 + diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0001-SubscriptionController-Do-not-override-default-calli.patch b/patches_treble_td/platform_frameworks_opt_telephony/0001-SubscriptionController-Do-not-override-default-calli.patch index 6a3af13..11512dc 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0001-SubscriptionController-Do-not-override-default-calli.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0001-SubscriptionController-Do-not-override-default-calli.patch @@ -1,4 +1,4 @@ -From 162ec8917b7ae8fdb3fcb3f679c45d2276e19926 Mon Sep 17 00:00:00 2001 +From 0347f653b575d27081ddf4b46529997a64c2611b Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Mon, 5 Sep 2022 14:02:37 -0400 Subject: [PATCH 01/14] SubscriptionController: Do not override default calling @@ -18,10 +18,10 @@ Change-Id: Iccab64e9b3b3ab4773bd8944d47c2006f229d472 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java -index a8d05a334b..42310ccc3f 100644 +index 8757c9791a..489c0b36fc 100644 --- a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +++ b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java -@@ -81,6 +81,7 @@ import android.util.Base64; +@@ -85,6 +85,7 @@ import android.util.Base64; import android.util.EventLog; import android.util.IndentingPrintWriter; import android.util.LocalLog; @@ -29,7 +29,7 @@ index a8d05a334b..42310ccc3f 100644 import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; -@@ -3023,7 +3024,22 @@ public class SubscriptionManagerService extends ISub.Stub { +@@ -3153,7 +3154,22 @@ public class SubscriptionManagerService extends ISub.Stub { TelecomManager telecomManager = mContext.getSystemService(TelecomManager.class); if (telecomManager != null) { diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch b/patches_treble_td/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch index 6233e00..bc6c0a7 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0002-Telephony-Don-not-call-onUssdRelease-for-Huawei-RIL.patch @@ -1,4 +1,4 @@ -From 6f08bcbf526eb4a97d88f71e06945d9a9c10f23f Mon Sep 17 00:00:00 2001 +From 102c33d28f703e9849315875ea95e85399ae5e34 Mon Sep 17 00:00:00 2001 From: Artem Borisov Date: Sat, 10 Nov 2018 17:19:17 +0000 Subject: [PATCH 02/14] Telephony: Don not call onUssdRelease for Huawei RIL @@ -13,10 +13,10 @@ Change-Id: I69faed1c51d4582834879975d6ab13daf7f48ad4 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -index 620b8711e2..acd0196dd1 100644 +index 4c7a3d3ffa..42d5d0fdcf 100644 --- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java +++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -@@ -3072,7 +3072,11 @@ public class GsmCdmaPhone extends Phone { +@@ -3128,7 +3128,11 @@ public class GsmCdmaPhone extends Phone { if (found != null) { // Complete pending USSD if (isUssdRelease) { diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch b/patches_treble_td/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch index a7153fd..a18a895 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0003-Fix-baseband-being-too-long-to-fit-into-a-91-chars-p.patch @@ -1,4 +1,4 @@ -From 817f2b9f355041ea5b7e47315acc878d96e1b91b Mon Sep 17 00:00:00 2001 +From e66243672c800dbc7aff530353040d38e4da8f61 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 6 Dec 2021 16:28:22 -0500 Subject: [PATCH 03/14] Fix baseband being too long to fit into a 91 chars @@ -10,10 +10,10 @@ Change-Id: I1762e4a8cc137626be89f350229d6be162bdaf57 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -index acd0196dd1..cf81125aab 100644 +index 42d5d0fdcf..79a23ec160 100644 --- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java +++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -@@ -3377,7 +3377,7 @@ public class GsmCdmaPhone extends Phone { +@@ -3438,7 +3438,7 @@ public class GsmCdmaPhone extends Phone { String version = (String)ar.result; if (version != null) { int length = version.length(); diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch b/patches_treble_td/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch index 9f083f7..24b5704 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch @@ -1,4 +1,4 @@ -From 60f5230e5197fd4cfdf4e547e1073e0cbc8691e3 Mon Sep 17 00:00:00 2001 +From 20afc68fee873214a63b46521c921024ae968258 Mon Sep 17 00:00:00 2001 From: ironydelerium <42721860+ironydelerium@users.noreply.github.com> Date: Fri, 31 Dec 2021 02:20:28 -0800 Subject: [PATCH 04/14] Reintroduce 'public void diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0005-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch b/patches_treble_td/platform_frameworks_opt_telephony/0005-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch index 341117b..cd52e9b 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0005-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0005-Revert-Remove-deprecated-IRadio-1.4-APIs-and-referen.patch @@ -1,4 +1,4 @@ -From 4b3fccc0cb2b352eed969c9fee0e21ae161f8ad8 Mon Sep 17 00:00:00 2001 +From f2c21a73155ff46c56ac1e4aab07be59eec534a2 Mon Sep 17 00:00:00 2001 From: Daniel Zhang Date: Sat, 30 Mar 2024 14:05:14 -0400 Subject: [PATCH 05/14] Revert "Remove deprecated IRadio <1.4 APIs and @@ -25,7 +25,7 @@ Change-Id: I6802400fb4ffcf0181441662c267f9eabc4e5cf7 14 files changed, 740 insertions(+), 58 deletions(-) diff --git a/src/java/com/android/internal/telephony/BaseCommands.java b/src/java/com/android/internal/telephony/BaseCommands.java -index b33b732fbd..ce462231f9 100644 +index 6f66545e1a..54066553a1 100644 --- a/src/java/com/android/internal/telephony/BaseCommands.java +++ b/src/java/com/android/internal/telephony/BaseCommands.java @@ -68,6 +68,8 @@ public abstract class BaseCommands implements CommandsInterface { @@ -37,7 +37,7 @@ index b33b732fbd..ce462231f9 100644 protected RegistrantList mOtaProvisionRegistrants = new RegistrantList(); @UnsupportedAppUsage protected RegistrantList mCallWaitingInfoRegistrants = new RegistrantList(); -@@ -673,6 +675,17 @@ public abstract class BaseCommands implements CommandsInterface { +@@ -674,6 +676,17 @@ public abstract class BaseCommands implements CommandsInterface { mSignalInfoRegistrants.addUnique(h, what, obj); } @@ -55,7 +55,7 @@ index b33b732fbd..ce462231f9 100644 @Override public void unregisterForSignalInfo(Handler h) { mSignalInfoRegistrants.remove(h); -@@ -991,6 +1004,18 @@ public abstract class BaseCommands implements CommandsInterface { +@@ -992,6 +1005,18 @@ public abstract class BaseCommands implements CommandsInterface { mPhoneRadioCapabilityChangedRegistrants.remove(h); } @@ -75,7 +75,7 @@ index b33b732fbd..ce462231f9 100644 public void registerForLceInfo(Handler h, int what, Object obj) { synchronized (mStateMonitor) { diff --git a/src/java/com/android/internal/telephony/CommandsInterface.java b/src/java/com/android/internal/telephony/CommandsInterface.java -index 91e6fab171..9306ab15fd 100644 +index ee7447cf99..0f0455f005 100644 --- a/src/java/com/android/internal/telephony/CommandsInterface.java +++ b/src/java/com/android/internal/telephony/CommandsInterface.java @@ -898,6 +898,18 @@ public interface CommandsInterface { @@ -321,18 +321,18 @@ index 91e6fab171..9306ab15fd 100644 * Register a LCE info listener. * diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -index cf81125aab..176d2b9e34 100644 +index 79a23ec160..ed4bbe32ce 100644 --- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java +++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java -@@ -3150,6 +3150,7 @@ public class GsmCdmaPhone extends Phone { - +@@ -3209,6 +3209,7 @@ public class GsmCdmaPhone extends Phone { handleNullCipherEnabledChange(); handleIdentifierDisclosureNotificationPreferenceChange(); + handleNullCipherNotificationPreferenceChanged(); + startLceAfterRadioIsAvailable(); } private void handleRadioOn() { -@@ -4585,6 +4586,7 @@ public class GsmCdmaPhone extends Phone { +@@ -4662,6 +4663,7 @@ public class GsmCdmaPhone extends Phone { } else { loge("deleteAndCreatePhone: newVoiceRadioTech=" + newVoiceRadioTech + " is not CDMA or GSM (error) - aborting!"); @@ -341,10 +341,10 @@ index cf81125aab..176d2b9e34 100644 } diff --git a/src/java/com/android/internal/telephony/Phone.java b/src/java/com/android/internal/telephony/Phone.java -index d94473824e..454377dca8 100644 +index c088406505..8bf98aa1e7 100644 --- a/src/java/com/android/internal/telephony/Phone.java +++ b/src/java/com/android/internal/telephony/Phone.java -@@ -220,6 +220,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -222,6 +222,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private static final int EVENT_UNSOL_OEM_HOOK_RAW = 34; protected static final int EVENT_GET_RADIO_CAPABILITY = 35; protected static final int EVENT_SS = 36; @@ -352,7 +352,7 @@ index d94473824e..454377dca8 100644 private static final int EVENT_CHECK_FOR_NETWORK_AUTOMATIC = 38; protected static final int EVENT_VOICE_RADIO_TECH_CHANGED = 39; protected static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE = 40; -@@ -380,6 +381,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -387,6 +388,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private final AtomicReference mRadioCapability = new AtomicReference(); @@ -362,7 +362,7 @@ index d94473824e..454377dca8 100644 protected TelephonyComponentFactory mTelephonyComponentFactory; private int mPreferredUsageSetting = SubscriptionManager.USAGE_SETTING_UNKNOWN; -@@ -664,6 +668,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -671,6 +675,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) { mCi.registerForSrvccStateChanged(this, EVENT_SRVCC_STATE_CHANGED, null); } @@ -371,7 +371,7 @@ index d94473824e..454377dca8 100644 //Initialize Telephony Analytics if (mFeatureFlags.enableTelephonyAnalytics()) { mTelephonyAnalytics = new TelephonyAnalytics(this); -@@ -847,6 +853,16 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -854,6 +860,16 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { // deprecated, ignore break; @@ -388,7 +388,7 @@ index d94473824e..454377dca8 100644 case EVENT_CHECK_FOR_NETWORK_AUTOMATIC: { onCheckForNetworkSelectionModeAutomatic(msg); break; -@@ -2749,6 +2765,47 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -2767,6 +2783,47 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mCi.queryAvailableBandMode(response); } @@ -436,7 +436,7 @@ index d94473824e..454377dca8 100644 /** * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. * Used for device configuration by some CDMA operators. -@@ -4514,6 +4571,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -4532,6 +4589,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return false; } @@ -450,7 +450,7 @@ index d94473824e..454377dca8 100644 /** * Returns the modem activity information */ -@@ -4521,6 +4585,15 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { +@@ -4539,6 +4603,15 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { mCi.getModemActivityInfo(response, workSource); } @@ -467,10 +467,10 @@ index d94473824e..454377dca8 100644 * Control the data throttling at modem. * diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java -index d34201117a..2c6fbdaa91 100644 +index 53cd45c168..a84e9fc1c2 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java -@@ -1287,6 +1287,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1330,6 +1330,16 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -487,7 +487,7 @@ index d34201117a..2c6fbdaa91 100644 @Override public void supplyIccPin(String pin, Message result) { supplyIccPinForApp(pin, null, result); -@@ -1476,7 +1486,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1519,7 +1529,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); if (!canMakeRequest("supplySimDepersonalization", simProxy, result, @@ -496,7 +496,7 @@ index d34201117a..2c6fbdaa91 100644 return; } -@@ -1993,8 +2003,9 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2036,8 +2046,9 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -508,7 +508,7 @@ index d34201117a..2c6fbdaa91 100644 TrafficDescriptor trafficDescriptor, boolean matchAllRuleAllowed, Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); if (!canMakeRequest("setupDataCall", dataProxy, result, RADIO_HAL_VERSION_1_4)) { -@@ -2630,6 +2641,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2673,6 +2684,16 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -525,7 +525,7 @@ index d34201117a..2c6fbdaa91 100644 @Override public void getDataCallList(Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); -@@ -2648,6 +2669,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2691,6 +2712,17 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -543,7 +543,7 @@ index d34201117a..2c6fbdaa91 100644 @Override public void setSuppServiceNotifications(boolean enable, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); -@@ -3738,7 +3770,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3781,7 +3813,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -553,7 +553,7 @@ index d34201117a..2c6fbdaa91 100644 RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); if (!canMakeRequest("setInitialAttachApn", dataProxy, result, RADIO_HAL_VERSION_1_4)) { return; -@@ -4026,6 +4059,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4069,6 +4102,17 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -571,7 +571,7 @@ index d34201117a..2c6fbdaa91 100644 @Override public void setDataAllowed(boolean allowed, Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); -@@ -4090,7 +4134,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4133,7 +4177,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -580,7 +580,7 @@ index d34201117a..2c6fbdaa91 100644 RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); if (!canMakeRequest("setDataProfile", dataProxy, result, RADIO_HAL_VERSION_1_4)) { return; -@@ -4168,6 +4212,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4211,6 +4255,16 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -597,7 +597,7 @@ index d34201117a..2c6fbdaa91 100644 /** * Control the data throttling at modem. * -@@ -4200,6 +4254,22 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4243,6 +4297,22 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -620,7 +620,7 @@ index d34201117a..2c6fbdaa91 100644 @Override public void getModemActivityInfo(Message result, WorkSource workSource) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); -@@ -4430,6 +4500,33 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4473,6 +4543,33 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -654,7 +654,7 @@ index d34201117a..2c6fbdaa91 100644 /** * Enable or disable uicc applications on the SIM. * -@@ -4490,6 +4587,11 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4533,6 +4630,11 @@ public class RIL extends BaseCommands implements CommandsInterface { getRadioServiceProxy(RadioSimProxy.class), null, RADIO_HAL_VERSION_1_5); } @@ -879,10 +879,10 @@ index 0459bf676e..ec35774eda 100644 if (VDBG) logPhoneIdToSlotIdMapping(); diff --git a/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java b/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java -index 935da5ac7b..d36dcaeac0 100644 +index 9f96ce49b1..17dcac5943 100644 --- a/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java +++ b/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java -@@ -984,6 +984,9 @@ public class GsmCdmaPhoneTest extends TelephonyTest { +@@ -1013,6 +1013,9 @@ public class GsmCdmaPhoneTest extends TelephonyTest { verify(mSimulatedCommandsVerifier).getBasebandVersion(nullable(Message.class)); verify(mSimulatedCommandsVerifier).getDeviceIdentity(nullable(Message.class)); verify(mSimulatedCommandsVerifier).getRadioCapability(nullable(Message.class)); @@ -892,7 +892,7 @@ index 935da5ac7b..d36dcaeac0 100644 // EVENT_RADIO_ON verify(mSimulatedCommandsVerifier).getVoiceRadioTechnology(nullable(Message.class)); -@@ -1006,6 +1009,8 @@ public class GsmCdmaPhoneTest extends TelephonyTest { +@@ -1035,6 +1038,8 @@ public class GsmCdmaPhoneTest extends TelephonyTest { // EVENT_RADIO_AVAILABLE verify(mSimulatedCommandsVerifier, times(2)).getBasebandVersion(nullable(Message.class)); verify(mSimulatedCommandsVerifier, times(2)).getDeviceIdentity(nullable(Message.class)); @@ -1472,7 +1472,7 @@ index 6fc56169f3..1883513218 100644 public void registerForLceInfo(Handler h, int what, Object obj) { diff --git a/tests/telephonytests/src/com/android/internal/telephony/data/DataServiceManagerTest.java b/tests/telephonytests/src/com/android/internal/telephony/data/DataServiceManagerTest.java -index 2ceca0e618..96162f712f 100644 +index 30f49ad63b..8b6ccfc908 100644 --- a/tests/telephonytests/src/com/android/internal/telephony/data/DataServiceManagerTest.java +++ b/tests/telephonytests/src/com/android/internal/telephony/data/DataServiceManagerTest.java @@ -155,7 +155,7 @@ public class DataServiceManagerTest extends TelephonyTest { diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0006-Revert-Remove-deprecated-HAL-versions-for-IRadio.patch b/patches_treble_td/platform_frameworks_opt_telephony/0006-Revert-Remove-deprecated-HAL-versions-for-IRadio.patch index 20d88ce..aa1f154 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0006-Revert-Remove-deprecated-HAL-versions-for-IRadio.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0006-Revert-Remove-deprecated-HAL-versions-for-IRadio.patch @@ -1,4 +1,4 @@ -From 3cbbcd5899aaf29fd03367e88813208c69e52d9b Mon Sep 17 00:00:00 2001 +From 95dac4dadfb5ffacefb1d24b59c0bc7638cd830d Mon Sep 17 00:00:00 2001 From: Daniel Zhang Date: Sat, 30 Mar 2024 14:44:57 -0400 Subject: [PATCH 06/14] Revert "Remove deprecated HAL versions for IRadio" @@ -11,7 +11,7 @@ Change-Id: Ia3aa57286fb5cce42065f7db8133fa3caf1fcd61 .../telephony/CellularNetworkService.java | 105 +- .../internal/telephony/NetworkIndication.java | 5 +- .../internal/telephony/NetworkResponse.java | 19 + - .../com/android/internal/telephony/RIL.java | 2374 +++++++++++------ + .../com/android/internal/telephony/RIL.java | 2373 +++++++++++------ .../android/internal/telephony/RILUtils.java | 399 ++- .../internal/telephony/RadioConfig.java | 9 +- .../internal/telephony/RadioConfigProxy.java | 22 +- @@ -26,13 +26,13 @@ Change-Id: Ia3aa57286fb5cce42065f7db8133fa3caf1fcd61 .../internal/telephony/RadioVoiceProxy.java | 8 +- .../android/internal/telephony/RILTest.java | 1382 +++++----- .../internal/telephony/SimulatedCommands.java | 31 +- - 19 files changed, 3395 insertions(+), 1676 deletions(-) + 19 files changed, 3395 insertions(+), 1675 deletions(-) diff --git a/Android.bp b/Android.bp -index 121236aa4d..a94ae98208 100644 +index c3b43735f1..331b722ace 100644 --- a/Android.bp +++ b/Android.bp -@@ -100,6 +100,7 @@ java_library { +@@ -99,6 +99,7 @@ java_library { "android.hardware.radio.config-V1.1-java-shallow", "android.hardware.radio.config-V1.2-java-shallow", "android.hardware.radio.config-V1.3-java-shallow", @@ -186,10 +186,10 @@ index bff1d41327..41cbb662e4 100644 private @NonNull NetworkRegistrationInfo getNetworkRegistrationInfo( diff --git a/src/java/com/android/internal/telephony/NetworkIndication.java b/src/java/com/android/internal/telephony/NetworkIndication.java -index d86c09090a..091783d3d2 100644 +index 5c492349cd..0d5d871020 100644 --- a/src/java/com/android/internal/telephony/NetworkIndication.java +++ b/src/java/com/android/internal/telephony/NetworkIndication.java -@@ -131,7 +131,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { +@@ -132,7 +132,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { android.hardware.radio.network.LinkCapacityEstimate lce) { mRil.processIndication(HAL_SERVICE_NETWORK, indicationType); @@ -198,7 +198,7 @@ index d86c09090a..091783d3d2 100644 if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_LCEDATA_RECV, response); -@@ -210,8 +210,9 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { +@@ -211,8 +211,9 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub { android.hardware.radio.network.SignalStrength signalStrength) { mRil.processIndication(HAL_SERVICE_NETWORK, indicationType); @@ -210,13 +210,13 @@ index d86c09090a..091783d3d2 100644 if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss); diff --git a/src/java/com/android/internal/telephony/NetworkResponse.java b/src/java/com/android/internal/telephony/NetworkResponse.java -index eb2cd16cca..7501e50f56 100644 +index b4a37b3d60..b2571d981a 100644 --- a/src/java/com/android/internal/telephony/NetworkResponse.java +++ b/src/java/com/android/internal/telephony/NetworkResponse.java @@ -25,10 +25,12 @@ import android.os.AsyncResult; import android.telephony.BarringInfo; import android.telephony.CellInfo; - import android.telephony.EmergencyRegResult; + import android.telephony.EmergencyRegistrationResult; +import android.telephony.LinkCapacityEstimate; import android.telephony.RadioAccessSpecifier; import android.telephony.SignalStrength; @@ -251,10 +251,10 @@ index eb2cd16cca..7501e50f56 100644 * @param responseInfo Response info struct containing response type, serial no. and error */ diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java -index 2c6fbdaa91..3a8ce141ae 100644 +index a84e9fc1c2..503110ebc6 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java -@@ -59,6 +59,13 @@ import android.telephony.AccessNetworkConstants; +@@ -60,6 +60,13 @@ import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.BarringInfo; import android.telephony.CarrierRestrictionRules; @@ -268,7 +268,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 import android.telephony.ClientRequestStats; import android.telephony.DomainSelectionService; import android.telephony.ImsiEncryptionInfo; -@@ -67,6 +74,8 @@ import android.telephony.NeighboringCellInfo; +@@ -68,6 +75,8 @@ import android.telephony.NeighboringCellInfo; import android.telephony.NetworkScanRequest; import android.telephony.RadioAccessFamily; import android.telephony.RadioAccessSpecifier; @@ -277,7 +277,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 import android.telephony.SignalThresholdInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyHistogram; -@@ -116,6 +125,7 @@ import java.util.concurrent.atomic.AtomicLong; +@@ -117,6 +126,7 @@ import java.util.concurrent.atomic.AtomicLong; /** * RIL implementation of the CommandsInterface. @@ -285,7 +285,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 * {@hide} */ public class RIL extends BaseCommands implements CommandsInterface { -@@ -128,7 +138,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -129,7 +139,8 @@ public class RIL extends BaseCommands implements CommandsInterface { static final int RIL_HISTOGRAM_BUCKET_COUNT = 5; /** @@ -295,7 +295,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 */ private static final int DEFAULT_WAKE_LOCK_TIMEOUT_MS = 60000; -@@ -149,6 +160,18 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -150,6 +161,18 @@ public class RIL extends BaseCommands implements CommandsInterface { /** @hide */ public static final HalVersion RADIO_HAL_VERSION_UNKNOWN = HalVersion.UNKNOWN; @@ -314,7 +314,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 /** @hide */ public static final HalVersion RADIO_HAL_VERSION_1_4 = new HalVersion(1, 4); -@@ -179,7 +202,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -180,7 +203,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public final WakeLock mAckWakeLock; // Wake lock associated with ack sent final int mWakeLockTimeout; // Timeout associated with request/response final int mAckWakeLockTimeout; // Timeout associated with ack sent @@ -324,7 +324,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 int mWakeLockCount; // Variables used to identify releasing of WL on wakelock timeouts -@@ -314,10 +338,11 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -322,10 +346,11 @@ public class RIL extends BaseCommands implements CommandsInterface { } if (RILJ_LOGD) { int count = mRequestList.size(); @@ -338,7 +338,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 + RILUtils.requestToString(rr.mRequest)); } } -@@ -328,7 +353,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -336,7 +361,7 @@ public class RIL extends BaseCommands implements CommandsInterface { case EVENT_ACK_WAKE_LOCK_TIMEOUT: if (msg.arg1 == mAckWlSequenceNum && clearWakeLock(FOR_ACK_WAKELOCK)) { if (RILJ_LOGV) { @@ -347,7 +347,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } } break; -@@ -587,10 +612,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -595,10 +620,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @VisibleForTesting public void setCompatVersion(int rilRequest, @NonNull HalVersion halVersion) { HalVersion oldVersion = getCompatVersion(rilRequest); @@ -361,7 +361,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } mCompatOverrides.put(rilRequest, halVersion); -@@ -650,7 +675,39 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -659,7 +684,39 @@ public class RIL extends BaseCommands implements CommandsInterface { } if (mRadioProxy == null) { @@ -402,7 +402,16 @@ index 2c6fbdaa91..3a8ce141ae 100644 } if (mRadioProxy != null) { -@@ -881,7 +938,46 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -730,7 +787,7 @@ public class RIL extends BaseCommands implements CommandsInterface { + public synchronized RadioServiceProxy getRadioServiceProxy(int service) { + if (!SubscriptionManager.isValidPhoneId(mPhoneId)) return mServiceProxies.get(service); + if ((service >= HAL_SERVICE_IMS) && !isRadioServiceSupported(service)) { +- riljLogw("getRadioServiceProxy: " + serviceToString(service) + " for " ++ Rlog.w(RILJ_LOG_TAG, "getRadioServiceProxy: " + serviceToString(service) + " for " + + HIDL_SERVICE_NAME[mPhoneId] + " is not supported\n" + + android.util.Log.getStackTraceString(new RuntimeException())); + return mServiceProxies.get(service); +@@ -896,7 +953,46 @@ public class RIL extends BaseCommands implements CommandsInterface { if (serviceProxy.isEmpty() && mHalVersion.get(service).less(RADIO_HAL_VERSION_2_0)) { @@ -450,7 +459,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } if (!serviceProxy.isEmpty()) { -@@ -931,7 +1027,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -946,7 +1042,8 @@ public class RIL extends BaseCommands implements CommandsInterface { break; } } else { @@ -460,7 +469,15 @@ index 2c6fbdaa91..3a8ce141ae 100644 throw new AssertionError("serviceProxy shouldn't be HIDL with HAL 2.0"); } if (!mIsRadioProxyInitialized) { -@@ -1269,14 +1366,34 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1270,6 +1367,7 @@ public class RIL extends BaseCommands implements CommandsInterface { + } + } + ++ + private boolean canMakeRequest(String request, RadioServiceProxy proxy, Message result, + HalVersion version) { + int service = HAL_SERVICE_RADIO; +@@ -1312,14 +1410,34 @@ public class RIL extends BaseCommands implements CommandsInterface { return true; } @@ -497,7 +514,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); -@@ -1289,12 +1406,24 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1332,12 +1450,24 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getIccSlotsStatus(Message result) { @@ -524,7 +541,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } @Override -@@ -1305,7 +1434,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1348,7 +1478,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplyIccPinForApp(String pin, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -534,7 +551,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1330,7 +1460,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1373,7 +1504,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplyIccPukForApp(String puk, String newPin, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -544,7 +561,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1357,7 +1488,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1400,7 +1532,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplyIccPin2ForApp(String pin, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -554,7 +571,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1382,7 +1514,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1425,7 +1558,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplyIccPuk2ForApp(String puk, String newPin2, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -564,7 +581,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1408,7 +1541,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1451,7 +1585,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void changeIccPinForApp(String oldPin, String newPin, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -574,7 +591,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1435,7 +1569,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1478,7 +1613,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void changeIccPin2ForApp(String oldPin2, String newPin2, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -584,7 +601,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1457,8 +1592,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1500,8 +1636,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplyNetworkDepersonalization(String netpin, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -595,7 +612,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1479,35 +1614,45 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1522,35 +1658,45 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result) { @@ -659,7 +676,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1532,93 +1677,131 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1575,93 +1721,131 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void enableModem(boolean enable, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -832,7 +849,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1637,21 +1820,26 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1680,21 +1864,26 @@ public class RIL extends BaseCommands implements CommandsInterface { private void emergencyDial(String address, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -869,7 +886,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } @Override -@@ -1662,7 +1850,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1705,7 +1894,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getIMSIForApp(String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -879,7 +896,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1680,7 +1869,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1723,7 +1913,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void hangupConnection(int gsmIndex, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -889,7 +906,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1700,11 +1890,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1743,11 +1934,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void hangupWaitingOrBackground(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -903,7 +920,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 RILRequest rr = obtainRequest(RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, result, mRILDefaultWorkSource); -@@ -1721,8 +1910,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1764,8 +1954,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void hangupForegroundResumeBackground(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -914,7 +931,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1741,8 +1930,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1784,8 +1974,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void switchWaitingOrHoldingAndActive(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -925,7 +942,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1761,10 +1950,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1804,10 +1994,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void conference(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -938,7 +955,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 RILRequest rr = obtainRequest(RIL_REQUEST_CONFERENCE, result, mRILDefaultWorkSource); if (RILJ_LOGD) { -@@ -1779,7 +1968,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1822,7 +2012,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void rejectCall(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -948,7 +965,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1797,7 +1987,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1840,7 +2031,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getLastCallFailCause(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -958,7 +975,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1816,7 +2007,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1859,7 +2051,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getSignalStrength(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -968,7 +985,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1834,8 +2026,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1877,8 +2070,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getVoiceRegistrationState(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -979,7 +996,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1859,8 +2051,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1902,8 +2095,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getDataRegistrationState(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -990,7 +1007,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1884,7 +2076,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1927,7 +2120,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getOperator(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1000,7 +1017,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1904,7 +2097,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1947,7 +2141,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setRadioPower(boolean on, boolean forEmergencyCall, boolean preferredForEmergencyCall, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -1010,7 +1027,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1925,7 +2119,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1968,7 +2163,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendDtmf(char c, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1020,7 +1037,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1943,8 +2138,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -1986,8 +2182,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendSMS(String smscPdu, String pdu, Message result) { @@ -1033,7 +1050,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -1982,8 +2179,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2025,8 +2223,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendSMSExpectMore(String smscPdu, String pdu, Message result) { @@ -1046,7 +1063,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2003,12 +2202,13 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2046,12 +2246,13 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -1065,7 +1082,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2018,16 +2218,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2061,16 +2262,17 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest) + ",reason=" + RILUtils.setupDataReasonToString(reason) + ",accessNetworkType=" + AccessNetworkType.toString(accessNetworkType) @@ -1087,7 +1104,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 }); } -@@ -2041,7 +2242,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2084,7 +2286,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void iccIOForApp(int command, int fileId, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1097,7 +1114,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2070,8 +2272,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2113,8 +2316,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendUSSD(String ussd, Message result) { @@ -1110,7 +1127,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2091,8 +2295,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2134,8 +2339,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void cancelPendingUssd(Message result) { @@ -1123,7 +1140,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2110,7 +2316,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2153,7 +2360,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getCLIR(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1133,7 +1150,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2128,7 +2335,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2171,7 +2379,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCLIR(int clirMode, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1143,7 +1160,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2148,7 +2356,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2191,7 +2400,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void queryCallForwardStatus(int cfReason, int serviceClass, String number, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1153,7 +1170,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2157,7 +2366,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2200,7 +2410,7 @@ public class RIL extends BaseCommands implements CommandsInterface { if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest) @@ -1162,7 +1179,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } radioServiceInvokeHelper(HAL_SERVICE_VOICE, rr, "queryCallForwardStatus", () -> { -@@ -2169,7 +2378,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2212,7 +2422,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1172,7 +1189,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2190,7 +2400,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2233,7 +2444,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void queryCallWaiting(int serviceClass, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1182,7 +1199,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2210,7 +2421,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2253,7 +2465,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCallWaiting(boolean enable, int serviceClass, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1192,7 +1209,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2228,9 +2440,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2271,9 +2484,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void acknowledgeLastIncomingGsmSms(boolean success, int cause, Message result) { @@ -1206,7 +1223,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2241,15 +2454,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2284,15 +2498,17 @@ public class RIL extends BaseCommands implements CommandsInterface { + " success = " + success + " cause = " + cause); } @@ -1228,7 +1245,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2268,7 +2483,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2311,7 +2527,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void deactivateDataCall(int cid, int reason, Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -1238,7 +1255,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2297,7 +2513,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2340,7 +2557,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1248,7 +1265,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2313,8 +2530,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2356,8 +2574,8 @@ public class RIL extends BaseCommands implements CommandsInterface { radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "queryFacilityLockForApp", () -> { simProxy.getFacilityLockForApp(rr.mSerial, RILUtils.convertNullToEmptyString(facility), @@ -1259,7 +1276,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 }); } -@@ -2329,7 +2546,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2372,7 +2590,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setFacilityLockForApp(String facility, boolean lockState, String password, int serviceClass, String appId, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1269,7 +1286,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2353,7 +2571,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2396,7 +2615,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void changeBarringPassword(String facility, String oldPwd, String newPwd, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1279,7 +1296,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2377,8 +2596,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2420,8 +2640,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getNetworkSelectionMode(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1290,7 +1307,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2397,8 +2616,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2440,8 +2660,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setNetworkSelectionModeAutomatic(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1301,7 +1318,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2409,8 +2628,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2452,8 +2672,8 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); } @@ -1312,7 +1329,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 networkProxy.setNetworkSelectionModeAutomatic(rr.mSerial); }); } -@@ -2418,8 +2637,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2461,8 +2681,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setNetworkSelectionModeManual(String operatorNumeric, int ran, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1323,7 +1340,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2446,7 +2665,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2489,7 +2709,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getAvailableNetworks(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1333,7 +1350,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2471,50 +2691,70 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2514,50 +2735,70 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void startNetworkScan(NetworkScanRequest networkScanRequest, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1427,7 +1444,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2533,7 +2773,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2576,7 +2817,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void stopDtmf(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1437,7 +1454,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2551,7 +2792,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2594,7 +2836,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void separateConnection(int gsmIndex, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1447,7 +1464,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2571,7 +2813,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2614,7 +2857,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getBasebandVersion(Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -1457,7 +1474,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2589,7 +2832,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2632,7 +2876,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setMute(boolean enableMute, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1467,7 +1484,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2608,7 +2852,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2651,7 +2896,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getMute(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1477,7 +1494,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2626,7 +2871,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2669,7 +2915,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void queryCLIP(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1487,7 +1504,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2647,14 +2893,14 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2690,14 +2937,14 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override @Deprecated public void getPDPContextList(Message result) { @@ -1504,7 +1521,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2669,22 +2915,22 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2712,22 +2959,22 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -1531,7 +1548,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2703,8 +2949,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2746,8 +2993,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void writeSmsToSim(int status, String smsc, String pdu, Message result) { @@ -1544,7 +1561,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2724,8 +2972,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2767,8 +3016,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void deleteSmsOnSim(int index, Message result) { @@ -1557,7 +1574,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2744,7 +2994,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2787,7 +3038,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setBandMode(int bandMode, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1567,7 +1584,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2763,8 +3014,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2806,8 +3058,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void queryAvailableBandMode(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1578,7 +1595,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2783,7 +3034,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2826,7 +3078,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendEnvelope(String contents, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1588,7 +1605,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2803,7 +3055,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2846,7 +3099,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendTerminalResponse(String contents, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1598,7 +1615,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2825,7 +3078,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2868,7 +3122,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendEnvelopeWithStatus(String contents, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -1608,7 +1625,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2846,7 +3100,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2889,7 +3144,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void explicitCallTransfer(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1618,7 +1635,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2865,8 +3120,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2908,8 +3164,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setPreferredNetworkType(@PrefNetworkMode int networkType , Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1629,7 +1646,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2888,8 +3143,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2931,8 +3187,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getPreferredNetworkType(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1640,7 +1657,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2908,18 +3163,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2951,18 +3207,17 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setAllowedNetworkTypesBitmap( @TelephonyManager.NetworkTypeBitMask int networkTypeBitmask, Message result) { @@ -1664,7 +1681,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 RILRequest rr = obtainRequest(RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP, result, mRILDefaultWorkSource); -@@ -2936,8 +3190,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2979,8 +3234,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getAllowedNetworkTypesBitmap(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1675,7 +1692,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2956,7 +3210,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -2999,7 +3254,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setLocationUpdates(boolean enable, WorkSource workSource, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1685,7 +1702,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -2979,21 +3234,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3022,21 +3278,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void isNrDualConnectivityEnabled(Message result, WorkSource workSource) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1727,7 +1744,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -3011,22 +3276,30 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3054,22 +3320,30 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setNrDualConnectivityState(int nrDualConnectivityState, Message result, WorkSource workSource) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1769,7 +1786,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } private void setVoNrEnabled(boolean enabled) { -@@ -3043,26 +3316,28 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3086,26 +3360,28 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void isVoNrEnabled(Message result, WorkSource workSource) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1790,17 +1807,12 @@ index 2c6fbdaa91..3a8ce141ae 100644 - RILRequest rr = obtainRequest(RIL_REQUEST_IS_VONR_ENABLED, result, - getDefaultWorkSourceIfInvalid(workSource)); -- -- if (RILJ_LOGD) { -- riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); -- } + if (RILJ_LOGD) { + riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); + } -- radioServiceInvokeHelper(HAL_SERVICE_VOICE, rr, "isVoNrEnabled", () -> { -- voiceProxy.isVoNrEnabled(rr.mSerial); -- }); +- if (RILJ_LOGD) { +- riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); + radioServiceInvokeHelper(HAL_SERVICE_VOICE, rr, "isVoNrEnabled", () -> { + voiceProxy.isVoNrEnabled(rr.mSerial); + }); @@ -1810,11 +1822,15 @@ index 2c6fbdaa91..3a8ce141ae 100644 + AsyncResult.forMessage(result, isEnabled, null); + result.sendToTarget(); + } -+ } + } +- +- radioServiceInvokeHelper(HAL_SERVICE_VOICE, rr, "isVoNrEnabled", () -> { +- voiceProxy.isVoNrEnabled(rr.mSerial); +- }); } /** -@@ -3073,8 +3348,22 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3116,8 +3392,22 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setVoNrEnabled(boolean enabled, Message result, WorkSource workSource) { setVoNrEnabled(enabled); RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1839,19 +1855,19 @@ index 2c6fbdaa91..3a8ce141ae 100644 /* calling a query api to let HAL know that VoNREnabled state is updated. This is a work around as new AIDL API is not allowed for older HAL version devices. HAL can check the value of PROPERTY_IS_VONR_ENABLED property to determine -@@ -3085,25 +3374,14 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3128,25 +3418,14 @@ public class RIL extends BaseCommands implements CommandsInterface { AsyncResult.forMessage(result, null, null); result.sendToTarget(); } - return; -- } + } - - RILRequest rr = obtainRequest(RIL_REQUEST_ENABLE_VONR, result, - getDefaultWorkSourceIfInvalid(workSource)); - - if (RILJ_LOGD) { - riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); - } +- } - - radioServiceInvokeHelper(HAL_SERVICE_VOICE, rr, "setVoNrEnabled", () -> { - voiceProxy.setVoNrEnabled(rr.mSerial, enabled); @@ -1867,7 +1883,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3123,8 +3401,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3166,8 +3445,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void queryCdmaRoamingPreference(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1878,7 +1894,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3143,8 +3421,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3186,8 +3465,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCdmaRoamingPreference(int cdmaRoamingType, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -1889,7 +1905,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3164,7 +3442,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3207,7 +3486,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void queryTTYMode(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1899,7 +1915,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3182,7 +3461,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3225,7 +3505,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setTTYMode(int ttyMode, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1909,7 +1925,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3201,8 +3481,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3244,8 +3525,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setPreferredVoicePrivacy(boolean enable, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1920,7 +1936,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3222,8 +3502,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3265,8 +3546,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getPreferredVoicePrivacy(Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1931,7 +1947,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3242,7 +3522,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3285,7 +3566,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendCDMAFeatureCode(String featureCode, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1941,7 +1957,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3262,7 +3543,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3305,7 +3587,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendBurstDtmf(String dtmfString, int on, int off, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -1951,7 +1967,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3281,9 +3563,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3324,9 +3607,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendCdmaSMSExpectMore(byte[] pdu, Message result) { @@ -1965,7 +1981,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3307,8 +3590,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3350,8 +3634,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendCdmaSms(byte[] pdu, Message result) { @@ -1978,7 +1994,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3328,9 +3613,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3371,9 +3657,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message result) { @@ -1992,7 +2008,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3342,17 +3628,18 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3385,17 +3672,18 @@ public class RIL extends BaseCommands implements CommandsInterface { + " success = " + success + " cause = " + cause); } @@ -2016,7 +2032,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3370,9 +3657,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3413,9 +3701,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message result) { @@ -2030,7 +2046,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3394,9 +3682,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3437,9 +3726,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setGsmBroadcastActivation(boolean activate, Message result) { @@ -2044,7 +2060,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3415,9 +3704,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3458,9 +3748,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getCdmaBroadcastConfig(Message result) { @@ -2058,7 +2074,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3435,9 +3725,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3478,9 +3769,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message result) { @@ -2072,7 +2088,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3459,9 +3750,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3502,9 +3794,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCdmaBroadcastActivation(boolean activate, Message result) { @@ -2086,7 +2102,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3481,7 +3773,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3524,7 +3817,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getCDMASubscription(Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2096,7 +2112,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3498,8 +3791,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3541,8 +3835,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void writeSmsToRuim(int status, byte[] pdu, Message result) { @@ -2109,7 +2125,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3518,8 +3813,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3561,8 +3857,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void deleteSmsOnRuim(int index, Message result) { @@ -2122,7 +2138,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3539,11 +3836,13 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3582,11 +3880,13 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getDeviceIdentity(Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2138,7 +2154,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); -@@ -3557,26 +3856,38 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3600,26 +3900,38 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getImei(Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2187,7 +2203,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3594,12 +3905,15 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3637,12 +3949,15 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getSmscAddress(Message result) { @@ -2206,7 +2222,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); -@@ -3612,8 +3926,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3655,8 +3970,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setSmscAddress(String address, Message result) { @@ -2219,7 +2235,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3625,15 +3941,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3668,15 +3985,17 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_MESSAGING, rr, "setSmscAddress", () -> { @@ -2241,7 +2257,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3653,7 +3971,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3696,7 +4015,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void reportStkServiceIsRunning(Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2251,7 +2267,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3672,7 +3991,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3715,7 +4035,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getCdmaSubscriptionSource(Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2261,7 +2277,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3690,9 +4010,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3733,9 +4054,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message result) { @@ -2275,7 +2291,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3704,8 +4025,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3747,8 +4069,8 @@ public class RIL extends BaseCommands implements CommandsInterface { + " success = " + success); } @@ -2286,7 +2302,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 messagingProxy.acknowledgeIncomingGsmSmsWithPdu(rr.mSerial, success, RILUtils.convertNullToEmptyString(ackPdu)); }); -@@ -3714,8 +4035,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3757,8 +4079,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getVoiceRadioTechnology(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2297,7 +2313,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3733,7 +4054,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3776,7 +4098,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getCellInfoList(Message result, WorkSource workSource) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2307,7 +2323,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3752,7 +4074,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3795,7 +4118,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setCellInfoListRate(int rateInMillis, Message result, WorkSource workSource) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2317,7 +2333,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3770,10 +4093,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3813,10 +4137,10 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -2331,7 +2347,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3781,19 +4104,20 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3824,19 +4148,20 @@ public class RIL extends BaseCommands implements CommandsInterface { mRILDefaultWorkSource); if (RILJ_LOGD) { @@ -2356,7 +2372,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3812,8 +4136,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3855,8 +4180,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendImsGsmSms(String smscPdu, String pdu, int retry, int messageRef, Message result) { @@ -2369,7 +2385,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3833,8 +4159,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3876,8 +4203,10 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message result) { @@ -2382,7 +2398,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3856,8 +4184,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3899,8 +4228,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2393,7 +2409,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3876,14 +4204,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3919,14 +4248,16 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "iccTransmitApduBasicChannel", () -> { @@ -2412,7 +2428,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3899,14 +4229,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3942,14 +4273,16 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "iccOpenLogicalChannel", () -> { @@ -2431,7 +2447,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3930,8 +4262,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3973,8 +4306,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2442,7 +2458,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3952,15 +4284,16 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -3995,15 +4328,16 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "iccTransmitApduLogicalChannel", () -> { @@ -2462,7 +2478,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -3980,7 +4313,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4023,7 +4357,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void nvWriteItem(int itemId, String itemValue, Message result, WorkSource workSource) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2472,7 +2488,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4001,7 +4335,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4044,7 +4379,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2482,7 +2498,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4021,7 +4356,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4064,7 +4400,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void nvResetConfig(int resetType, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2492,7 +2508,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4041,7 +4377,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4084,7 +4421,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2502,7 +2518,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4066,14 +4403,17 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4109,14 +4447,17 @@ public class RIL extends BaseCommands implements CommandsInterface { */ @Override public boolean supportsEid() { @@ -2523,7 +2539,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4092,7 +4432,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4135,7 +4476,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getHardwareConfig(Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2533,7 +2549,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4113,8 +4454,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4156,8 +4498,8 @@ public class RIL extends BaseCommands implements CommandsInterface { public void requestIccSimAuthentication(int authContext, String data, String aid, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2544,7 +2560,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4134,9 +4475,10 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4177,9 +4519,10 @@ public class RIL extends BaseCommands implements CommandsInterface { } @Override @@ -2557,7 +2573,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4151,14 +4493,15 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4194,14 +4537,15 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_DATA, rr, "setDataProfile", () -> { @@ -2575,7 +2591,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4176,7 +4519,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4219,7 +4563,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getRadioCapability(Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2585,7 +2601,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4195,7 +4539,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4238,7 +4583,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setRadioCapability(RadioCapability rc, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2595,7 +2611,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4214,12 +4559,65 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4257,12 +4603,65 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void startLceService(int reportIntervalMs, boolean pullMode, Message result) { @@ -2663,7 +2679,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4235,23 +4633,33 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4278,23 +4677,33 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setDataThrottling(Message result, WorkSource workSource, int dataThrottlingAction, long completionWindowMillis) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -2709,7 +2725,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4267,13 +4675,40 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4310,13 +4719,40 @@ public class RIL extends BaseCommands implements CommandsInterface { @Deprecated @Override public void pullLceData(Message result) { @@ -2752,7 +2768,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4286,7 +4721,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4329,7 +4765,8 @@ public class RIL extends BaseCommands implements CommandsInterface { radioServiceInvokeHelper(HAL_SERVICE_MODEM, rr, "getModemActivityInfo", () -> { modemProxy.getModemActivityInfo(rr.mSerial); @@ -2762,7 +2778,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 mRilHandler.sendMessageDelayed(msg, DEFAULT_BLOCKING_MESSAGE_RESPONSE_TIMEOUT_MS); }); } -@@ -4297,7 +4733,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4340,7 +4777,8 @@ public class RIL extends BaseCommands implements CommandsInterface { Objects.requireNonNull(carrierRestrictionRules, "Carrier restriction cannot be null."); RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2772,7 +2788,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4310,14 +4747,15 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4353,14 +4791,15 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "setAllowedCarriers", () -> { @@ -2790,7 +2806,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4336,7 +4774,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4379,7 +4818,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void sendDeviceState(int stateType, boolean state, Message result) { RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class); @@ -2800,7 +2816,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4355,8 +4794,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4398,8 +4838,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setUnsolResponseFilter(int filter, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2811,7 +2827,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4377,23 +4816,26 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4420,23 +4860,26 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setSignalStrengthReportingCriteria( @NonNull List signalThresholdInfos, @Nullable Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2850,7 +2866,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } @Override -@@ -4401,30 +4843,35 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4444,30 +4887,35 @@ public class RIL extends BaseCommands implements CommandsInterface { int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -2900,7 +2916,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4437,7 +4884,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4480,7 +4928,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } radioServiceInvokeHelper(HAL_SERVICE_SIM, rr, "setSimCardPower", () -> { @@ -2909,7 +2925,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 }); } -@@ -4446,20 +4893,30 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4489,20 +4937,30 @@ public class RIL extends BaseCommands implements CommandsInterface { Message result) { Objects.requireNonNull(imsiEncryptionInfo, "ImsiEncryptionInfo cannot be null."); RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -2950,7 +2966,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } @Override -@@ -4467,47 +4924,67 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4510,47 +4968,67 @@ public class RIL extends BaseCommands implements CommandsInterface { int intervalMillis, Message result) { Objects.requireNonNull(packetData, "KeepaliveRequest cannot be null."); RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3036,7 +3052,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4516,7 +4993,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4559,7 +5037,7 @@ public class RIL extends BaseCommands implements CommandsInterface { @Deprecated @Override public void getLastPdpFailCause(Message result) { @@ -3045,7 +3061,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4524,7 +5001,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4567,7 +5045,7 @@ public class RIL extends BaseCommands implements CommandsInterface { */ @Override public void getLastDataCallFailCause(Message result) { @@ -3054,7 +3070,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4536,21 +5013,30 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4579,21 +5057,30 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void enableUiccApplications(boolean enable, Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -3095,7 +3111,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4561,21 +5047,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4604,21 +5091,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void areUiccApplicationsEnabled(Message result) { RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class); @@ -3137,7 +3153,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4583,13 +5079,13 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4626,13 +5123,13 @@ public class RIL extends BaseCommands implements CommandsInterface { */ @Override public boolean canToggleUiccApplicationsEnablement() { @@ -3154,7 +3170,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4598,8 +5094,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4641,8 +5138,8 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void handleCallSetupRequestFromSim(boolean accept, Message result) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class); @@ -3165,7 +3181,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } -@@ -4621,19 +5117,29 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4664,19 +5161,29 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getBarringInfo(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3203,7 +3219,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4642,19 +5148,26 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4685,19 +5192,26 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void allocatePduSessionId(Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3239,7 +3255,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4663,19 +5176,26 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4706,19 +5220,26 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void releasePduSessionId(Message result, int pduSessionId) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3275,7 +3291,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4684,18 +5204,28 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4727,18 +5248,28 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void startHandover(Message result, int callId) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3294,11 +3310,6 @@ index 2c6fbdaa91..3a8ce141ae 100644 - RILRequest rr = obtainRequest(RIL_REQUEST_START_HANDOVER, result, mRILDefaultWorkSource); - if (RILJ_LOGD) { - riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); -- } -- -- radioServiceInvokeHelper(HAL_SERVICE_DATA, rr, "startHandover", () -> { -- dataProxy.startHandover(rr.mSerial, callId); -- }); + radioServiceInvokeHelper(HAL_SERVICE_DATA, rr, "startHandover", () -> { + dataProxy.startHandover(rr.mSerial, callId); + }); @@ -3309,11 +3320,15 @@ index 2c6fbdaa91..3a8ce141ae 100644 + CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED)); + result.sendToTarget(); + } -+ } + } +- +- radioServiceInvokeHelper(HAL_SERVICE_DATA, rr, "startHandover", () -> { +- dataProxy.startHandover(rr.mSerial, callId); +- }); } /** -@@ -4704,18 +5234,26 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4747,18 +5278,26 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void cancelHandover(Message result, int callId) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3348,7 +3363,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4724,78 +5262,118 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4767,78 +5306,118 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getSlicingConfig(Message result) { RadioDataProxy dataProxy = getRadioServiceProxy(RadioDataProxy.class); @@ -3504,7 +3519,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4808,19 +5386,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4851,19 +5430,31 @@ public class RIL extends BaseCommands implements CommandsInterface { public void setUsageSetting(Message result, /* @TelephonyManager.UsageSetting */ int usageSetting) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3544,7 +3559,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4831,39 +5421,63 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4874,39 +5465,63 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void getUsageSetting(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3626,7 +3641,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } @Override -@@ -4873,108 +5487,168 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -4916,108 +5531,168 @@ public class RIL extends BaseCommands implements CommandsInterface { @RegistrationManager.SuggestedAction int suggestedAction, int capabilities, Message result) { RadioImsProxy imsProxy = getRadioServiceProxy(RadioImsProxy.class); @@ -3854,7 +3869,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -4983,21 +5657,32 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5026,21 +5701,32 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setEmergencyMode(int emcMode, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3897,7 +3912,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5008,24 +5693,34 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5051,24 +5737,34 @@ public class RIL extends BaseCommands implements CommandsInterface { @NonNull @AccessNetworkConstants.RadioAccessNetworkType int[] accessNetwork, @DomainSelectionService.EmergencyScanType int scanType, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3945,7 +3960,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5034,22 +5729,32 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5077,22 +5773,32 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void cancelEmergencyNetworkScan(boolean resetScan, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -3989,7 +4004,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5058,20 +5763,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5101,20 +5807,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void exitEmergencyMode(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -4030,7 +4045,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5083,22 +5799,32 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5126,22 +5843,32 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setNullCipherAndIntegrityEnabled(boolean enabled, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -4074,7 +4089,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5109,21 +5835,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5152,21 +5879,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void isNullCipherAndIntegrityEnabled(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -4118,7 +4133,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5132,20 +5868,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5175,20 +5912,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void updateImsCallStatus(@NonNull List imsCallInfo, Message result) { RadioImsProxy imsProxy = getRadioServiceProxy(RadioImsProxy.class); @@ -4160,7 +4175,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5154,21 +5901,32 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5197,21 +5945,32 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setN1ModeEnabled(boolean enable, Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -4203,7 +4218,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5177,20 +5935,31 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5220,20 +5979,31 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void isN1ModeEnabled(Message result) { RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class); @@ -4244,7 +4259,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5254,7 +6023,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5297,7 +6067,7 @@ public class RIL extends BaseCommands implements CommandsInterface { }); } @@ -4253,7 +4268,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 * {@inheritDoc} */ @Override -@@ -5279,7 +6048,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5322,7 +6092,7 @@ public class RIL extends BaseCommands implements CommandsInterface { radioServiceInvokeHelper(HAL_SERVICE_NETWORK, rr, "setSecurityAlgorithmsUpdatedEnabled", () -> { networkProxy.setSecurityAlgorithmsUpdatedEnabled(rr.mSerial, enable); @@ -4262,7 +4277,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } /** -@@ -5331,7 +6100,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5374,7 +6144,8 @@ public class RIL extends BaseCommands implements CommandsInterface { rr = mRequestList.get(serial); } if (rr == null) { @@ -4272,7 +4287,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } else { decrementWakeLock(rr); if (RILJ_LOGD) { -@@ -5389,7 +6159,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5432,7 +6203,7 @@ public class RIL extends BaseCommands implements CommandsInterface { rr = mRequestList.get(serial); } if (rr == null) { @@ -4281,7 +4296,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } else { decrementWakeLock(rr); if (mRadioBugDetector != null) { -@@ -5405,8 +6175,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5448,8 +6219,8 @@ public class RIL extends BaseCommands implements CommandsInterface { rr = findAndRemoveRequestFromList(serial); if (rr == null) { @@ -4292,7 +4307,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return null; } Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_NETWORK, "RIL", rr.mSerial); -@@ -5592,7 +6362,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5635,7 +6406,7 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLoge("sendAck: " + e); } } else { @@ -4301,7 +4316,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } } else { RadioServiceProxy serviceProxy = getRadioServiceProxy(service); -@@ -5604,7 +6374,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5647,7 +6418,7 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLoge("sendAck: " + e); } } else { @@ -4310,7 +4325,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } } rr.release(); -@@ -5631,11 +6401,11 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5674,11 +6445,11 @@ public class RIL extends BaseCommands implements CommandsInterface { private void acquireWakeLock(RILRequest rr, int wakeLockType) { synchronized (rr) { if (rr.mWakeLockType != INVALID_WAKELOCK) { @@ -4324,7 +4339,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 case FOR_WAKELOCK: synchronized (mWakeLock) { mWakeLock.acquire(); -@@ -5667,7 +6437,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5710,7 +6481,7 @@ public class RIL extends BaseCommands implements CommandsInterface { } break; default: //WTF @@ -4333,7 +4348,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 return; } rr.mWakeLockType = wakeLockType; -@@ -5721,7 +6491,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5764,7 +6535,7 @@ public class RIL extends BaseCommands implements CommandsInterface { case INVALID_WAKELOCK: break; default: @@ -4342,7 +4357,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } rr.mWakeLockType = INVALID_WAKELOCK; } -@@ -5732,7 +6502,8 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5775,7 +6546,8 @@ public class RIL extends BaseCommands implements CommandsInterface { if (wakeLockType == FOR_WAKELOCK) { synchronized (mWakeLock) { if (mWakeLockCount == 0 && !mWakeLock.isHeld()) return false; @@ -4352,7 +4367,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 mWakeLockCount = 0; mWakeLock.release(); mClientWakelockTracker.stopTrackingAll(); -@@ -5759,14 +6530,15 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -5802,14 +6574,15 @@ public class RIL extends BaseCommands implements CommandsInterface { synchronized (mRequestList) { int count = mRequestList.size(); if (RILJ_LOGD && loggable) { @@ -4371,7 +4386,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 } rr.onError(error, null); decrementWakeLock(rr); -@@ -6044,22 +6816,18 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -6087,22 +6860,18 @@ public class RIL extends BaseCommands implements CommandsInterface { Rlog.v(RILJ_LOG_TAG, msg + (" [PHONE" + mPhoneId + "]")); } @@ -4397,7 +4412,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 riljLog("[UNSL]< " + logStr); } Trace.instantForTrack(Trace.TRACE_TAG_NETWORK, "RIL", logStr); -@@ -6068,7 +6836,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -6111,7 +6880,7 @@ public class RIL extends BaseCommands implements CommandsInterface { @UnsupportedAppUsage void unsljLogMore(int response, String more) { String logStr = RILUtils.responseToString(response) + " " + more; @@ -4406,7 +4421,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 riljLog("[UNSL]< " + logStr); } Trace.instantForTrack(Trace.TRACE_TAG_NETWORK, "RIL", logStr); -@@ -6077,7 +6845,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -6120,7 +6889,7 @@ public class RIL extends BaseCommands implements CommandsInterface { @UnsupportedAppUsage void unsljLogRet(int response, Object ret) { String logStr = RILUtils.responseToString(response) + " " + retToString(response, ret); @@ -4415,7 +4430,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 riljLog("[UNSL]< " + logStr); } Trace.instantForTrack(Trace.TRACE_TAG_NETWORK, "RIL", logStr); -@@ -6086,7 +6854,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -6129,7 +6898,7 @@ public class RIL extends BaseCommands implements CommandsInterface { @UnsupportedAppUsage void unsljLogvRet(int response, Object ret) { String logStr = RILUtils.responseToString(response) + " " + retToString(response, ret); @@ -4424,7 +4439,7 @@ index 2c6fbdaa91..3a8ce141ae 100644 riljLogv("[UNSL]< " + logStr); } Trace.instantForTrack(Trace.TRACE_TAG_NETWORK, "RIL", logStr); -@@ -6139,6 +6907,58 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -6182,6 +6951,58 @@ public class RIL extends BaseCommands implements CommandsInterface { return mClientWakelockTracker.getClientRequestStats(); } @@ -4484,10 +4499,10 @@ index 2c6fbdaa91..3a8ce141ae 100644 mLastBarringInfo = barringInfo; mBarringInfoChangedRegistrants.notifyRegistrants(new AsyncResult(null, barringInfo, null)); diff --git a/src/java/com/android/internal/telephony/RILUtils.java b/src/java/com/android/internal/telephony/RILUtils.java -index 94f2e962ee..5f61159a4e 100644 +index 8897db4e45..04e90f7f83 100644 --- a/src/java/com/android/internal/telephony/RILUtils.java +++ b/src/java/com/android/internal/telephony/RILUtils.java -@@ -876,6 +876,41 @@ public class RILUtils { +@@ -886,6 +886,41 @@ public class RILUtils { return new SmsMessage(addr, env); } @@ -4529,7 +4544,7 @@ index 94f2e962ee..5f61159a4e 100644 /** * Convert to DataProfileInfo defined in radio/1.4/types.hal * @param dp Data profile -@@ -2170,15 +2205,21 @@ public class RILUtils { +@@ -2180,15 +2215,21 @@ public class RILUtils { } /** @@ -4556,7 +4571,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.LinkCapacityEstimate lce = (android.hardware.radio.V1_2.LinkCapacityEstimate) lceObj; lceList.add(new LinkCapacityEstimate(LinkCapacityEstimate.LCE_TYPE_COMBINED, -@@ -2206,13 +2247,26 @@ public class RILUtils { +@@ -2216,13 +2257,26 @@ public class RILUtils { return lceList; } @@ -4584,7 +4599,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.network.LinkCapacityEstimate lce) { final List lceList = new ArrayList<>(); int primaryDownlinkCapacityKbps = lce.downlinkCapacityKbps; -@@ -2236,9 +2290,9 @@ public class RILUtils { +@@ -2246,9 +2300,9 @@ public class RILUtils { /** @@ -4596,7 +4611,7 @@ index 94f2e962ee..5f61159a4e 100644 * @return The converted list of CellInfos */ public static ArrayList convertHalCellInfoList(ArrayList records) { -@@ -2268,8 +2322,8 @@ public class RILUtils { +@@ -2278,8 +2332,8 @@ public class RILUtils { } /** @@ -4607,7 +4622,7 @@ index 94f2e962ee..5f61159a4e 100644 * @param nanotime time the CellInfo was created * @return The converted CellInfo */ -@@ -2291,7 +2345,87 @@ public class RILUtils { +@@ -2301,7 +2355,87 @@ public class RILUtils { CellSignalStrengthTdscdma tdscdmaSs = null; CellIdentityNr nrCi = null; CellSignalStrengthNr nrSs = null; @@ -4696,7 +4711,7 @@ index 94f2e962ee..5f61159a4e 100644 final android.hardware.radio.V1_4.CellInfo record = (android.hardware.radio.V1_4.CellInfo) cellInfo; connectionStatus = record.connectionStatus; -@@ -2521,13 +2655,43 @@ public class RILUtils { +@@ -2531,13 +2665,43 @@ public class RILUtils { } /** @@ -4743,7 +4758,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentity ci = (android.hardware.radio.V1_2.CellIdentity) halCi; switch (ci.cellInfoType) { -@@ -2604,13 +2768,19 @@ public class RILUtils { +@@ -2614,13 +2778,19 @@ public class RILUtils { } /** @@ -4766,7 +4781,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentityGsm ci = (android.hardware.radio.V1_2.CellIdentityGsm) gsm; return new CellIdentityGsm(ci.base.lac, ci.base.cid, ci.base.arfcn, -@@ -2643,13 +2813,18 @@ public class RILUtils { +@@ -2653,13 +2823,18 @@ public class RILUtils { } /** @@ -4788,7 +4803,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentityCdma ci = (android.hardware.radio.V1_2.CellIdentityCdma) cdma; return new CellIdentityCdma(ci.base.networkId, ci.base.systemId, ci.base.baseStationId, -@@ -2672,13 +2847,18 @@ public class RILUtils { +@@ -2682,13 +2857,18 @@ public class RILUtils { } /** @@ -4810,7 +4825,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentityLte ci = (android.hardware.radio.V1_2.CellIdentityLte) lte; return new CellIdentityLte(ci.base.ci, ci.base.pci, ci.base.tac, ci.base.earfcn, -@@ -2712,13 +2892,18 @@ public class RILUtils { +@@ -2722,13 +2902,18 @@ public class RILUtils { } /** @@ -4832,7 +4847,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentityWcdma ci = (android.hardware.radio.V1_2.CellIdentityWcdma) wcdma; return new CellIdentityWcdma(ci.base.lac, ci.base.cid, ci.base.psc, ci.base.uarfcn, -@@ -2750,13 +2935,18 @@ public class RILUtils { +@@ -2760,13 +2945,18 @@ public class RILUtils { } /** @@ -4854,7 +4869,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_2.CellIdentityTdscdma ci = (android.hardware.radio.V1_2.CellIdentityTdscdma) tdscdma; return new CellIdentityTdscdma(ci.base.mcc, ci.base.mnc, ci.base.lac, ci.base.cid, -@@ -2776,7 +2966,7 @@ public class RILUtils { +@@ -2786,7 +2976,7 @@ public class RILUtils { /** * Convert a CellIdentityTdscdma defined in CellIdentityTdscdma.aidl to CellIdentityTdscdma @@ -4863,7 +4878,7 @@ index 94f2e962ee..5f61159a4e 100644 * @return The converted CellIdentityTdscdma */ public static CellIdentityTdscdma convertHalCellIdentityTdscdma( -@@ -2825,13 +3015,31 @@ public class RILUtils { +@@ -2835,13 +3025,31 @@ public class RILUtils { } /** @@ -4898,7 +4913,7 @@ index 94f2e962ee..5f61159a4e 100644 android.hardware.radio.V1_4.SignalStrength signalStrength = (android.hardware.radio.V1_4.SignalStrength) ss; return new SignalStrength( -@@ -2979,19 +3187,29 @@ public class RILUtils { +@@ -2989,19 +3197,29 @@ public class RILUtils { } /** @@ -4937,7 +4952,7 @@ index 94f2e962ee..5f61159a4e 100644 ret.setDefaultValues(); ret.updateLevel(null, null); } -@@ -3017,18 +3235,29 @@ public class RILUtils { +@@ -3027,18 +3245,29 @@ public class RILUtils { } /** @@ -4975,7 +4990,7 @@ index 94f2e962ee..5f61159a4e 100644 ret.setDefaultValues(); ret.updateLevel(null, null); } -@@ -3213,9 +3442,9 @@ public class RILUtils { +@@ -3223,9 +3452,9 @@ public class RILUtils { } /** @@ -4987,7 +5002,7 @@ index 94f2e962ee..5f61159a4e 100644 * @return The converted DataCallResponse */ @VisibleForTesting -@@ -3226,10 +3455,10 @@ public class RILUtils { +@@ -3236,10 +3465,10 @@ public class RILUtils { long suggestedRetryTime; String ifname; int protocolType; @@ -5002,7 +5017,7 @@ index 94f2e962ee..5f61159a4e 100644 Qos defaultQos = null; @DataCallResponse.HandoverFailureMode int handoverFailureMode = DataCallResponse.HANDOVER_FAILURE_MODE_LEGACY; -@@ -3239,7 +3468,34 @@ public class RILUtils { +@@ -3249,7 +3478,34 @@ public class RILUtils { NetworkSliceInfo sliceInfo = null; List trafficDescriptors = new ArrayList<>(); @@ -5038,7 +5053,7 @@ index 94f2e962ee..5f61159a4e 100644 final android.hardware.radio.V1_4.SetupDataCallResult result = (android.hardware.radio.V1_4.SetupDataCallResult) dcResult; cause = result.cause; -@@ -3792,10 +4048,10 @@ public class RILUtils { +@@ -3802,10 +4058,10 @@ public class RILUtils { } /** @@ -5051,7 +5066,7 @@ index 94f2e962ee..5f61159a4e 100644 * @return The converted list of DataCallResponses */ @VisibleForTesting -@@ -3885,8 +4141,8 @@ public class RILUtils { +@@ -3895,8 +4151,8 @@ public class RILUtils { } /** @@ -5062,7 +5077,7 @@ index 94f2e962ee..5f61159a4e 100644 * @return The converted DriverCall */ public static DriverCall convertToDriverCall(Object halCall) { -@@ -3902,13 +4158,17 @@ public class RILUtils { +@@ -3912,13 +4168,17 @@ public class RILUtils { call16 = null; call12 = (android.hardware.radio.V1_2.Call) halCall; call10 = call12.base; @@ -5081,7 +5096,7 @@ index 94f2e962ee..5f61159a4e 100644 dc.index = call10.index; dc.TOA = call10.toa; dc.isMpty = call10.isMpty; -@@ -3917,9 +4177,10 @@ public class RILUtils { +@@ -3927,9 +4187,10 @@ public class RILUtils { dc.isVoice = call10.isVoice; dc.isVoicePrivacy = call10.isVoicePrivacy; dc.number = call10.number; @@ -5094,7 +5109,7 @@ index 94f2e962ee..5f61159a4e 100644 if (call10.uusInfo.size() == 1) { dc.uusInfo = new UUSInfo(); dc.uusInfo.setType(call10.uusInfo.get(0).uusType); -@@ -3933,7 +4194,7 @@ public class RILUtils { +@@ -3943,7 +4204,7 @@ public class RILUtils { dc.number = PhoneNumberUtils.stringFromStringAndTOA(dc.number, dc.TOA); } if (call12 != null) { @@ -5103,7 +5118,7 @@ index 94f2e962ee..5f61159a4e 100644 } if (call16 != null) { dc.forwardedNumber = call16.forwardedNumber; -@@ -3948,7 +4209,7 @@ public class RILUtils { +@@ -3958,7 +4219,7 @@ public class RILUtils { */ public static DriverCall convertToDriverCall(android.hardware.radio.voice.Call halCall) { DriverCall dc = new DriverCall(); @@ -5112,7 +5127,7 @@ index 94f2e962ee..5f61159a4e 100644 dc.index = halCall.index; dc.TOA = halCall.toa; dc.isMpty = halCall.isMpty; -@@ -3957,9 +4218,9 @@ public class RILUtils { +@@ -3967,9 +4228,9 @@ public class RILUtils { dc.isVoice = halCall.isVoice; dc.isVoicePrivacy = halCall.isVoicePrivacy; dc.number = halCall.number; @@ -5124,7 +5139,7 @@ index 94f2e962ee..5f61159a4e 100644 if (halCall.uusInfo.length == 1) { dc.uusInfo = new UUSInfo(); dc.uusInfo.setType(halCall.uusInfo[0].uusType); -@@ -3970,7 +4231,7 @@ public class RILUtils { +@@ -3980,7 +4241,7 @@ public class RILUtils { } // Make sure there's a leading + on addresses with a TOA of 145 dc.number = PhoneNumberUtils.stringFromStringAndTOA(dc.number, dc.TOA); @@ -5134,10 +5149,10 @@ index 94f2e962ee..5f61159a4e 100644 return dc; } diff --git a/src/java/com/android/internal/telephony/RadioConfig.java b/src/java/com/android/internal/telephony/RadioConfig.java -index 6bf0203cb8..3e2be1d6ae 100644 +index 13f65028b6..1b8b15628e 100644 --- a/src/java/com/android/internal/telephony/RadioConfig.java +++ b/src/java/com/android/internal/telephony/RadioConfig.java -@@ -61,6 +61,7 @@ public class RadioConfig extends Handler { +@@ -62,6 +62,7 @@ public class RadioConfig extends Handler { static final int EVENT_HIDL_SERVICE_DEAD = 1; static final int EVENT_AIDL_SERVICE_DEAD = 2; static final HalVersion RADIO_CONFIG_HAL_VERSION_UNKNOWN = new HalVersion(-1, -1); @@ -5145,7 +5160,7 @@ index 6bf0203cb8..3e2be1d6ae 100644 static final HalVersion RADIO_CONFIG_HAL_VERSION_1_1 = new HalVersion(1, 1); static final HalVersion RADIO_CONFIG_HAL_VERSION_1_3 = new HalVersion(1, 3); static final HalVersion RADIO_CONFIG_HAL_VERSION_2_0 = new HalVersion(2, 0); -@@ -316,7 +317,13 @@ public class RadioConfig extends Handler { +@@ -319,7 +320,13 @@ public class RadioConfig extends Handler { } if (mRadioConfigProxy.isEmpty()) { @@ -5161,7 +5176,7 @@ index 6bf0203cb8..3e2be1d6ae 100644 if (!mRadioConfigProxy.isEmpty()) { diff --git a/src/java/com/android/internal/telephony/RadioConfigProxy.java b/src/java/com/android/internal/telephony/RadioConfigProxy.java -index 9d05fc5fc3..edeb558b5d 100644 +index b6c6d68470..79f3d70b9e 100644 --- a/src/java/com/android/internal/telephony/RadioConfigProxy.java +++ b/src/java/com/android/internal/telephony/RadioConfigProxy.java @@ -35,7 +35,7 @@ public class RadioConfigProxy { @@ -5221,7 +5236,7 @@ index 9d05fc5fc3..edeb558b5d 100644 RILUtils.convertSlotMappingToList(slotMapping)); } } -@@ -257,13 +265,13 @@ public class RadioConfigProxy { +@@ -267,13 +275,13 @@ public class RadioConfigProxy { private static final String TAG = "RadioConfigHidlSDR"; private final RadioConfig mRadioConfig; diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0007-Fix-signalstrength-for-huawei-kirin-hi6250-hi3670.patch b/patches_treble_td/platform_frameworks_opt_telephony/0007-Fix-signalstrength-for-huawei-kirin-hi6250-hi3670.patch index 4b950d5..91f139a 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0007-Fix-signalstrength-for-huawei-kirin-hi6250-hi3670.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0007-Fix-signalstrength-for-huawei-kirin-hi6250-hi3670.patch @@ -1,4 +1,4 @@ -From 782b6e6c27cf6643bbdb34bea638cb3d61d83e8e Mon Sep 17 00:00:00 2001 +From f0e55afcbac617bc597307e372d7b54959e50b48 Mon Sep 17 00:00:00 2001 From: Raphael Mounier Date: Thu, 6 Oct 2022 08:35:38 +0200 Subject: [PATCH 07/14] Fix signalstrength for huawei kirin (hi6250, hi3670) @@ -21,10 +21,10 @@ Change-Id: I4409683dc7cd9b870237a2939188b71ce94a9fc7 2 files changed, 139 insertions(+), 4 deletions(-) diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java -index 3a8ce141ae..ef6aa6499f 100644 +index 503110ebc6..c857697f9f 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java -@@ -6959,6 +6959,129 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -7003,6 +7003,129 @@ public class RIL extends BaseCommands implements CommandsInterface { new CellSignalStrengthNr()); } diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0008-telephony-forward-port-support-for-forceCognitive.patch b/patches_treble_td/platform_frameworks_opt_telephony/0008-telephony-forward-port-support-for-forceCognitive.patch index 687359a..5905c41 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0008-telephony-forward-port-support-for-forceCognitive.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0008-telephony-forward-port-support-for-forceCognitive.patch @@ -1,4 +1,4 @@ -From ce340db96c0aefab288bfa24d19708822242cb97 Mon Sep 17 00:00:00 2001 +From f34d578f3d838bac61aba3446681d13512c75a05 Mon Sep 17 00:00:00 2001 From: corneranchu Date: Sat, 1 Oct 2022 01:49:58 +0000 Subject: [PATCH 08/14] telephony: forward-port support for forceCognitive diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0009-Fix-NPE-with-1.0-and-1.1-CardStatus.patch b/patches_treble_td/platform_frameworks_opt_telephony/0009-Fix-NPE-with-1.0-and-1.1-CardStatus.patch index 1144ce8..9cf2b74 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0009-Fix-NPE-with-1.0-and-1.1-CardStatus.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0009-Fix-NPE-with-1.0-and-1.1-CardStatus.patch @@ -1,4 +1,4 @@ -From d72c205b31944c8dff5d0e37fe426c63172024f5 Mon Sep 17 00:00:00 2001 +From 6fbbe65a330b07ba88235ced0fe2478fa2d1327e Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Fri, 21 Oct 2022 12:58:04 +0200 Subject: [PATCH 09/14] Fix NPE with 1.0 and 1.1 CardStatus diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0010-When-logging-UiccSlot-ignore-error-if-we-cant-print-.patch b/patches_treble_td/platform_frameworks_opt_telephony/0010-When-logging-UiccSlot-ignore-error-if-we-cant-print-.patch index 67e2a57..5ee5e40 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0010-When-logging-UiccSlot-ignore-error-if-we-cant-print-.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0010-When-logging-UiccSlot-ignore-error-if-we-cant-print-.patch @@ -1,4 +1,4 @@ -From 65f7af2a45f65610888c184b38b8b3e84ced3666 Mon Sep 17 00:00:00 2001 +From c873fccac513afe6a49d522a604607c6348f8043 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 17 Oct 2023 11:08:06 -0400 Subject: [PATCH 10/14] When logging UiccSlot, ignore error if we cant print diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0011-Revert-Removed-IWLAN-legacy-mode-support.patch b/patches_treble_td/platform_frameworks_opt_telephony/0011-Revert-Removed-IWLAN-legacy-mode-support.patch index 7dcfec0..eacd5ed 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0011-Revert-Removed-IWLAN-legacy-mode-support.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0011-Revert-Removed-IWLAN-legacy-mode-support.patch @@ -1,4 +1,4 @@ -From 00950a811708b8d9ed31ff88fad89f2f4cf2fcdc Mon Sep 17 00:00:00 2001 +From 43e368a26ce17bbef64d29ca92ad56d0f387def3 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Fri, 20 Oct 2023 09:11:55 +0000 Subject: [PATCH 11/14] Revert "Removed IWLAN legacy mode support" @@ -14,7 +14,7 @@ Change-Id: I1fd5a803ea3b01f902ff14e1ee6225312b2d3206 4 files changed, 189 insertions(+), 36 deletions(-) diff --git a/src/java/com/android/internal/telephony/ServiceStateTracker.java b/src/java/com/android/internal/telephony/ServiceStateTracker.java -index 3b82adef9c..bc5f7c9116 100644 +index e516c05afd..8ea2c0d198 100644 --- a/src/java/com/android/internal/telephony/ServiceStateTracker.java +++ b/src/java/com/android/internal/telephony/ServiceStateTracker.java @@ -671,7 +671,7 @@ public class ServiceStateTracker extends Handler { @@ -145,7 +145,7 @@ index 3b82adef9c..bc5f7c9116 100644 private void updateNtnCapability() { diff --git a/src/java/com/android/internal/telephony/data/AccessNetworksManager.java b/src/java/com/android/internal/telephony/data/AccessNetworksManager.java -index a657ecd8cf..f9a35b6c94 100644 +index 3d3fbe959c..8ba5581bf6 100644 --- a/src/java/com/android/internal/telephony/data/AccessNetworksManager.java +++ b/src/java/com/android/internal/telephony/data/AccessNetworksManager.java @@ -16,9 +16,12 @@ @@ -222,7 +222,7 @@ index a657ecd8cf..f9a35b6c94 100644 /** Event to guide a transport type for initial data connection of emergency data network. */ private static final int EVENT_GUIDE_TRANSPORT_TYPE_FOR_EMERGENCY = 1; -@@ -389,22 +425,30 @@ public class AccessNetworksManager extends Handler { +@@ -408,22 +444,30 @@ public class AccessNetworksManager extends Handler { Context.CARRIER_CONFIG_SERVICE); mLogTag = "ANM-" + mPhone.getPhoneId(); mApnTypeToQnsChangeNetworkCounter = new SparseArray<>(); @@ -268,7 +268,7 @@ index a657ecd8cf..f9a35b6c94 100644 // Using post to delay the registering because data retry manager and data config // manager instances are created later than access networks manager. -@@ -509,7 +553,8 @@ public class AccessNetworksManager extends Handler { +@@ -528,7 +572,8 @@ public class AccessNetworksManager extends Handler { /** * Get the qualified network service package. * @@ -278,7 +278,7 @@ index a657ecd8cf..f9a35b6c94 100644 */ private String getQualifiedNetworksServicePackageName() { // Read package name from the resource -@@ -598,9 +643,30 @@ public class AccessNetworksManager extends Handler { +@@ -617,9 +662,30 @@ public class AccessNetworksManager extends Handler { } /** @@ -311,7 +311,7 @@ index a657ecd8cf..f9a35b6c94 100644 return mAvailableTransports; } -@@ -635,6 +701,11 @@ public class AccessNetworksManager extends Handler { +@@ -657,6 +723,11 @@ public class AccessNetworksManager extends Handler { * @return The preferred transport. */ public @TransportType int getPreferredTransport(@ApnType int apnType) { @@ -323,7 +323,7 @@ index a657ecd8cf..f9a35b6c94 100644 return mPreferredTransports.get(apnType) == null ? AccessNetworkConstants.TRANSPORT_TYPE_WWAN : mPreferredTransports.get(apnType); } -@@ -737,6 +808,9 @@ public class AccessNetworksManager extends Handler { +@@ -759,6 +830,9 @@ public class AccessNetworksManager extends Handler { } pw.decreaseIndent(); @@ -334,10 +334,10 @@ index a657ecd8cf..f9a35b6c94 100644 pw.increaseIndent(); mLocalLog.dump(fd, pw, args); diff --git a/src/java/com/android/internal/telephony/data/DataNetworkController.java b/src/java/com/android/internal/telephony/data/DataNetworkController.java -index 63fe7e5cdd..3a499c9af5 100644 +index 70d3b23142..fa67c0daf5 100644 --- a/src/java/com/android/internal/telephony/data/DataNetworkController.java +++ b/src/java/com/android/internal/telephony/data/DataNetworkController.java -@@ -1006,10 +1006,12 @@ public class DataNetworkController extends Handler { +@@ -1039,10 +1039,12 @@ public class DataNetworkController extends Handler { mDataServiceManagers.get(AccessNetworkConstants.TRANSPORT_TYPE_WWAN) .registerForServiceBindingChanged(this, EVENT_DATA_SERVICE_BINDING_CHANGED); @@ -355,10 +355,10 @@ index 63fe7e5cdd..3a499c9af5 100644 mPhone.getContext().getSystemService(TelephonyRegistryManager.class) .addOnSubscriptionsChangedListener(new OnSubscriptionsChangedListener() { diff --git a/src/java/com/android/internal/telephony/imsphone/ImsPhone.java b/src/java/com/android/internal/telephony/imsphone/ImsPhone.java -index b21d45da25..8ed3d8433f 100644 +index a6bb1d66f0..2ebaca52ad 100644 --- a/src/java/com/android/internal/telephony/imsphone/ImsPhone.java +++ b/src/java/com/android/internal/telephony/imsphone/ImsPhone.java -@@ -490,7 +490,11 @@ public class ImsPhone extends ImsPhoneBase { +@@ -492,7 +492,11 @@ public class ImsPhone extends ImsPhoneBase { mCT.registerPhoneStateListener(mExternalCallTracker); mExternalCallTracker.setCallPuller(mCT); @@ -371,7 +371,7 @@ index b21d45da25..8ed3d8433f 100644 mPhoneId = mDefaultPhone.getPhoneId(); -@@ -2412,7 +2416,7 @@ public class ImsPhone extends ImsPhoneBase { +@@ -2422,7 +2426,7 @@ public class ImsPhone extends ImsPhoneBase { /** * Update roaming state and WFC mode in the following situations: * 1) voice is in service. @@ -380,7 +380,7 @@ index b21d45da25..8ed3d8433f 100644 * @param ss non-null ServiceState */ private void updateRoamingState(ServiceState ss) { -@@ -2433,7 +2437,15 @@ public class ImsPhone extends ImsPhoneBase { +@@ -2443,7 +2447,15 @@ public class ImsPhone extends ImsPhoneBase { logi("updateRoamingState: we are not IN_SERVICE, ignoring roaming change."); return; } @@ -396,8 +396,8 @@ index b21d45da25..8ed3d8433f 100644 + } if (mCT.getState() == PhoneConstants.State.IDLE) { if (DBG) logd("updateRoamingState now: " + newRoamingState); - mLastKnownRoamingState = newRoamingState; -@@ -2452,6 +2464,30 @@ public class ImsPhone extends ImsPhoneBase { + if (!mFeatureFlags.updateRoamingStateToSetWfcMode()) { +@@ -2467,6 +2479,30 @@ public class ImsPhone extends ImsPhoneBase { } } diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0012-Initialize-Samsung-AIDL-ISehRadioNetwork.-Fixes-5G-o.patch b/patches_treble_td/platform_frameworks_opt_telephony/0012-Initialize-Samsung-AIDL-ISehRadioNetwork.-Fixes-5G-o.patch index 30bd377..cc8abbf 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0012-Initialize-Samsung-AIDL-ISehRadioNetwork.-Fixes-5G-o.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0012-Initialize-Samsung-AIDL-ISehRadioNetwork.-Fixes-5G-o.patch @@ -1,4 +1,4 @@ -From 8fa52ed942a235456b35af8133f41d385a9a9ac0 Mon Sep 17 00:00:00 2001 +From 61c7bac42a783f4e7fc1ef6d6e33a37bd45414d2 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 21 Feb 2024 12:50:28 -0500 Subject: [PATCH 12/14] Initialize Samsung AIDL ISehRadioNetwork. Fixes 5G on @@ -11,10 +11,10 @@ Subject: [PATCH 12/14] Initialize Samsung AIDL ISehRadioNetwork. Fixes 5G on 3 files changed, 144 insertions(+), 2 deletions(-) diff --git a/Android.bp b/Android.bp -index a94ae98208..a0bd665338 100644 +index 331b722ace..6e2c045bd1 100644 --- a/Android.bp +++ b/Android.bp -@@ -91,6 +91,7 @@ java_library { +@@ -90,6 +90,7 @@ java_library { "android.hardware.radio.network-V3-java", "android.hardware.radio.sim-V3-java", "android.hardware.radio.voice-V3-java", @@ -23,10 +23,10 @@ index a94ae98208..a0bd665338 100644 "ims-common", "unsupportedappusage", diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java -index ef6aa6499f..b55a373e11 100644 +index c857697f9f..0514c18e3f 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java -@@ -853,7 +853,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -868,7 +868,7 @@ public class RIL extends BaseCommands implements CommandsInterface { mHalVersion.put(service, ((RadioNetworkProxy) serviceProxy).setAidl( mHalVersion.get(service), android.hardware.radio.network.IRadioNetwork.Stub diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0013-Initialize-Samsung-HIDL-ISehRadio.-Fixes-5G-on-S20-U.patch b/patches_treble_td/platform_frameworks_opt_telephony/0013-Initialize-Samsung-HIDL-ISehRadio.-Fixes-5G-on-S20-U.patch index dfe3523..80c61f3 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0013-Initialize-Samsung-HIDL-ISehRadio.-Fixes-5G-on-S20-U.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0013-Initialize-Samsung-HIDL-ISehRadio.-Fixes-5G-on-S20-U.patch @@ -1,4 +1,4 @@ -From eb64dd5efa54edaa5d7df987c4bf14ec75e6ba4e Mon Sep 17 00:00:00 2001 +From 7aa80f37fe7a8cdbe8f0c7384a152b3624f6b360 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 21 Feb 2024 16:21:51 -0500 Subject: [PATCH 13/14] Initialize Samsung HIDL ISehRadio. Fixes 5G on S20 @@ -12,10 +12,10 @@ Subject: [PATCH 13/14] Initialize Samsung HIDL ISehRadio. Fixes 5G on S20 4 files changed, 127 insertions(+), 4 deletions(-) diff --git a/Android.bp b/Android.bp -index a0bd665338..09857353ca 100644 +index 6e2c045bd1..2370555150 100644 --- a/Android.bp +++ b/Android.bp -@@ -83,6 +83,7 @@ java_library { +@@ -82,6 +82,7 @@ java_library { "android.hardware.radio-V1.4-java", "android.hardware.radio-V1.5-java", "android.hardware.radio-V1.6-java", @@ -24,18 +24,18 @@ index a0bd665338..09857353ca 100644 "android.hardware.radio.data-V3-java", "android.hardware.radio.ims-V2-java", diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java -index b55a373e11..0c60785a81 100644 +index 0514c18e3f..d530d92239 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java -@@ -795,6 +795,7 @@ public class RIL extends BaseCommands implements CommandsInterface { - + HIDL_SERVICE_NAME[mPhoneId] + " is disabled"); +@@ -810,6 +810,7 @@ public class RIL extends BaseCommands implements CommandsInterface { + return null; } else { IBinder binder; + serviceProxy.setServiceName(HIDL_SERVICE_NAME[mPhoneId]); switch (service) { case HAL_SERVICE_DATA: if (mMockModem == null) { -@@ -853,7 +854,7 @@ public class RIL extends BaseCommands implements CommandsInterface { +@@ -868,7 +869,7 @@ public class RIL extends BaseCommands implements CommandsInterface { mHalVersion.put(service, ((RadioNetworkProxy) serviceProxy).setAidl( mHalVersion.get(service), android.hardware.radio.network.IRadioNetwork.Stub diff --git a/patches_treble_td/platform_frameworks_opt_telephony/0014-When-reading-SMSC-ignore-invalid-SMSC.patch b/patches_treble_td/platform_frameworks_opt_telephony/0014-When-reading-SMSC-ignore-invalid-SMSC.patch index 4f6ae6e..1e262a4 100644 --- a/patches_treble_td/platform_frameworks_opt_telephony/0014-When-reading-SMSC-ignore-invalid-SMSC.patch +++ b/patches_treble_td/platform_frameworks_opt_telephony/0014-When-reading-SMSC-ignore-invalid-SMSC.patch @@ -1,4 +1,4 @@ -From 7249a43f8554c53d84c54e096e06c3325fa1a92a Mon Sep 17 00:00:00 2001 +From db43d982a0a90a00c50cdfb324d4d11e6f67a0a7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 25 Feb 2024 10:23:29 -0500 Subject: [PATCH 14/14] When reading SMSC, ignore invalid SMSC diff --git a/patches_treble_td/platform_packages_apps_Settings/0001-Act-as-usb-device-when-there-is-no-hal-but-we-believ.patch b/patches_treble_td/platform_packages_apps_Settings/0001-Act-as-usb-device-when-there-is-no-hal-but-we-believ.patch index ffff523..bdab957 100644 --- a/patches_treble_td/platform_packages_apps_Settings/0001-Act-as-usb-device-when-there-is-no-hal-but-we-believ.patch +++ b/patches_treble_td/platform_packages_apps_Settings/0001-Act-as-usb-device-when-there-is-no-hal-but-we-believ.patch @@ -1,4 +1,4 @@ -From c13057deacc537396b1860e81eaa5bf5aebdc6f5 Mon Sep 17 00:00:00 2001 +From 542fa2e100374cb7a62bd0bc210343e5f2b61788 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 14 Aug 2018 21:48:19 +0200 Subject: [PATCH 1/4] Act as usb device when there is no hal, but we believe we @@ -28,5 +28,5 @@ index 16ea602bc4f..262afbcbb31 100644 UsbPortStatus portStatus = intent.getExtras() .getParcelable(UsbManager.EXTRA_PORT_STATUS); -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_packages_apps_Settings/0002-Ignore-cancelled-fingerprint-events-they-are-expecte.patch b/patches_treble_td/platform_packages_apps_Settings/0002-Ignore-cancelled-fingerprint-events-they-are-expecte.patch index 672fb99..dda3099 100644 --- a/patches_treble_td/platform_packages_apps_Settings/0002-Ignore-cancelled-fingerprint-events-they-are-expecte.patch +++ b/patches_treble_td/platform_packages_apps_Settings/0002-Ignore-cancelled-fingerprint-events-they-are-expecte.patch @@ -1,4 +1,4 @@ -From 5675f8bf2ccab5ff902daf501c6803805f6ee355 Mon Sep 17 00:00:00 2001 +From 3edf9eba347d55299f7f5b2a77442be4a8b384f8 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 2 May 2022 17:44:28 -0400 Subject: [PATCH 2/4] Ignore cancelled fingerprint events, they are expected, @@ -10,10 +10,10 @@ Subject: [PATCH 2/4] Ignore cancelled fingerprint events, they are expected, 2 files changed, 4 insertions(+) diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java -index 6e908850e89..6746a71f3f2 100644 +index f7134fba6e5..a977fda18b5 100644 --- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java +++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java -@@ -793,6 +793,9 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling { +@@ -794,6 +794,9 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling { @Override public void onEnrollmentError(int errMsgId, CharSequence errString) { @@ -24,10 +24,10 @@ index 6e908850e89..6746a71f3f2 100644 dismissTouchDialogIfSfps(); } diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java -index 059173c198e..c89c2d0cfd0 100644 +index 9d4f54f03dd..abd8d0c1f6b 100644 --- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java +++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java -@@ -369,6 +369,7 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements +@@ -386,6 +386,7 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements @Override public void onEnrollmentError(int errMsgId, CharSequence errString) { @@ -36,5 +36,5 @@ index 059173c198e..c89c2d0cfd0 100644 proceedToEnrolling(false /* cancelEnrollment */); } else { -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_packages_apps_Settings/0003-Revert-Wi-Fi-Remove-Do-not-validate-option-in-CA-cer.patch b/patches_treble_td/platform_packages_apps_Settings/0003-Revert-Wi-Fi-Remove-Do-not-validate-option-in-CA-cer.patch index 482e907..3f81027 100644 --- a/patches_treble_td/platform_packages_apps_Settings/0003-Revert-Wi-Fi-Remove-Do-not-validate-option-in-CA-cer.patch +++ b/patches_treble_td/platform_packages_apps_Settings/0003-Revert-Wi-Fi-Remove-Do-not-validate-option-in-CA-cer.patch @@ -1,4 +1,4 @@ -From 0f4e55e82fa46fc1f406483a73bbc2cd77edada1 Mon Sep 17 00:00:00 2001 +From 224c3ced89166fb950f10ac5776a94e972988d1b Mon Sep 17 00:00:00 2001 From: TogoFire Date: Fri, 6 Aug 2021 08:54:07 -0300 Subject: [PATCH 3/4] Revert "[Wi-Fi] Remove 'Do not validate' option in CA @@ -27,10 +27,10 @@ Change-Id: I3cec92b74a419b5463c5e5db496863e66d034703 4 files changed, 62 insertions(+), 20 deletions(-) diff --git a/res/layout/wifi_network_config.xml b/res/layout/wifi_network_config.xml -index 77afedc3042..4e3962c6b94 100644 +index 3de1a38c3ea..5e179d1fc60 100644 --- a/res/layout/wifi_network_config.xml +++ b/res/layout/wifi_network_config.xml -@@ -224,6 +224,18 @@ +@@ -237,6 +237,18 @@ android:entries="@array/eap_ocsp_type"/> @@ -50,10 +50,10 @@ index 77afedc3042..4e3962c6b94 100644 android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/res/values/strings.xml b/res/values/strings.xml -index 630aeed0049..8afb851ad03 100644 +index 61aa1b265e6..c59a4e4e70a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml -@@ -2134,6 +2134,10 @@ +@@ -2231,6 +2231,10 @@ Use system certificates Do not provide @@ -65,10 +65,10 @@ index 630aeed0049..8afb851ad03 100644 Trust on First Use diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java -index d2beec8dedb..4a191fc3497 100644 +index 5d45cb235b8..dc49850e7fa 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java -@@ -166,6 +166,7 @@ public class WifiConfigController implements TextWatcher, +@@ -169,6 +169,7 @@ public class WifiConfigController implements TextWatcher, private String mMultipleCertSetString; private String mUseSystemCertsString; private String mDoNotProvideEapUserCertString; @@ -76,16 +76,16 @@ index d2beec8dedb..4a191fc3497 100644 private Spinner mSecuritySpinner; @VisibleForTesting Spinner mEapMethodSpinner; -@@ -272,6 +273,8 @@ public class WifiConfigController implements TextWatcher, +@@ -275,6 +276,8 @@ public class WifiConfigController implements TextWatcher, mUseSystemCertsString = mContext.getString(R.string.wifi_use_system_certs); mDoNotProvideEapUserCertString = mContext.getString(R.string.wifi_do_not_provide_eap_user_cert); + mDoNotValidateEapServerString = + mContext.getString(R.string.wifi_do_not_validate_eap_server); - mSsidScanButton = (ImageButton) mView.findViewById(R.id.ssid_scanner_button); - mIpSettingsSpinner = (Spinner) mView.findViewById(R.id.ip_settings); -@@ -544,7 +547,8 @@ public class WifiConfigController implements TextWatcher, + if (Flags.androidVWifiApi() && mAccessPointSecurity == WifiEntry.SECURITY_WEP) { + LinearLayout wepWarningLayout = +@@ -553,7 +556,8 @@ public class WifiConfigController implements TextWatcher, // Disallow submit if the user has not selected a CA certificate for an EAP network // configuration. enabled = false; @@ -95,7 +95,7 @@ index d2beec8dedb..4a191fc3497 100644 && mView.findViewById(R.id.l_domain).getVisibility() != View.GONE && TextUtils.isEmpty(mEapDomainView.getText().toString())) { // Disallow submit if the user chooses to use a certificate for EAP server -@@ -566,6 +570,7 @@ public class WifiConfigController implements TextWatcher, +@@ -575,6 +579,7 @@ public class WifiConfigController implements TextWatcher, } void showWarningMessagesIfAppropriate() { @@ -103,7 +103,7 @@ index d2beec8dedb..4a191fc3497 100644 mView.findViewById(R.id.no_user_cert_warning).setVisibility(View.GONE); mView.findViewById(R.id.no_domain_warning).setVisibility(View.GONE); mView.findViewById(R.id.ssid_too_long_warning).setVisibility(View.GONE); -@@ -578,7 +583,13 @@ public class WifiConfigController implements TextWatcher, +@@ -587,7 +592,13 @@ public class WifiConfigController implements TextWatcher, } if (mEapCaCertSpinner != null && mView.findViewById(R.id.l_ca_cert).getVisibility() != View.GONE) { @@ -118,7 +118,7 @@ index d2beec8dedb..4a191fc3497 100644 && mView.findViewById(R.id.l_domain).getVisibility() != View.GONE && TextUtils.isEmpty(mEapDomainView.getText().toString())) { // Display warning if user chooses to use a certificate without restricting the -@@ -722,7 +733,8 @@ public class WifiConfigController implements TextWatcher, +@@ -731,7 +742,8 @@ public class WifiConfigController implements TextWatcher, config.enterpriseConfig.setCaCertificateAliases(null); config.enterpriseConfig.setCaPath(null); config.enterpriseConfig.setDomainSuffixMatch(mEapDomainView.getText().toString()); @@ -128,7 +128,7 @@ index d2beec8dedb..4a191fc3497 100644 // ca_cert already set to null, so do nothing. } else if (caCert.equals(mUseSystemCertsString)) { config.enterpriseConfig.setCaPath(SYSTEM_CA_STORE_PATH); -@@ -756,7 +768,8 @@ public class WifiConfigController implements TextWatcher, +@@ -765,7 +777,8 @@ public class WifiConfigController implements TextWatcher, } // Only set OCSP option if there is a valid CA certificate. @@ -138,7 +138,7 @@ index d2beec8dedb..4a191fc3497 100644 config.enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_NONE); } else { config.enterpriseConfig.setOcsp(mEapOcspSpinner.getSelectedItemPosition()); -@@ -1061,7 +1074,7 @@ public class WifiConfigController implements TextWatcher, +@@ -1070,7 +1083,7 @@ public class WifiConfigController implements TextWatcher, loadCertificates( mEapCaCertSpinner, androidKeystoreAliasLoader.getCaCertAliases(), @@ -147,7 +147,7 @@ index d2beec8dedb..4a191fc3497 100644 false /* showMultipleCerts */, true /* showUsePreinstalledCertOption */); loadCertificates( -@@ -1145,7 +1158,7 @@ public class WifiConfigController implements TextWatcher, +@@ -1154,7 +1167,7 @@ public class WifiConfigController implements TextWatcher, } else { String[] caCerts = enterpriseConfig.getCaCertificateAliases(); if (caCerts == null) { @@ -156,7 +156,7 @@ index d2beec8dedb..4a191fc3497 100644 } else if (caCerts.length == 1) { setSelection(mEapCaCertSpinner, caCerts[0]); } else { -@@ -1156,7 +1169,7 @@ public class WifiConfigController implements TextWatcher, +@@ -1165,7 +1178,7 @@ public class WifiConfigController implements TextWatcher, loadCertificates( mEapCaCertSpinner, androidKeystoreAliasLoader.getCaCertAliases(), @@ -165,7 +165,7 @@ index d2beec8dedb..4a191fc3497 100644 true /* showMultipleCerts */, true /* showUsePreinstalledCertOption */); setSelection(mEapCaCertSpinner, mMultipleCertSetString); -@@ -1289,7 +1302,8 @@ public class WifiConfigController implements TextWatcher, +@@ -1298,7 +1311,8 @@ public class WifiConfigController implements TextWatcher, if (mView.findViewById(R.id.l_ca_cert).getVisibility() != View.GONE) { String eapCertSelection = (String) mEapCaCertSpinner.getSelectedItem(); @@ -175,7 +175,7 @@ index d2beec8dedb..4a191fc3497 100644 // Domain suffix matching is not relevant if the user hasn't chosen a CA // certificate yet, or chooses not to validate the EAP server. setDomainInvisible(); -@@ -1550,8 +1564,7 @@ public class WifiConfigController implements TextWatcher, +@@ -1559,8 +1573,7 @@ public class WifiConfigController implements TextWatcher, }).collect(Collectors.toList())); } @@ -186,10 +186,10 @@ index d2beec8dedb..4a191fc3497 100644 } diff --git a/src/com/android/settings/wifi/WifiConfigController2.java b/src/com/android/settings/wifi/WifiConfigController2.java -index b2353f047f7..a7e71d6d28d 100644 +index d2680c7a58b..1c4c1662577 100644 --- a/src/com/android/settings/wifi/WifiConfigController2.java +++ b/src/com/android/settings/wifi/WifiConfigController2.java -@@ -175,6 +175,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -177,6 +177,7 @@ public class WifiConfigController2 implements TextWatcher, private String mUseSystemCertsString; private String mTrustOnFirstUse; private String mDoNotProvideEapUserCertString; @@ -197,7 +197,7 @@ index b2353f047f7..a7e71d6d28d 100644 @VisibleForTesting String mInstallCertsString; private Spinner mSecuritySpinner; -@@ -285,6 +286,8 @@ public class WifiConfigController2 implements TextWatcher, +@@ -287,6 +288,8 @@ public class WifiConfigController2 implements TextWatcher, mTrustOnFirstUse = mContext.getString(R.string.wifi_trust_on_first_use); mDoNotProvideEapUserCertString = mContext.getString(R.string.wifi_do_not_provide_eap_user_cert); @@ -205,8 +205,8 @@ index b2353f047f7..a7e71d6d28d 100644 + mContext.getString(R.string.wifi_do_not_validate_eap_server); mInstallCertsString = mContext.getString(R.string.wifi_install_credentials); - mSsidScanButton = (ImageButton) mView.findViewById(R.id.ssid_scanner_button); -@@ -544,7 +547,8 @@ public class WifiConfigController2 implements TextWatcher, + if (Flags.androidVWifiApi() && mWifiEntrySecurity == WifiEntry.SECURITY_WEP) { +@@ -552,7 +555,8 @@ public class WifiConfigController2 implements TextWatcher, // Disallow submit if the user has not selected a CA certificate for an EAP network // configuration. enabled = false; @@ -216,7 +216,7 @@ index b2353f047f7..a7e71d6d28d 100644 && mView.findViewById(R.id.l_domain).getVisibility() != View.GONE && TextUtils.isEmpty(mEapDomainView.getText().toString())) { // Disallow submit if the user chooses to use a certificate for EAP server -@@ -566,6 +570,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -574,6 +578,7 @@ public class WifiConfigController2 implements TextWatcher, } void showWarningMessagesIfAppropriate() { @@ -224,7 +224,7 @@ index b2353f047f7..a7e71d6d28d 100644 mView.findViewById(R.id.no_user_cert_warning).setVisibility(View.GONE); mView.findViewById(R.id.no_domain_warning).setVisibility(View.GONE); mView.findViewById(R.id.ssid_too_long_warning).setVisibility(View.GONE); -@@ -578,7 +583,13 @@ public class WifiConfigController2 implements TextWatcher, +@@ -586,7 +591,13 @@ public class WifiConfigController2 implements TextWatcher, } if (mEapCaCertSpinner != null && mView.findViewById(R.id.l_ca_cert).getVisibility() != View.GONE) { @@ -239,7 +239,7 @@ index b2353f047f7..a7e71d6d28d 100644 && mView.findViewById(R.id.l_domain).getVisibility() != View.GONE && TextUtils.isEmpty(mEapDomainView.getText().toString())) { // Display warning if user chooses to use a certificate without restricting the -@@ -735,7 +746,8 @@ public class WifiConfigController2 implements TextWatcher, +@@ -743,7 +754,8 @@ public class WifiConfigController2 implements TextWatcher, config.enterpriseConfig.setCaCertificateAliases(null); config.enterpriseConfig.setCaPath(null); config.enterpriseConfig.setDomainSuffixMatch(mEapDomainView.getText().toString()); @@ -249,7 +249,7 @@ index b2353f047f7..a7e71d6d28d 100644 // ca_cert already set to null, so do nothing. } else if (mIsTrustOnFirstUseSupported && caCert.equals(mTrustOnFirstUse)) { config.enterpriseConfig.enableTrustOnFirstUse(true); -@@ -770,7 +782,8 @@ public class WifiConfigController2 implements TextWatcher, +@@ -778,7 +790,8 @@ public class WifiConfigController2 implements TextWatcher, } // Only set certificate option if there is a valid CA certificate. @@ -259,7 +259,7 @@ index b2353f047f7..a7e71d6d28d 100644 config.enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_NONE); config.enterpriseConfig.setMinimumTlsVersion(WifiEnterpriseConfig.TLS_V1_0); } else { -@@ -1078,7 +1091,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -1086,7 +1099,7 @@ public class WifiConfigController2 implements TextWatcher, loadCertificates( mEapCaCertSpinner, mAndroidKeystoreAliasLoader.getCaCertAliases(), @@ -268,7 +268,7 @@ index b2353f047f7..a7e71d6d28d 100644 false /* showMultipleCerts */, true /* showUsePreinstalledCertOption */); loadCertificates( -@@ -1162,7 +1175,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -1170,7 +1183,7 @@ public class WifiConfigController2 implements TextWatcher, && enterpriseConfig.isTrustOnFirstUseEnabled()) { setSelection(mEapCaCertSpinner, mTrustOnFirstUse); } else { @@ -277,7 +277,7 @@ index b2353f047f7..a7e71d6d28d 100644 } } else if (caCerts.length == 1) { setSelection(mEapCaCertSpinner, caCerts[0]); -@@ -1171,7 +1184,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -1179,7 +1192,7 @@ public class WifiConfigController2 implements TextWatcher, loadCertificates( mEapCaCertSpinner, mAndroidKeystoreAliasLoader.getCaCertAliases(), @@ -286,7 +286,7 @@ index b2353f047f7..a7e71d6d28d 100644 true /* showMultipleCerts */, true /* showUsePreinstalledCertOption */); setSelection(mEapCaCertSpinner, mMultipleCertSetString); -@@ -1313,7 +1326,8 @@ public class WifiConfigController2 implements TextWatcher, +@@ -1321,7 +1334,8 @@ public class WifiConfigController2 implements TextWatcher, String eapCertSelection = (String) mEapCaCertSpinner.getSelectedItem(); if (eapCertSelection.equals(mUnspecifiedCertString) || (mIsTrustOnFirstUseSupported @@ -296,7 +296,7 @@ index b2353f047f7..a7e71d6d28d 100644 setMinTlsVerInvisible(); // Domain suffix matching is not relevant if the user hasn't chosen a CA // certificate yet, or chooses not to validate the EAP server. -@@ -1583,8 +1597,7 @@ public class WifiConfigController2 implements TextWatcher, +@@ -1595,8 +1609,7 @@ public class WifiConfigController2 implements TextWatcher, }).collect(Collectors.toList())); } @@ -307,5 +307,5 @@ index b2353f047f7..a7e71d6d28d 100644 } -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch b/patches_treble_td/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch index dc5921b..c0f7eb1 100644 --- a/patches_treble_td/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch +++ b/patches_treble_td/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch @@ -1,4 +1,4 @@ -From a21bd9df74b600e1bbe6fc04d6aa89e35e4f08a5 Mon Sep 17 00:00:00 2001 +From 1b2e05d8e76585f7dd347c7b307a1a5b5bc08899 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Thu, 2 Nov 2023 10:23:56 +0000 Subject: [PATCH 4/4] Revert "[Wi-Fi] Check if domain field is not empty when @@ -11,10 +11,10 @@ Change-Id: I52ede9eb6b5164e147578e2dc2756cc722fe36ef 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java -index 4a191fc3497..8efc9275a31 100644 +index dc49850e7fa..4d03f9e3d81 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java -@@ -547,11 +547,11 @@ public class WifiConfigController implements TextWatcher, +@@ -556,11 +556,11 @@ public class WifiConfigController implements TextWatcher, // Disallow submit if the user has not selected a CA certificate for an EAP network // configuration. enabled = false; @@ -28,7 +28,7 @@ index 4a191fc3497..8efc9275a31 100644 // validation, but does not provide a domain. enabled = false; } -@@ -588,12 +588,13 @@ public class WifiConfigController implements TextWatcher, +@@ -597,12 +597,13 @@ public class WifiConfigController implements TextWatcher, // Display warning if user chooses not to validate the EAP server with a // user-supplied CA certificate in an EAP network configuration. mView.findViewById(R.id.no_ca_cert_warning).setVisibility(View.VISIBLE); @@ -46,10 +46,10 @@ index 4a191fc3497..8efc9275a31 100644 } } diff --git a/src/com/android/settings/wifi/WifiConfigController2.java b/src/com/android/settings/wifi/WifiConfigController2.java -index a7e71d6d28d..56b166e7931 100644 +index 1c4c1662577..79709d03900 100644 --- a/src/com/android/settings/wifi/WifiConfigController2.java +++ b/src/com/android/settings/wifi/WifiConfigController2.java -@@ -547,11 +547,11 @@ public class WifiConfigController2 implements TextWatcher, +@@ -555,11 +555,11 @@ public class WifiConfigController2 implements TextWatcher, // Disallow submit if the user has not selected a CA certificate for an EAP network // configuration. enabled = false; @@ -63,7 +63,7 @@ index a7e71d6d28d..56b166e7931 100644 // validation, but does not provide a domain. enabled = false; } -@@ -588,12 +588,13 @@ public class WifiConfigController2 implements TextWatcher, +@@ -596,12 +596,13 @@ public class WifiConfigController2 implements TextWatcher, // Display warning if user chooses not to validate the EAP server with a // user-supplied CA certificate in an EAP network configuration. mView.findViewById(R.id.no_ca_cert_warning).setVisibility(View.VISIBLE); @@ -81,5 +81,5 @@ index a7e71d6d28d..56b166e7931 100644 } } -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0001-audio_hal_interface-Optionally-use-sysbta-HAL.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0001-audio_hal_interface-Optionally-use-sysbta-HAL.patch index fd9560e..efa8fe4 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0001-audio_hal_interface-Optionally-use-sysbta-HAL.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0001-audio_hal_interface-Optionally-use-sysbta-HAL.patch @@ -1,4 +1,4 @@ -From 2de85de1dc057fe72e30efad525ac704fc5c164d Mon Sep 17 00:00:00 2001 +From 0b172e212e68b219395ec28373d2f0e4423139a5 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 24 Aug 2022 15:45:18 -0400 Subject: [PATCH 1/7] audio_hal_interface: Optionally use sysbta HAL @@ -13,10 +13,10 @@ Change-Id: I59973e6ec84c5923be8a7c67b36b2e237f000860 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/system/audio_hal_interface/aidl/client_interface_aidl.cc b/system/audio_hal_interface/aidl/client_interface_aidl.cc -index 9faa725022..f6706d98f1 100644 +index 76e8788d02..bde4c4529c 100644 --- a/system/audio_hal_interface/aidl/client_interface_aidl.cc +++ b/system/audio_hal_interface/aidl/client_interface_aidl.cc -@@ -58,7 +58,7 @@ BluetoothAudioClientInterface::BluetoothAudioClientInterface( +@@ -63,7 +63,7 @@ BluetoothAudioClientInterface::BluetoothAudioClientInterface( bool BluetoothAudioClientInterface::is_aidl_available() { return AServiceManager_isDeclared( @@ -25,7 +25,7 @@ index 9faa725022..f6706d98f1 100644 } std::vector -@@ -74,7 +74,7 @@ BluetoothAudioClientInterface::GetAudioCapabilities(SessionType session_type) { +@@ -79,7 +79,7 @@ BluetoothAudioClientInterface::GetAudioCapabilities(SessionType session_type) { } auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( @@ -34,7 +34,7 @@ index 9faa725022..f6706d98f1 100644 if (provider_factory == nullptr) { LOG(ERROR) << __func__ << ", can't get capability from unknown factory"; -@@ -101,7 +101,7 @@ void BluetoothAudioClientInterface::FetchAudioProvider() { +@@ -192,7 +192,7 @@ void BluetoothAudioClientInterface::FetchAudioProvider() { } auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( @@ -44,18 +44,18 @@ index 9faa725022..f6706d98f1 100644 if (provider_factory == nullptr) { LOG(ERROR) << __func__ << ", can't get capability from unknown factory"; diff --git a/system/audio_hal_interface/aidl/client_interface_aidl.h b/system/audio_hal_interface/aidl/client_interface_aidl.h -index 0dd9575acb..d28e8e46fb 100644 +index c191e4054e..99d5192376 100644 --- a/system/audio_hal_interface/aidl/client_interface_aidl.h +++ b/system/audio_hal_interface/aidl/client_interface_aidl.h -@@ -28,6 +28,7 @@ +@@ -27,6 +27,7 @@ + #include "audio_ctrl_ack.h" #include "bluetooth_audio_port_impl.h" - #include "common/message_loop_thread.h" #include "transport_instance.h" +#include "osi/include/properties.h" #define BLUETOOTH_AUDIO_HAL_PROP_DISABLED \ "persist.bluetooth.bluetooth_audio_hal.disabled" -@@ -160,6 +161,12 @@ class BluetoothAudioClientInterface { +@@ -175,6 +176,12 @@ class BluetoothAudioClientInterface { // "android.hardware.bluetooth.audio.IBluetoothAudioProviderFactory/default"; static inline const std::string kDefaultAudioProviderFactoryInterface = std::string() + IBluetoothAudioProviderFactory::descriptor + "/default"; @@ -69,18 +69,18 @@ index 0dd9575acb..d28e8e46fb 100644 private: IBluetoothTransportInstance* transport_; diff --git a/system/audio_hal_interface/hal_version_manager.cc b/system/audio_hal_interface/hal_version_manager.cc -index 275bbb067e..885e34f188 100644 +index 36672cb32c..98f1cdecac 100644 --- a/system/audio_hal_interface/hal_version_manager.cc +++ b/system/audio_hal_interface/hal_version_manager.cc -@@ -25,6 +25,7 @@ - +@@ -26,6 +26,7 @@ #include "aidl/audio_aidl_interfaces.h" - #include "osi/include/log.h" + #include "include/check.h" + #include "os/log.h" +#include "osi/include/properties.h" namespace bluetooth { namespace audio { -@@ -34,6 +35,12 @@ using ::aidl::android::hardware::bluetooth::audio:: +@@ -35,6 +36,12 @@ using ::aidl::android::hardware::bluetooth::audio:: static const std::string kDefaultAudioProviderFactoryInterface = std::string() + IBluetoothAudioProviderFactory::descriptor + "/default"; @@ -91,18 +91,18 @@ index 275bbb067e..885e34f188 100644 + ? kSystemAudioProviderFactoryInterface : kDefaultAudioProviderFactoryInterface; +} - std::unique_ptr HalVersionManager::instance_ptr = - std::make_unique(); -@@ -88,7 +95,7 @@ BluetoothAudioHalVersion GetAidlInterfaceVersion() { + std::string toString(BluetoothAudioHalTransport transport) { + switch (transport) { +@@ -76,7 +83,7 @@ BluetoothAudioHalVersion GetAidlInterfaceVersion() { + int version = 0; + auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( + ::ndk::SpAIBinder(AServiceManager_waitForService( +- kDefaultAudioProviderFactoryInterface.c_str()))); ++ audioProviderFactoryInterface().c_str()))); - auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( - ::ndk::SpAIBinder(AServiceManager_waitForService( -- kDefaultAudioProviderFactoryInterface.c_str()))); -+ audioProviderFactoryInterface().c_str()))); - - if (provider_factory == nullptr) { - LOG_ERROR("Can't get aidl version from unknown factory"); -@@ -122,7 +129,7 @@ BluetoothAudioHalVersion GetAidlInterfaceVersion() { + if (provider_factory == nullptr) { + LOG_ERROR( +@@ -146,7 +153,7 @@ HalVersionManager::GetProvidersFactory_2_0() { HalVersionManager::HalVersionManager() { hal_transport_ = BluetoothAudioHalTransport::UNKNOWN; if (AServiceManager_checkService( diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0002-Add-option-to-change-eSCO-Transport-Unit-Size.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0002-Add-option-to-change-eSCO-Transport-Unit-Size.patch index c981200..fee7fe4 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0002-Add-option-to-change-eSCO-Transport-Unit-Size.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0002-Add-option-to-change-eSCO-Transport-Unit-Size.patch @@ -1,4 +1,4 @@ -From 88705e8292e41191c83e04e3b9598eb6cad39d82 Mon Sep 17 00:00:00 2001 +From de841af176614fd7561763c4d810b494ad025374 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Thu, 17 Jun 2021 15:48:53 +0100 Subject: [PATCH 2/7] Add option to change eSCO Transport Unit Size @@ -15,11 +15,11 @@ Change-Id: I3e5897c2ce983042b9a4bef9def6744ba4253bcb 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/device/src/esco_parameters.cc b/system/device/src/esco_parameters.cc -index 684450a80b..5bf31289bc 100644 +index 15f1397087..21590782a6 100644 --- a/system/device/src/esco_parameters.cc +++ b/system/device/src/esco_parameters.cc @@ -25,7 +25,8 @@ - #include "hci/controller.h" + #include "hci/controller_interface.h" #include "main/shim/entry.h" -static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = { diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0003-Don-t-abort-when-failing-to-get-real-time-priority.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0003-Don-t-abort-when-failing-to-get-real-time-priority.patch index 8c35b98..0f2261b 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0003-Don-t-abort-when-failing-to-get-real-time-priority.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0003-Don-t-abort-when-failing-to-get-real-time-priority.patch @@ -1,4 +1,4 @@ -From 4418924b219da6f93cdcb81a4f577e6794f6947a Mon Sep 17 00:00:00 2001 +From fddb0d3f3d83592a5ab25c8046aad84584d712ad Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 17 Oct 2021 17:17:13 -0400 Subject: [PATCH 3/7] Don't abort when failing to get real-time priority @@ -19,28 +19,28 @@ Change-Id: Id25dac186628e933185bdfd640498004459b375a 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/system/btif/src/btif_a2dp_sink.cc b/system/btif/src/btif_a2dp_sink.cc -index be2098788e..4da1dcf449 100644 +index 8e0083b014..0f6369e205 100644 --- a/system/btif/src/btif_a2dp_sink.cc +++ b/system/btif/src/btif_a2dp_sink.cc -@@ -196,7 +196,7 @@ bool btif_a2dp_sink_init() { +@@ -197,7 +197,7 @@ bool btif_a2dp_sink_init() { /* Schedule the rest of the operations */ if (!btif_a2dp_sink_cb.worker_thread.EnableRealTimeScheduling()) { #if defined(__ANDROID__) -- LOG(FATAL) << __func__ -+ LOG(ERROR) << __func__ - << ": Failed to increase A2DP decoder thread priority"; +- log::fatal("Failed to increase A2DP decoder thread priority"); ++ log::error("Failed to increase A2DP decoder thread priority"); #endif } + btif_a2dp_sink_cb.worker_thread.DoInThread( diff --git a/system/btif/src/btif_a2dp_source.cc b/system/btif/src/btif_a2dp_source.cc -index c0cb38fd08..63eca47dbf 100644 +index 6b6555ec88..2dcf06dd3e 100644 --- a/system/btif/src/btif_a2dp_source.cc +++ b/system/btif/src/btif_a2dp_source.cc -@@ -367,7 +367,7 @@ static void btif_a2dp_source_startup_delayed() { - LOG_INFO("%s: state=%s", __func__, btif_a2dp_source_cb.StateStr().c_str()); +@@ -374,7 +374,7 @@ static void btif_a2dp_source_startup_delayed() { + log::info("state={}", btif_a2dp_source_cb.StateStr()); if (!btif_a2dp_source_thread.EnableRealTimeScheduling()) { #if defined(__ANDROID__) -- LOG(FATAL) << __func__ << ": unable to enable real time scheduling"; -+ LOG(ERROR) << __func__ << ": unable to enable real time scheduling"; +- log::fatal("unable to enable real time scheduling"); ++ log::error("unable to enable real time scheduling"); #endif } if (!bluetooth::audio::a2dp::init(&btif_a2dp_source_thread)) { @@ -68,17 +68,17 @@ index 408f4f3bee..4b48be24c7 100644 strerror(errno)); if (clock_id == CLOCK_BOOTTIME_ALARM) { diff --git a/system/stack/btu/main_thread.cc b/system/stack/btu/main_thread.cc -index b41a56bcfb..e4f5ba2255 100644 +index a2cdd7bac6..045cbc3cbd 100644 --- a/system/stack/btu/main_thread.cc +++ b/system/stack/btu/main_thread.cc -@@ -69,7 +69,7 @@ void main_thread_start_up() { +@@ -71,7 +71,7 @@ void main_thread_start_up() { } if (!main_thread.EnableRealTimeScheduling()) { #if defined(__ANDROID__) -- LOG(FATAL) << __func__ << ": unable to enable real time scheduling"; -+ LOG(ERROR) << __func__ << ": unable to enable real time scheduling"; +- log::fatal("unable to enable real time scheduling"); ++ log::error("unable to enable real time scheduling"); #else - LOG(ERROR) << __func__ << ": unable to enable real time scheduling"; + log::error("unable to enable real time scheduling"); #endif -- 2.34.1 diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0004-On-Samsung-devices-we-need-to-tell-Audio-HAL-if-we-r.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0004-On-Samsung-devices-we-need-to-tell-Audio-HAL-if-we-r.patch index 1f1a45d..7286b51 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0004-On-Samsung-devices-we-need-to-tell-Audio-HAL-if-we-r.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0004-On-Samsung-devices-we-need-to-tell-Audio-HAL-if-we-r.patch @@ -1,4 +1,4 @@ -From 2440e9e24f1e90697f4519ec1f95922a1858902e Mon Sep 17 00:00:00 2001 +From ddea50614fa341b162c7396e8f21dc0ddf264aba Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 12 Nov 2022 00:35:46 +0000 Subject: [PATCH 4/7] On Samsung devices, we need to tell Audio HAL if we're @@ -12,10 +12,10 @@ Change-Id: I7802b7a29c017a2cd7018e82772183df1dfa0b89 1 file changed, 8 insertions(+) diff --git a/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java b/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java -index 29856803a8..0a22818d31 100644 +index 38db4dc656..f764f6aa9d 100644 --- a/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +++ b/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java -@@ -156,6 +156,7 @@ public class HeadsetStateMachine extends StateMachine { +@@ -158,6 +158,7 @@ public class HeadsetStateMachine extends StateMachine { private boolean mHasWbsEnabled = false; private boolean mHasSwbLc3Enabled = false; private boolean mHasSwbAptXEnabled = false; @@ -23,7 +23,7 @@ index 29856803a8..0a22818d31 100644 // AT Phone book keeps a group of states used by AT+CPBR commands @VisibleForTesting final AtPhonebook mPhonebook; -@@ -268,6 +269,7 @@ public class HeadsetStateMachine extends StateMachine { +@@ -277,6 +278,7 @@ public class HeadsetStateMachine extends StateMachine { mHasNrecEnabled = false; mHasSwbLc3Enabled = false; mHasSwbAptXEnabled = false; @@ -31,7 +31,7 @@ index 29856803a8..0a22818d31 100644 } public void dump(StringBuilder sb) { -@@ -502,6 +504,7 @@ public class HeadsetStateMachine extends StateMachine { +@@ -518,6 +520,7 @@ public class HeadsetStateMachine extends StateMachine { mHasSwbLc3Enabled = false; mHasNrecEnabled = false; mHasSwbAptXEnabled = false; @@ -39,9 +39,9 @@ index 29856803a8..0a22818d31 100644 broadcastStateTransitions(); logFailureIfNeeded(); -@@ -1680,6 +1683,9 @@ public class HeadsetStateMachine extends StateMachine { - /* AptX bt_swb: 0 -> on, 65535 -> off */ - am.setParameters("bt_swb=" + (mHasSwbAptXEnabled ? "0" : "65535")); +@@ -1704,6 +1707,9 @@ public class HeadsetStateMachine extends StateMachine { + am.setParameters("bt_swb=" + (mHasSwbAptXEnabled ? "0" : "65535")); + } am.setBluetoothHeadsetProperties(getCurrentDeviceName(), mHasNrecEnabled, mHasWbsEnabled); + if (mReportScoSampleRate > 0) { + am.setParameters("g_sco_samplerate=" + mReportScoSampleRate); @@ -49,7 +49,7 @@ index 29856803a8..0a22818d31 100644 } @VisibleForTesting -@@ -1823,10 +1829,12 @@ public class HeadsetStateMachine extends StateMachine { +@@ -1847,10 +1853,12 @@ public class HeadsetStateMachine extends StateMachine { switch (wbsConfig) { case HeadsetHalConstants.BTHF_WBS_YES: mHasWbsEnabled = true; diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0005-Add-properties-to-disable-some-features-commands-sta.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0005-Add-properties-to-disable-some-features-commands-sta.patch index 55eef97..c17af3d 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0005-Add-properties-to-disable-some-features-commands-sta.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0005-Add-properties-to-disable-some-features-commands-sta.patch @@ -1,4 +1,4 @@ -From 95cbce50012388d50ba86146ffc2810a73a5b41f Mon Sep 17 00:00:00 2001 +From 41748592a70872b048f40186a946909f23b61c71 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 27 May 2023 06:41:32 -0400 Subject: [PATCH 5/7] Add properties to disable some features/commands/states @@ -9,18 +9,18 @@ Subject: [PATCH 5/7] Add properties to disable some features/commands/states 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc -index be068bdbd3..645c74e868 100644 +index a6c16a9061..237dbe6b93 100644 --- a/system/gd/hci/controller.cc +++ b/system/gd/hci/controller.cc -@@ -16,6 +16,7 @@ +@@ -18,6 +18,7 @@ - #include "hci/controller.h" + #include +#include #include #include #include -@@ -29,6 +30,7 @@ +@@ -33,6 +34,7 @@ #include "os/metrics.h" #include "os/system_properties.h" #include "sysprops/sysprops_module.h" @@ -28,7 +28,7 @@ index be068bdbd3..645c74e868 100644 namespace bluetooth { namespace hci { -@@ -302,7 +304,23 @@ struct Controller::impl { +@@ -313,7 +315,23 @@ struct Controller::impl { ASSERT(complete_view.IsValid()); ErrorCode status = complete_view.GetStatus(); ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); @@ -53,7 +53,7 @@ index be068bdbd3..645c74e868 100644 } void read_local_extended_features_complete_handler(std::promise promise, CommandCompleteView view) { -@@ -311,7 +329,25 @@ struct Controller::impl { +@@ -322,7 +340,25 @@ struct Controller::impl { ErrorCode status = complete_view.GetStatus(); ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); uint8_t page_number = complete_view.GetPageNumber(); @@ -80,7 +80,7 @@ index be068bdbd3..645c74e868 100644 bluetooth::os::LogMetricBluetoothLocalSupportedFeatures(page_number, complete_view.GetExtendedLmpFeatures()); // Query all extended features if (page_number < complete_view.GetMaximumPageNumber()) { -@@ -464,7 +500,21 @@ struct Controller::impl { +@@ -475,7 +511,21 @@ struct Controller::impl { ASSERT(complete_view.IsValid()); ErrorCode status = complete_view.GetStatus(); ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); @@ -103,7 +103,7 @@ index be068bdbd3..645c74e868 100644 } void le_read_supported_states_handler(CommandCompleteView view) { -@@ -472,7 +522,21 @@ struct Controller::impl { +@@ -483,7 +533,21 @@ struct Controller::impl { ASSERT(complete_view.IsValid()); ErrorCode status = complete_view.GetStatus(); ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); @@ -125,7 +125,7 @@ index be068bdbd3..645c74e868 100644 + le_supported_states_ = local_states; } - void le_read_connect_list_size_handler(CommandCompleteView view) { + void le_read_accept_list_size_handler(CommandCompleteView view) { -- 2.34.1 diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0006-Add-a-property-to-cap-declared-le-vendor-version.-Fo.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0006-Add-a-property-to-cap-declared-le-vendor-version.-Fo.patch index 1c7ec24..5e9bdee 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0006-Add-a-property-to-cap-declared-le-vendor-version.-Fo.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0006-Add-a-property-to-cap-declared-le-vendor-version.-Fo.patch @@ -1,56 +1,58 @@ -From edc37e8d98bd9f122737509acc77b899ee441cad Mon Sep 17 00:00:00 2001 +From 8b967646bace954b92141d3d67ca95f8cf8ac606 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 30 May 2023 17:34:03 -0400 Subject: [PATCH 6/7] Add a property to cap declared le vendor version. Found needed on unisoc --- - system/gd/hci/controller.cc | 11 +++++++++++ - 1 file changed, 11 insertions(+) + system/gd/hci/controller.cc | 13 +++++++++++++ + 1 file changed, 13 insertions(+) diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc -index 645c74e868..ffc2b149fe 100644 +index 237dbe6b93..ce1b46c3bb 100644 --- a/system/gd/hci/controller.cc +++ b/system/gd/hci/controller.cc -@@ -618,6 +618,13 @@ struct Controller::impl { - if (complete_view.IsValid()) { - vendor_capabilities_.is_supported_ = 0x01; +@@ -634,6 +634,13 @@ struct Controller::impl { + } + vendor_capabilities_.is_supported_ = 0x01; -+ int vendor_cap_max = 0xffff; -+ std::string vendor_cap_max_prop = GetSystemProperty("persist.sys.bt.max_vendor_cap").value_or(""); -+ if (vendor_cap_max_prop != "") { -+ vendor_cap_max = std::stoi(vendor_cap_max_prop); -+ } -+ if (vendor_cap_max < 55) return; ++ int vendor_cap_max = 0xffff; ++ std::string vendor_cap_max_prop = GetSystemProperty("persist.sys.bt.max_vendor_cap").value_or(""); ++ if (vendor_cap_max_prop != "") { ++ vendor_cap_max = std::stoi(vendor_cap_max_prop); ++ } ++ if (vendor_cap_max < 55) return; + - // v0.55 - BaseVendorCapabilities base_vendor_capabilities = complete_view.GetBaseVendorCapabilities(); - vendor_capabilities_.max_advt_instances_ = base_vendor_capabilities.max_advt_instances_; -@@ -633,6 +640,8 @@ struct Controller::impl { - return; - } + // v0.55 + BaseVendorCapabilities base_vendor_capabilities = complete_view.GetBaseVendorCapabilities(); + vendor_capabilities_.max_advt_instances_ = base_vendor_capabilities.max_advt_instances_; +@@ -653,6 +660,8 @@ struct Controller::impl { + return; + } -+ if (vendor_cap_max < 95) return; ++ if (vendor_cap_max < 95) return; + - // v0.95 - auto v95 = LeGetVendorCapabilitiesComplete095View::Create(complete_view); - if (!v95.IsValid()) { -@@ -647,6 +656,7 @@ struct Controller::impl { - return; - } + // v0.95 + auto v95 = LeGetVendorCapabilitiesComplete095View::Create(complete_view); + if (!v95.IsValid()) { +@@ -669,6 +678,8 @@ struct Controller::impl { + return; + } -+ if (vendor_cap_max < 96) return; - // v0.96 - auto v96 = LeGetVendorCapabilitiesComplete096View::Create(v95); - if (!v96.IsValid()) { -@@ -658,6 +668,7 @@ struct Controller::impl { - return; - } ++ if (vendor_cap_max < 96) return; ++ + // v0.96 + auto v96 = LeGetVendorCapabilitiesComplete096View::Create(v95); + if (!v96.IsValid()) { +@@ -683,6 +694,8 @@ struct Controller::impl { + return; + } -+ if (vendor_cap_max < 98) return; - // v0.98 - auto v98 = LeGetVendorCapabilitiesComplete098View::Create(v96); - if (!v98.IsValid()) { ++ if (vendor_cap_max < 98) return; ++ + // v0.98 + auto v98 = LeGetVendorCapabilitiesComplete098View::Create(v96); + if (!v98.IsValid()) { -- 2.34.1 diff --git a/patches_treble_td/platform_packages_modules_Bluetooth/0007-gd-hci-Ignore-command-READ_REMOTE_VERSION_INFORMATIO.patch b/patches_treble_td/platform_packages_modules_Bluetooth/0007-gd-hci-Ignore-command-READ_REMOTE_VERSION_INFORMATIO.patch index f5e4302..e23443b 100644 --- a/patches_treble_td/platform_packages_modules_Bluetooth/0007-gd-hci-Ignore-command-READ_REMOTE_VERSION_INFORMATIO.patch +++ b/patches_treble_td/platform_packages_modules_Bluetooth/0007-gd-hci-Ignore-command-READ_REMOTE_VERSION_INFORMATIO.patch @@ -1,4 +1,4 @@ -From ec9504dd0d6a7ded46b0f3676e548391fee6fbc0 Mon Sep 17 00:00:00 2001 +From 11c870b2c1e73411d65fb7df7da9804a9bc79195 Mon Sep 17 00:00:00 2001 From: wbs306 Date: Fri, 20 Jan 2023 17:07:41 +0800 Subject: [PATCH 7/7] gd: hci: Ignore command READ_REMOTE_VERSION_INFORMATION @@ -14,10 +14,10 @@ It means this command isn't in the command_queue_, we can just ignore it. 1 file changed, 4 insertions(+) diff --git a/system/gd/hci/hci_layer.cc b/system/gd/hci/hci_layer.cc -index 0b61fd4a4a..eecdf092e7 100644 +index d91bb1480d..b1b72b5d9e 100644 --- a/system/gd/hci/hci_layer.cc +++ b/system/gd/hci/hci_layer.cc -@@ -362,6 +362,10 @@ struct HciLayer::impl { +@@ -390,6 +390,10 @@ struct HciLayer::impl { auto view = CommandStatusView::Create(event); ASSERT(view.IsValid()); auto op_code = view.GetCommandOpCode(); diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0001-Allow-failing-to-load-bpf-programs-for-BPF-less-devi.patch b/patches_treble_td/platform_packages_modules_Connectivity/0001-Allow-failing-to-load-bpf-programs-for-BPF-less-devi.patch index 1016519..2f798a7 100644 --- a/patches_treble_td/platform_packages_modules_Connectivity/0001-Allow-failing-to-load-bpf-programs-for-BPF-less-devi.patch +++ b/patches_treble_td/platform_packages_modules_Connectivity/0001-Allow-failing-to-load-bpf-programs-for-BPF-less-devi.patch @@ -1,4 +1,4 @@ -From 74130e716bea3cd9b49e755976d51a5321c7fa4f Mon Sep 17 00:00:00 2001 +From d61fb703e74b46875e1100b643b03b0452341a54 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 26 Oct 2022 18:10:04 -0400 Subject: [PATCH 1/6] Allow failing to load bpf programs, for BPF-less devices diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0002-Support-non-working-BPF-maps-on-old-BPF-less-kernel.patch b/patches_treble_td/platform_packages_modules_Connectivity/0002-Support-non-working-BPF-maps-on-old-BPF-less-kernel.patch index c117a8f..d682a5b 100644 --- a/patches_treble_td/platform_packages_modules_Connectivity/0002-Support-non-working-BPF-maps-on-old-BPF-less-kernel.patch +++ b/patches_treble_td/platform_packages_modules_Connectivity/0002-Support-non-working-BPF-maps-on-old-BPF-less-kernel.patch @@ -1,16 +1,16 @@ -From 6537a2a2a0c62fb9bd45d517372eaaa2e6e94d3f Mon Sep 17 00:00:00 2001 +From a68946abc0fed8dd316d509075fc6256c356f45f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 26 Oct 2022 18:11:10 -0400 Subject: [PATCH 2/6] Support non-working BPF maps on old BPF-less kernel --- - .../src/android/net/BpfNetMapsReader.java | 13 ++++++-- - netbpfload/NetBpfLoad.cpp | 30 ++++++++----------- + .../src/android/net/BpfNetMapsReader.java | 13 +++++-- + netbpfload/NetBpfLoad.cpp | 32 +++++++-------- .../libs/libnetworkstats/BpfNetworkStats.cpp | 1 + - .../server/net/NetworkStatsService.java | 29 ++++++++++-------- - .../src/com/android/server/BpfNetMaps.java | 14 +++++++-- - .../native/bpf_headers/include/bpf/BpfMap.h | 21 +++++++------ - 6 files changed, 65 insertions(+), 43 deletions(-) + .../server/net/NetworkStatsService.java | 29 ++++++++------ + .../src/com/android/server/BpfNetMaps.java | 39 ++++++++++++++++++- + .../native/bpf_headers/include/bpf/BpfMap.h | 21 +++++----- + 6 files changed, 91 insertions(+), 44 deletions(-) diff --git a/framework/src/android/net/BpfNetMapsReader.java b/framework/src/android/net/BpfNetMapsReader.java index ee422abd9c..d31024c686 100644 @@ -79,22 +79,37 @@ index ee422abd9c..d31024c686 100644 return mDataSaverEnabledMap.getValue(DATA_SAVER_ENABLED_KEY).val == DATA_SAVER_ENABLED; } catch (ErrnoException e) { diff --git a/netbpfload/NetBpfLoad.cpp b/netbpfload/NetBpfLoad.cpp -index 236adde3da..2e4e6fae6f 100644 +index 8af4dd49a7..2953859760 100644 --- a/netbpfload/NetBpfLoad.cpp +++ b/netbpfload/NetBpfLoad.cpp -@@ -175,9 +175,11 @@ int main(int argc, char** argv, char * const envp[]) { - - const int device_api_level = android_get_device_api_level(); +@@ -242,6 +242,7 @@ int main(int argc, char** argv, char * const envp[]) { + const bool isAtLeastT = (device_api_level >= __ANDROID_API_T__); const bool isAtLeastU = (device_api_level >= __ANDROID_API_U__); + const bool isAtLeastV = (device_api_level >= __ANDROID_API_V__); + bool failed = false; - if (!android::bpf::isAtLeastKernelVersion(4, 19, 0)) { - ALOGW("Android U QPR2 requires kernel 4.19."); + // last in U QPR2 beta1 + const bool has_platform_bpfloader_rc = exists("/system/etc/init/bpfloader.rc"); +@@ -290,15 +291,17 @@ int main(int argc, char** argv, char * const envp[]) { + + if (isAtLeastT && !android::bpf::isAtLeastKernelVersion(4, 9, 0)) { + ALOGW("Android T requires kernel 4.9."); + failed = true; } - if (android::bpf::isUserspace32bit() && android::bpf::isAtLeastKernelVersion(6, 2, 0)) { -@@ -201,14 +203,14 @@ int main(int argc, char** argv, char * const envp[]) { + if (isAtLeastU && !android::bpf::isAtLeastKernelVersion(4, 14, 0)) { + ALOGW("Android U requires kernel 4.14."); ++ failed = true; + } + + if (isAtLeastV && !android::bpf::isAtLeastKernelVersion(4, 19, 0)) { + ALOGE("Android V requires kernel 4.19."); +- return 1; ++ failed = true; + } + + if (isAtLeastV && android::bpf::isX86() && !android::bpf::isKernel64Bit()) { +@@ -327,14 +330,14 @@ int main(int argc, char** argv, char * const envp[]) { * and 32-bit userspace on 64-bit kernel bpf ringbuffer compatibility is broken. */ ALOGE("64-bit userspace required on 6.2+ kernels."); @@ -111,14 +126,7 @@ index 236adde3da..2e4e6fae6f 100644 } if (isAtLeastU) { -@@ -240,31 +242,25 @@ int main(int argc, char** argv, char * const envp[]) { - // which could otherwise fail with ENOENT during object pinning or renaming, - // due to ordering issues) - for (const auto& location : locations) { -- if (createSysFsBpfSubDir(location.prefix)) return 1; -+ if (createSysFsBpfSubDir(location.prefix)) failed = true; - } - +@@ -379,24 +382,17 @@ int main(int argc, char** argv, char * const envp[]) { // Load all ELF objects, create programs and maps, and pin them for (const auto& location : locations) { if (loadAllElfObjects(location) != 0) { @@ -140,23 +148,22 @@ index 236adde3da..2e4e6fae6f 100644 - if (android::bpf::writeToMapEntry(map, &key, &value, BPF_ANY)) { - ALOGE("Critical kernel bug - failure to write into index 1 of 2 element bpf map array."); - return 1; +- } + if (failed) { + ALOGE("=== CRITICAL FAILURE LOADING BPF PROGRAMS ==="); + ALOGE("If this triggers reliably, you're probably missing kernel options or patches."); + ALOGE("If this triggers randomly, you might be hitting some memory allocation " + "problems or startup script race."); + ALOGE("--- DO NOT EXPECT SYSTEM TO BOOT SUCCESSFULLY ---"); - } ++ } -+ ALOGI("done, transferring control to platform bpfloader."); - const char * args[] = { "/system/bin/bpfloader", NULL, }; diff --git a/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp b/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp -index 31013972b8..8d6994818b 100644 +index d3e331ec81..541b8c8f01 100644 --- a/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp +++ b/service-t/native/libs/libnetworkstats/BpfNetworkStats.cpp -@@ -170,6 +170,7 @@ int parseBpfNetworkStatsDetail(std::vector* lines) { +@@ -195,6 +195,7 @@ int parseBpfNetworkStatsDetail(std::vector* lines) { static BpfMapRO configurationMap(CONFIGURATION_MAP_PATH); static BpfMap statsMapA(STATS_MAP_A_PATH); static BpfMap statsMapB(STATS_MAP_B_PATH); @@ -165,10 +172,10 @@ index 31013972b8..8d6994818b 100644 if (!configuration.ok()) { ALOGE("Cannot read the old configuration from map: %s", diff --git a/service-t/src/com/android/server/net/NetworkStatsService.java b/service-t/src/com/android/server/net/NetworkStatsService.java -index 2c9f30c8f7..5471624368 100644 +index f7f133c5a1..90cc39040a 100644 --- a/service-t/src/com/android/server/net/NetworkStatsService.java +++ b/service-t/src/com/android/server/net/NetworkStatsService.java -@@ -427,12 +427,12 @@ public class NetworkStatsService extends INetworkStatsService.Stub { +@@ -433,12 +433,12 @@ public class NetworkStatsService extends INetworkStatsService.Stub { * mActiveUidCounterSet to avoid accessing kernel too frequently. */ private SparseIntArray mActiveUidCounterSet = new SparseIntArray(); @@ -187,10 +194,10 @@ index 2c9f30c8f7..5471624368 100644 /** Data layer operation counters for splicing into other structures. */ private NetworkStats mUidOperations = new NetworkStats(0L, 10); -@@ -621,12 +621,16 @@ public class NetworkStatsService extends INetworkStatsService.Stub { +@@ -629,12 +629,16 @@ public class NetworkStatsService extends INetworkStatsService.Stub { + mNetworkStatsSubscriptionsMonitor); mLocationPermissionChecker = mDeps.makeLocationPermissionChecker(mContext); - mInterfaceMapUpdater = mDeps.makeBpfInterfaceMapUpdater(mContext, mHandler); - mInterfaceMapUpdater.start(); + mInterfaceMapHelper = mDeps.makeBpfInterfaceMapHelper(); - mUidCounterSetMap = mDeps.getUidCounterSetMap(); - mCookieTagMap = mDeps.getCookieTagMap(); - mStatsMapA = mDeps.getStatsMapA(); @@ -210,7 +217,7 @@ index 2c9f30c8f7..5471624368 100644 // To prevent any possible races, the flag is not allowed to change until rebooting. mSupportEventLogger = mDeps.supportEventLogger(mContext); if (mSupportEventLogger) { -@@ -2450,6 +2454,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { +@@ -2584,6 +2588,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { * @param uid */ private void deleteKernelTagData(int uid) { @@ -219,13 +226,13 @@ index 2c9f30c8f7..5471624368 100644 mCookieTagMap.forEach((key, value) -> { // If SkDestroyListener deletes the socket tag while this code is running, diff --git a/service/src/com/android/server/BpfNetMaps.java b/service/src/com/android/server/BpfNetMaps.java -index ad9cfbe10e..9b2202b295 100644 +index a7fddd08f0..833a6a9a5a 100644 --- a/service/src/com/android/server/BpfNetMaps.java +++ b/service/src/com/android/server/BpfNetMaps.java -@@ -358,7 +358,11 @@ public class BpfNetMaps { +@@ -366,7 +366,11 @@ public class BpfNetMaps { @VisibleForTesting public BpfNetMaps(final Context context, final INetd netd, final Dependencies deps) { - if (!PRE_T) { + if (SdkLevel.isAtLeastT()) { - ensureInitialized(context); + try { + ensureInitialized(context); @@ -235,7 +242,53 @@ index ad9cfbe10e..9b2202b295 100644 } mNetd = netd; mDeps = deps; -@@ -794,6 +798,8 @@ public class BpfNetMaps { +@@ -385,6 +389,8 @@ public class BpfNetMaps { + } + + private void removeRule(final int uid, final long match, final String caller) { ++ if (sUidOwnerMap == null) return; ++ + try { + synchronized (sUidOwnerMap) { + final UidOwnerValue oldMatch = sUidOwnerMap.getValue(new S32(uid)); +@@ -412,6 +418,8 @@ public class BpfNetMaps { + } + + private void addRule(final int uid, final long match, final int iif, final String caller) { ++ if (sUidOwnerMap == null) return; ++ + if (match != IIF_MATCH && iif != 0) { + throw new ServiceSpecificException(EINVAL, + "Non-interface match must have zero interface index"); +@@ -514,6 +522,8 @@ public class BpfNetMaps { + public void setChildChain(final int childChain, final boolean enable) { + throwIfPreT("setChildChain is not available on pre-T devices"); + ++ if (sConfigurationMap == null) return; ++ + final long match = getMatchByFirewallChain(childChain); + try { + synchronized (sUidRulesConfigBpfMapLock) { +@@ -566,6 +576,8 @@ public class BpfNetMaps { + public void replaceUidChain(final int chain, final int[] uids) { + throwIfPreT("replaceUidChain is not available on pre-T devices"); + ++ if (sUidOwnerMap == null) return; ++ + final long match; + try { + match = getMatchByFirewallChain(chain); +@@ -646,6 +658,9 @@ public class BpfNetMaps { + private Set getUidsMatchEnabled(final int childChain) throws ErrnoException { + final long match = getMatchByFirewallChain(childChain); + Set uids = new ArraySet<>(); ++ ++ if (sUidOwnerMap == null) return uids; ++ + synchronized (sUidOwnerMap) { + sUidOwnerMap.forEach((uid, val) -> { + if (val == null) { +@@ -802,6 +817,8 @@ public class BpfNetMaps { public void swapActiveStatsMap() { throwIfPreT("swapActiveStatsMap is not available on pre-T devices"); @@ -244,7 +297,7 @@ index ad9cfbe10e..9b2202b295 100644 try { synchronized (sCurrentStatsMapConfigLock) { final long config = sConfigurationMap.getValue( -@@ -834,6 +840,8 @@ public class BpfNetMaps { +@@ -842,6 +859,8 @@ public class BpfNetMaps { return; } @@ -253,7 +306,36 @@ index ad9cfbe10e..9b2202b295 100644 // Remove the entry if package is uninstalled or uid has only INTERNET permission. if (permissions == PERMISSION_UNINSTALLED || permissions == PERMISSION_INTERNET) { for (final int uid : uids) { -@@ -932,7 +940,9 @@ public class BpfNetMaps { +@@ -876,6 +895,8 @@ public class BpfNetMaps { + public void setDataSaverEnabled(boolean enable) { + throwIfPreT("setDataSaverEnabled is not available on pre-T devices"); + ++ if (sDataSaverEnabledMap == null) return; ++ + try { + final short config = enable ? DATA_SAVER_ENABLED : DATA_SAVER_DISABLED; + sDataSaverEnabledMap.updateEntry(DATA_SAVER_ENABLED_KEY, new U8(config)); +@@ -894,6 +915,9 @@ public class BpfNetMaps { + @RequiresApi(Build.VERSION_CODES.TIRAMISU) + public void setIngressDiscardRule(final InetAddress address, final String iface) { + throwIfPreT("setIngressDiscardRule is not available on pre-T devices"); ++ ++ if (sIngressDiscardMap == null) return; ++ + final int ifIndex = mDeps.getIfIndex(iface); + if (ifIndex == 0) { + Log.e(TAG, "Failed to get if index, skip setting ingress discard rule for " + address +@@ -917,6 +941,9 @@ public class BpfNetMaps { + @RequiresApi(Build.VERSION_CODES.TIRAMISU) + public void removeIngressDiscardRule(final InetAddress address) { + throwIfPreT("removeIngressDiscardRule is not available on pre-T devices"); ++ ++ if (sIngressDiscardMap == null) return; ++ + try { + sIngressDiscardMap.deleteEntry(new IngressDiscardKey(address)); + } catch (ErrnoException e) { +@@ -940,7 +967,9 @@ public class BpfNetMaps { // deletion. netd and skDestroyListener could delete CookieTagMap entry concurrently. // So using Set to count the number of entry in the map. Set keySet = new ArraySet<>(); @@ -264,11 +346,38 @@ index ad9cfbe10e..9b2202b295 100644 return keySet.size(); } +@@ -987,6 +1016,8 @@ public class BpfNetMaps { + } + + private void dumpOwnerMatchConfig(final IndentingPrintWriter pw) { ++ if (sConfigurationMap == null) return; ++ + try { + final long match = sConfigurationMap.getValue(UID_RULES_CONFIGURATION_KEY).val; + pw.println("current ownerMatch configuration: " + match + " " + matchToString(match)); +@@ -996,6 +1027,8 @@ public class BpfNetMaps { + } + + private void dumpCurrentStatsMapConfig(final IndentingPrintWriter pw) { ++ if (sConfigurationMap == null) return; ++ + try { + final long config = sConfigurationMap.getValue(CURRENT_STATS_MAP_CONFIGURATION_KEY).val; + final String currentStatsMap = +@@ -1007,6 +1040,8 @@ public class BpfNetMaps { + } + + private void dumpDataSaverConfig(final IndentingPrintWriter pw) { ++ if (sDataSaverEnabledMap == null) return; ++ + try { + final short config = sDataSaverEnabledMap.getValue(DATA_SAVER_ENABLED_KEY).val; + // Any non-zero value converted from short to boolean is true by convention. diff --git a/staticlibs/native/bpf_headers/include/bpf/BpfMap.h b/staticlibs/native/bpf_headers/include/bpf/BpfMap.h -index 3fede3c0ed..8266ec68c0 100644 +index 1037bebf29..b8e8991c57 100644 --- a/staticlibs/native/bpf_headers/include/bpf/BpfMap.h +++ b/staticlibs/native/bpf_headers/include/bpf/BpfMap.h -@@ -58,21 +58,24 @@ class BpfMapRO { +@@ -60,21 +60,24 @@ class BpfMapRO { protected: void abortOnMismatch(bool writable) const { diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0003-Bring-back-traffic-indicators-for-legacy-devices.patch b/patches_treble_td/platform_packages_modules_Connectivity/0003-Bring-back-traffic-indicators-for-legacy-devices.patch index ef5b15a..f4a4588 100644 --- a/patches_treble_td/platform_packages_modules_Connectivity/0003-Bring-back-traffic-indicators-for-legacy-devices.patch +++ b/patches_treble_td/platform_packages_modules_Connectivity/0003-Bring-back-traffic-indicators-for-legacy-devices.patch @@ -1,4 +1,4 @@ -From a8511c3bc3855c98b1fec6e06a916da38cf43d78 Mon Sep 17 00:00:00 2001 +From c252c4da39549242a435c3bc66a02814c14a6eaa Mon Sep 17 00:00:00 2001 From: koron393 Date: Fri, 20 Jan 2023 05:41:13 +0900 Subject: [PATCH 3/6] Bring back traffic indicators for legacy devices @@ -16,7 +16,7 @@ Signed-off-by: koron393 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/service-t/jni/com_android_server_net_NetworkStatsService.cpp b/service-t/jni/com_android_server_net_NetworkStatsService.cpp -index bdbb655e5c..2d8d673515 100644 +index c99939864d..741f13c7ed 100644 --- a/service-t/jni/com_android_server_net_NetworkStatsService.cpp +++ b/service-t/jni/com_android_server_net_NetworkStatsService.cpp @@ -39,6 +39,9 @@ using android::bpf::NetworkTraceHandler; @@ -26,11 +26,11 @@ index bdbb655e5c..2d8d673515 100644 +static const char* QTAGUID_IFACE_STATS = "/proc/net/xt_qtaguid/iface_stat_fmt"; +static const char* QTAGUID_UID_STATS = "/proc/net/xt_qtaguid/stats"; + - // NOTE: keep these in sync with TrafficStats.java - static const uint64_t UNKNOWN = -1; - -@@ -64,13 +67,80 @@ static uint64_t getStatsType(StatsValue* stats, StatsType type) { - } + static void nativeRegisterIface(JNIEnv* env, jclass clazz, jstring iface) { + ScopedUtfChars iface8(env, iface); + if (iface8.c_str() == nullptr) return; +@@ -73,13 +76,80 @@ static jobject statsValueToEntry(JNIEnv* env, StatsValue* stats) { + return result; } +static int parseIfaceStats(const char* iface, StatsValue* stats) { @@ -96,43 +96,43 @@ index bdbb655e5c..2d8d673515 100644 + return 0; +} + - static jlong nativeGetTotalStat(JNIEnv* env, jclass clazz, jint type) { + static jobject nativeGetTotalStat(JNIEnv* env, jclass clazz) { StatsValue stats = {}; - if (bpfGetIfaceStats(NULL, &stats) == 0) { - return getStatsType(&stats, (StatsType) type); + if (bpfGetIfaceStats(nullptr, &stats) == 0) { + return statsValueToEntry(env, &stats); } else { -- return UNKNOWN; -+ if (parseIfaceStats(NULL, &stats) == 0) { -+ return getStatsType(&stats, (StatsType) type); +- return nullptr; ++ if (parseIfaceStats(nullptr, &stats) == 0) { ++ return statsValueToEntry(env, &stats); + } else { -+ return UNKNOWN; ++ return nullptr; + } } } -@@ -85,7 +155,11 @@ static jlong nativeGetIfaceStat(JNIEnv* env, jclass clazz, jstring iface, jint t +@@ -94,7 +164,11 @@ static jobject nativeGetIfaceStat(JNIEnv* env, jclass clazz, jstring iface) { if (bpfGetIfaceStats(iface8.c_str(), &stats) == 0) { - return getStatsType(&stats, (StatsType) type); + return statsValueToEntry(env, &stats); } else { -- return UNKNOWN; +- return nullptr; + if (parseIfaceStats(iface8.c_str(), &stats) == 0) { -+ return getStatsType(&stats, (StatsType) type); ++ return statsValueToEntry(env, &stats); + } else { -+ return UNKNOWN; ++ return nullptr; + } } } -@@ -104,7 +178,11 @@ static jlong nativeGetUidStat(JNIEnv* env, jclass clazz, jint uid, jint type) { +@@ -104,7 +178,11 @@ static jobject nativeGetUidStat(JNIEnv* env, jclass clazz, jint uid) { if (bpfGetUidStats(uid, &stats) == 0) { - return getStatsType(&stats, (StatsType) type); + return statsValueToEntry(env, &stats); } else { -- return UNKNOWN; +- return nullptr; + if (parseUidStats(uid, &stats) == 0) { -+ return getStatsType(&stats, (StatsType) type); ++ return statsValueToEntry(env, &stats); + } else { -+ return UNKNOWN; ++ return nullptr; + } } } diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0004-Revert-drop-support-for-V-gsi-on-pixel-5-R-base-kern.patch b/patches_treble_td/platform_packages_modules_Connectivity/0004-Revert-drop-support-for-V-gsi-on-pixel-5-R-base-kern.patch index 7241d51..1099f85 100644 --- a/patches_treble_td/platform_packages_modules_Connectivity/0004-Revert-drop-support-for-V-gsi-on-pixel-5-R-base-kern.patch +++ b/patches_treble_td/platform_packages_modules_Connectivity/0004-Revert-drop-support-for-V-gsi-on-pixel-5-R-base-kern.patch @@ -1,4 +1,4 @@ -From e036d1921fd6fb24b148ea12e3bd446baa14aa3d Mon Sep 17 00:00:00 2001 +From b8b55f75bf016b5215081b7ba9347085d91089fe Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 16 Mar 2024 15:27:27 -0400 Subject: [PATCH 4/6] Revert "drop support for V gsi on pixel 5 R base kernel" diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0005-More-bpf-errors-ignore-there-are-some-4.14-without-t.patch b/patches_treble_td/platform_packages_modules_Connectivity/0005-More-bpf-errors-ignore-there-are-some-4.14-without-t.patch index baf84b1..95f2938 100644 --- a/patches_treble_td/platform_packages_modules_Connectivity/0005-More-bpf-errors-ignore-there-are-some-4.14-without-t.patch +++ b/patches_treble_td/platform_packages_modules_Connectivity/0005-More-bpf-errors-ignore-there-are-some-4.14-without-t.patch @@ -1,4 +1,4 @@ -From 5d5a4f8f2c25b60df861aa3fbc18ddafe341e6bf Mon Sep 17 00:00:00 2001 +From 984a267c8a1ecf02c8bce187f436ec8349e6e61b Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 15 May 2024 05:56:59 -0400 Subject: [PATCH 5/6] More bpf errors ignore -- there are some 4.14 without the @@ -9,10 +9,10 @@ Subject: [PATCH 5/6] More bpf errors ignore -- there are some 4.14 without the 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/netbpfload/NetBpfLoad.cpp b/netbpfload/NetBpfLoad.cpp -index 2e4e6fae6f..6e9b85da31 100644 +index 2953859760..ed628a14e1 100644 --- a/netbpfload/NetBpfLoad.cpp +++ b/netbpfload/NetBpfLoad.cpp -@@ -218,8 +218,7 @@ int main(int argc, char** argv, char * const envp[]) { +@@ -345,8 +345,7 @@ int main(int argc, char** argv, char * const envp[]) { // but we need 0 (enabled) // (this writeFile is known to fail on at least 4.19, but always defaults to 0 on // pre-5.13, on 5.13+ it depends on CONFIG_BPF_UNPRIV_DEFAULT_OFF) @@ -22,7 +22,7 @@ index 2e4e6fae6f..6e9b85da31 100644 // Enable the eBPF JIT -- but do note that on 64-bit kernels it is likely // already force enabled by the kernel config option BPF_JIT_ALWAYS_ON. -@@ -227,14 +226,12 @@ int main(int argc, char** argv, char * const envp[]) { +@@ -354,14 +353,12 @@ int main(int argc, char** argv, char * const envp[]) { // kernel does not have CONFIG_BPF_JIT=y) // BPF_JIT is required by R VINTF (which means 4.14/4.19/5.4 kernels), // but 4.14/4.19 were released with P & Q, and only 5.4 is new in R+. diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0006-Fixup-Support-non-working-BPF-maps-on-old-BPF-less-k.patch b/patches_treble_td/platform_packages_modules_Connectivity/0006-Fixup-Support-non-working-BPF-maps-on-old-BPF-less-k.patch deleted file mode 100644 index 515f27c..0000000 --- a/patches_treble_td/platform_packages_modules_Connectivity/0006-Fixup-Support-non-working-BPF-maps-on-old-BPF-less-k.patch +++ /dev/null @@ -1,120 +0,0 @@ -From a6104075f33b9d64f60745ac64d9c4cc491305b0 Mon Sep 17 00:00:00 2001 -From: Andy CrossGate Yan -Date: Sun, 26 May 2024 12:15:41 +0800 -Subject: [PATCH 6/6] Fixup! Support non-working BPF maps on old BPF-less - kernel - -Null-check all other BPF map usages, which could be used by e.g. internet restriction in LOS ---- - .../src/com/android/server/BpfNetMaps.java | 25 +++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/service/src/com/android/server/BpfNetMaps.java b/service/src/com/android/server/BpfNetMaps.java -index 9b2202b295..ec1d1abfbc 100644 ---- a/service/src/com/android/server/BpfNetMaps.java -+++ b/service/src/com/android/server/BpfNetMaps.java -@@ -381,6 +381,8 @@ public class BpfNetMaps { - } - - private void removeRule(final int uid, final long match, final String caller) { -+ if (sUidOwnerMap == null) return; -+ - try { - synchronized (sUidOwnerMap) { - final UidOwnerValue oldMatch = sUidOwnerMap.getValue(new S32(uid)); -@@ -408,6 +410,8 @@ public class BpfNetMaps { - } - - private void addRule(final int uid, final long match, final int iif, final String caller) { -+ if (sUidOwnerMap == null) return; -+ - if (match != IIF_MATCH && iif != 0) { - throw new ServiceSpecificException(EINVAL, - "Non-interface match must have zero interface index"); -@@ -510,6 +514,8 @@ public class BpfNetMaps { - public void setChildChain(final int childChain, final boolean enable) { - throwIfPreT("setChildChain is not available on pre-T devices"); - -+ if (sConfigurationMap == null) return; -+ - final long match = getMatchByFirewallChain(childChain); - try { - synchronized (sUidRulesConfigBpfMapLock) { -@@ -562,6 +568,8 @@ public class BpfNetMaps { - public void replaceUidChain(final int chain, final int[] uids) { - throwIfPreT("replaceUidChain is not available on pre-T devices"); - -+ if (sUidOwnerMap == null) return; -+ - final long match; - try { - match = getMatchByFirewallChain(chain); -@@ -642,6 +650,9 @@ public class BpfNetMaps { - private Set getUidsMatchEnabled(final int childChain) throws ErrnoException { - final long match = getMatchByFirewallChain(childChain); - Set uids = new ArraySet<>(); -+ -+ if (sUidOwnerMap == null) return uids; -+ - synchronized (sUidOwnerMap) { - sUidOwnerMap.forEach((uid, val) -> { - if (val == null) { -@@ -876,6 +887,8 @@ public class BpfNetMaps { - public void setDataSaverEnabled(boolean enable) { - throwIfPreT("setDataSaverEnabled is not available on pre-T devices"); - -+ if (sDataSaverEnabledMap == null) return; -+ - try { - final short config = enable ? DATA_SAVER_ENABLED : DATA_SAVER_DISABLED; - sDataSaverEnabledMap.updateEntry(DATA_SAVER_ENABLED_KEY, new U8(config)); -@@ -894,6 +907,9 @@ public class BpfNetMaps { - @RequiresApi(Build.VERSION_CODES.TIRAMISU) - public void setIngressDiscardRule(final InetAddress address, final String iface) { - throwIfPreT("setIngressDiscardRule is not available on pre-T devices"); -+ -+ if (sIngressDiscardMap == null) return; -+ - final int ifIndex = mDeps.getIfIndex(iface); - if (ifIndex == 0) { - Log.e(TAG, "Failed to get if index, skip setting ingress discard rule for " + address -@@ -917,6 +933,9 @@ public class BpfNetMaps { - @RequiresApi(Build.VERSION_CODES.TIRAMISU) - public void removeIngressDiscardRule(final InetAddress address) { - throwIfPreT("removeIngressDiscardRule is not available on pre-T devices"); -+ -+ if (sIngressDiscardMap == null) return; -+ - try { - sIngressDiscardMap.deleteEntry(new IngressDiscardKey(address)); - } catch (ErrnoException e) { -@@ -989,6 +1008,8 @@ public class BpfNetMaps { - } - - private void dumpOwnerMatchConfig(final IndentingPrintWriter pw) { -+ if (sConfigurationMap == null) return; -+ - try { - final long match = sConfigurationMap.getValue(UID_RULES_CONFIGURATION_KEY).val; - pw.println("current ownerMatch configuration: " + match + " " + matchToString(match)); -@@ -998,6 +1019,8 @@ public class BpfNetMaps { - } - - private void dumpCurrentStatsMapConfig(final IndentingPrintWriter pw) { -+ if (sConfigurationMap == null) return; -+ - try { - final long config = sConfigurationMap.getValue(CURRENT_STATS_MAP_CONFIGURATION_KEY).val; - final String currentStatsMap = -@@ -1009,6 +1032,8 @@ public class BpfNetMaps { - } - - private void dumpDataSaverConfig(final IndentingPrintWriter pw) { -+ if (sDataSaverEnabledMap == null) return; -+ - try { - final short config = sDataSaverEnabledMap.getValue(DATA_SAVER_ENABLED_KEY).val; - // Any non-zero value converted from short to boolean is true by convention. --- -2.34.1 - diff --git a/patches_treble_td/platform_packages_modules_Connectivity/0006-Revert-netdupdatable-add-back-abort-on-init-fail.patch b/patches_treble_td/platform_packages_modules_Connectivity/0006-Revert-netdupdatable-add-back-abort-on-init-fail.patch new file mode 100644 index 0000000..6f98a76 --- /dev/null +++ b/patches_treble_td/platform_packages_modules_Connectivity/0006-Revert-netdupdatable-add-back-abort-on-init-fail.patch @@ -0,0 +1,28 @@ +From ffaed805dbd95989a8017bd9dc29af336642b6d7 Mon Sep 17 00:00:00 2001 +From: Alberto Ponces +Date: Thu, 20 Jun 2024 12:38:58 +0100 +Subject: [PATCH 6/6] Revert "netdupdatable: add back abort() on init() fail" + +This reverts commit ff845a642bc988f960c77ac60664560f8cdc7ee3. +--- + netd/NetdUpdatable.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/netd/NetdUpdatable.cpp b/netd/NetdUpdatable.cpp +index 3b15916398..8b9e5a759c 100644 +--- a/netd/NetdUpdatable.cpp ++++ b/netd/NetdUpdatable.cpp +@@ -31,8 +31,8 @@ int libnetd_updatable_init(const char* cg2_path) { + + android::netdutils::Status ret = sBpfHandler.init(cg2_path); + if (!android::netdutils::isOk(ret)) { +- LOG(ERROR) << __func__ << ": Failed: (" << ret.code() << ") " << ret.msg(); +- abort(); ++ LOG(ERROR) << __func__ << ": Failed. " << ret.code() << " " << ret.msg(); ++ return -ret.code(); + } + return 0; + } +-- +2.34.1 + diff --git a/patches_treble_td/platform_packages_modules_DeviceLock/0001-Don-t-crash-when-we-get-no-DeviceLockManager.patch b/patches_treble_td/platform_packages_modules_DeviceLock/0001-Don-t-crash-when-we-get-no-DeviceLockManager.patch index a414056..c8f9e46 100644 --- a/patches_treble_td/platform_packages_modules_DeviceLock/0001-Don-t-crash-when-we-get-no-DeviceLockManager.patch +++ b/patches_treble_td/platform_packages_modules_DeviceLock/0001-Don-t-crash-when-we-get-no-DeviceLockManager.patch @@ -1,4 +1,4 @@ -From d6e25483a85b782d60ff23318e6aa3cbf881b355 Mon Sep 17 00:00:00 2001 +From 9d2be26533ef0ea26d044a396c9b10d0167626bd Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 18 Oct 2023 17:44:59 -0400 Subject: [PATCH] Don't crash when we get no DeviceLockManager @@ -9,12 +9,12 @@ Change-Id: Iaba659694e706c82a95ec2e99feb26e2bc6314e0 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java b/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java -index e376aaeb..af90d23e 100644 +index 93540aec..4916c823 100644 --- a/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java +++ b/DeviceLockController/src/com/android/devicelockcontroller/SystemDeviceLockManagerImpl.java @@ -48,7 +48,10 @@ public final class SystemDeviceLockManagerImpl implements SystemDeviceLockManage - final DeviceLockManager deviceLockManager = - context.getSystemService(DeviceLockManager.class); + final DeviceLockManager deviceLockManager = context.getSystemService( + DeviceLockManager.class); - mIDeviceLockService = deviceLockManager.getService(); + if (deviceLockManager != null) @@ -25,5 +25,5 @@ index e376aaeb..af90d23e 100644 private SystemDeviceLockManagerImpl() { -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_packages_modules_Wifi/0001-Add-persist.sys.phh.wifi_disable_sae-property-to-dis.patch b/patches_treble_td/platform_packages_modules_Wifi/0001-Add-persist.sys.phh.wifi_disable_sae-property-to-dis.patch index c7ad7af..6b6f4d6 100644 --- a/patches_treble_td/platform_packages_modules_Wifi/0001-Add-persist.sys.phh.wifi_disable_sae-property-to-dis.patch +++ b/patches_treble_td/platform_packages_modules_Wifi/0001-Add-persist.sys.phh.wifi_disable_sae-property-to-dis.patch @@ -1,4 +1,4 @@ -From b28cb024741e06a50b31389f8f7e553ffc4a4d86 Mon Sep 17 00:00:00 2001 +From 985f08470b9567bf35df18246f932d87933255ce Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 21 Feb 2024 17:26:07 -0500 Subject: [PATCH] Add persist.sys.phh.wifi_disable_sae property to disable @@ -10,19 +10,19 @@ Change-Id: I72a0133e986f2c745af3c915ed65d7b540d2119b 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/java/com/android/server/wifi/WifiGlobals.java b/service/java/com/android/server/wifi/WifiGlobals.java -index 1725ed7cec..25e7846b5c 100644 +index 454d8c25c7..9601064af8 100644 --- a/service/java/com/android/server/wifi/WifiGlobals.java +++ b/service/java/com/android/server/wifi/WifiGlobals.java -@@ -56,7 +56,7 @@ public class WifiGlobals { - private final AtomicBoolean mIsWepAllowed = new AtomicBoolean(false); +@@ -59,7 +59,7 @@ public class WifiGlobals { + private final AtomicInteger mSendDhcpHostnameRestriction = new AtomicInteger(); // These are read from the overlay, cache them after boot up. - private final boolean mIsWpa3SaeUpgradeEnabled; + private boolean mIsWpa3SaeUpgradeEnabled; - private final boolean mIsWpa3SaeUpgradeOffloadEnabled; + private boolean mIsWpa3SaeUpgradeOffloadEnabled; private final boolean mIsOweUpgradeEnabled; private final boolean mFlushAnqpCacheOnWifiToggleOffEvent; -@@ -98,6 +98,9 @@ public class WifiGlobals { +@@ -108,6 +108,9 @@ public class WifiGlobals { mIsWpa3SaeUpgradeEnabled = mContext.getResources() .getBoolean(R.bool.config_wifiSaeUpgradeEnabled); @@ -33,5 +33,5 @@ index 1725ed7cec..25e7846b5c 100644 .getBoolean(R.bool.config_wifiSaeUpgradeOffloadEnabled); mIsOweUpgradeEnabled = mContext.getResources() -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_system_bpf/0001-Support-no-bpf-usecase.patch b/patches_treble_td/platform_system_bpf/0001-Support-no-bpf-usecase.patch index da83eaa..2d5d717 100644 --- a/patches_treble_td/platform_system_bpf/0001-Support-no-bpf-usecase.patch +++ b/patches_treble_td/platform_system_bpf/0001-Support-no-bpf-usecase.patch @@ -1,18 +1,18 @@ -From f3e0b506e8e331083d1813d1da2f2e037da44ca0 Mon Sep 17 00:00:00 2001 +From a042fe78740afde7893770b3b33df3453620d624 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 13 Oct 2021 10:56:52 -0400 Subject: [PATCH] Support no-bpf usecase Change-Id: I75a427a2a41aa4ab1104ad88a891bef0dc2d9c91 --- - bpfloader/BpfLoader.cpp | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) + bpfloader/BpfLoader.cpp | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp -index 29da777..37a2a19 100644 +index 08fd72d..07bf6f3 100644 --- a/bpfloader/BpfLoader.cpp +++ b/bpfloader/BpfLoader.cpp -@@ -206,7 +206,9 @@ int main(int argc, char** argv) { +@@ -196,19 +196,15 @@ int main(int argc, char** argv) { // which could otherwise fail with ENOENT during object pinning or renaming, // due to ordering issues) for (const auto& location : locations) { @@ -22,17 +22,6 @@ index 29da777..37a2a19 100644 + } } - // Note: there's no actual src dir for fs_bpf_loader .o's, -@@ -214,18 +216,15 @@ int main(int argc, char** argv) { - // This is because this is primarily meant for triggering genfscon rules, - // and as such this will likely always be the case. - // Thus we need to manually create the /sys/fs/bpf/loader subdirectory. -- if (createSysFsBpfSubDir("loader")) return 1; -+ if (createSysFsBpfSubDir("loader")) { -+ goto fail; -+ return 1; -+ } - // Load all ELF objects, create programs and maps, and pin them for (const auto& location : locations) { if (loadAllElfObjects(location) != 0) { @@ -47,7 +36,7 @@ index 29da777..37a2a19 100644 } } -@@ -234,5 +233,13 @@ int main(int argc, char** argv) { +@@ -217,5 +213,13 @@ int main(int argc, char** argv) { return 1; } diff --git a/patches_treble_td/platform_system_core/0001-Let-system-override-ro.apex.updatable.patch b/patches_treble_td/platform_system_core/0001-Let-system-override-ro.apex.updatable.patch index d15fb25..b508978 100644 --- a/patches_treble_td/platform_system_core/0001-Let-system-override-ro.apex.updatable.patch +++ b/patches_treble_td/platform_system_core/0001-Let-system-override-ro.apex.updatable.patch @@ -1,4 +1,4 @@ -From f0f3419eaa2ccdde8ca14f5fbb61f0436d7f1832 Mon Sep 17 00:00:00 2001 +From a056c57186d81d2a1fb606be23790ec73ebf998b Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 23 Feb 2022 17:37:47 -0500 Subject: [PATCH 01/26] Let system override ro.apex.updatable @@ -13,10 +13,10 @@ So, ignore the override policy for this prop 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index 9e9d0f9de..d34d24f89 100644 +index b3985f89e..e4b008246 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp -@@ -802,8 +802,12 @@ static void LoadProperties(char* data, const char* filter, const char* filename, +@@ -803,8 +803,12 @@ static void LoadProperties(char* data, const char* filter, const char* filename, } else if (it->second != value) { LOG(WARNING) << "Overriding previous property '" << key << "':'" << it->second << "' with new value '" << value << "'"; diff --git a/patches_treble_td/platform_system_core/0002-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch b/patches_treble_td/platform_system_core/0002-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch index e1688a5..8eb9e7f 100644 --- a/patches_treble_td/platform_system_core/0002-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch +++ b/patches_treble_td/platform_system_core/0002-Don-t-abandon-creating-property-tree-if-there-is-a-c.patch @@ -1,4 +1,4 @@ -From 8ccff05b30cd49a662c2eef3316094e8b4065f79 Mon Sep 17 00:00:00 2001 +From 65fea9d642f39c087b7f6168dbcc30667f9c181d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 18 Oct 2020 18:14:47 +0200 Subject: [PATCH 02/26] Don't abandon creating property tree if there is a diff --git a/patches_treble_td/platform_system_core/0003-init-Do-not-start-console-service-when-debuggable.patch b/patches_treble_td/platform_system_core/0003-init-Do-not-start-console-service-when-debuggable.patch index d25aa8b..52bc3b7 100644 --- a/patches_treble_td/platform_system_core/0003-init-Do-not-start-console-service-when-debuggable.patch +++ b/patches_treble_td/platform_system_core/0003-init-Do-not-start-console-service-when-debuggable.patch @@ -1,4 +1,4 @@ -From 9b1c2568461f71705a868cf384427680b6f44f09 Mon Sep 17 00:00:00 2001 +From 99dd3f91dfbf98927a0e792ed8f92ddfe779acea Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Wed, 23 Jun 2021 13:07:30 +0800 Subject: [PATCH 03/26] init: Do not start console service when debuggable @@ -13,10 +13,10 @@ Change-Id: I34cfd6b42d3b9aee4b3e63181480cfb8b1255f29 1 file changed, 3 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index eb67c8cd0..c24c8e7a8 100644 +index 92e8f27ba..432cd9784 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -1290,9 +1290,6 @@ on property:ro.debuggable=1 +@@ -1306,9 +1306,6 @@ on property:ro.debuggable=1 # Give reads to anyone for the accessibility trace folder on debug builds. chmod 0775 /data/misc/a11ytrace diff --git a/patches_treble_td/platform_system_core/0004-Panic-into-recovery-rather-than-bootloader.patch b/patches_treble_td/platform_system_core/0004-Panic-into-recovery-rather-than-bootloader.patch index 2836aaf..1ab0b29 100644 --- a/patches_treble_td/platform_system_core/0004-Panic-into-recovery-rather-than-bootloader.patch +++ b/patches_treble_td/platform_system_core/0004-Panic-into-recovery-rather-than-bootloader.patch @@ -1,4 +1,4 @@ -From ff122c00b53f0b2f1ec055b6c8e17b07965855fc Mon Sep 17 00:00:00 2001 +From 7779cfb1015aa9cf7940986cdfd6bbc471106871 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 4 Sep 2019 21:11:48 +0200 Subject: [PATCH 04/26] Panic into recovery rather than bootloader diff --git a/patches_treble_td/platform_system_core/0005-Detect-allowed-sdcard-options-based-on-vndk.patch b/patches_treble_td/platform_system_core/0005-Detect-allowed-sdcard-options-based-on-vndk.patch index 3541cdf..0d97579 100644 --- a/patches_treble_td/platform_system_core/0005-Detect-allowed-sdcard-options-based-on-vndk.patch +++ b/patches_treble_td/platform_system_core/0005-Detect-allowed-sdcard-options-based-on-vndk.patch @@ -1,4 +1,4 @@ -From 45794a5fa21a9b1c1f826a5de3122bd91bfff3e6 Mon Sep 17 00:00:00 2001 +From 55b6ad1af1cb06fa8254c1ea8e400c41fb6cfe94 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 14 Aug 2018 19:33:03 +0200 Subject: [PATCH 05/26] Detect allowed sdcard options based on vndk diff --git a/patches_treble_td/platform_system_core/0006-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch b/patches_treble_td/platform_system_core/0006-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch index ae50f69..3351f00 100644 --- a/patches_treble_td/platform_system_core/0006-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch +++ b/patches_treble_td/platform_system_core/0006-Ugly-but-secure-Set-dev-uinput-as-0666-to-fix-finger.patch @@ -1,4 +1,4 @@ -From 37d343f47891d32e166d5e07405480dbc3997eae Mon Sep 17 00:00:00 2001 +From 7a2219f355f39292430f59d24d5c7f794d021678 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 1 Nov 2019 18:22:13 +0100 Subject: [PATCH 06/26] Ugly but secure: Set /dev/uinput as 0666 to fix diff --git a/patches_treble_td/platform_system_core/0007-Revert-Set-system-xbin-permissions-to-750.patch b/patches_treble_td/platform_system_core/0007-Revert-Set-system-xbin-permissions-to-750.patch index 5ad6512..b6bcb9c 100644 --- a/patches_treble_td/platform_system_core/0007-Revert-Set-system-xbin-permissions-to-750.patch +++ b/patches_treble_td/platform_system_core/0007-Revert-Set-system-xbin-permissions-to-750.patch @@ -1,4 +1,4 @@ -From 9befecd06ed6d04af914c3c70e43d264afd8ccb1 Mon Sep 17 00:00:00 2001 +From 16f3ecdcb3fd44d8aee45df412626e3b7724a0af Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Tue, 1 Feb 2022 13:48:35 +0000 Subject: [PATCH 07/26] Revert "Set /system/xbin permissions to 750." diff --git a/patches_treble_td/platform_system_core/0008-Add-my-own-OTA-mechanism-going-over-data.patch b/patches_treble_td/platform_system_core/0008-Add-my-own-OTA-mechanism-going-over-data.patch index 6b61bc2..310a877 100644 --- a/patches_treble_td/platform_system_core/0008-Add-my-own-OTA-mechanism-going-over-data.patch +++ b/patches_treble_td/platform_system_core/0008-Add-my-own-OTA-mechanism-going-over-data.patch @@ -1,4 +1,4 @@ -From fd2982fd1eb598afb5ac9b51636718ae45d315e0 Mon Sep 17 00:00:00 2001 +From 7d337e95cbacfa62c4b1e57855359ef42932ca73 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 22 Jan 2022 14:34:45 -0500 Subject: [PATCH 08/26] Add my own OTA mechanism going over /data @@ -10,7 +10,7 @@ Change-Id: I9cacff2d761affa0376b4bb8ca63353a9d95b5de 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/fs_mgr/libfiemap/image_manager.cpp b/fs_mgr/libfiemap/image_manager.cpp -index c416f4df4..b8eba80aa 100644 +index a5da6e342..85f4ed62d 100644 --- a/fs_mgr/libfiemap/image_manager.cpp +++ b/fs_mgr/libfiemap/image_manager.cpp @@ -156,7 +156,7 @@ bool ImageManager::MetadataDirIsTest() const { diff --git a/patches_treble_td/platform_system_core/0009-fs_mgr-Keep-allowing-encryptable-fstab-flag.patch b/patches_treble_td/platform_system_core/0009-fs_mgr-Keep-allowing-encryptable-fstab-flag.patch index ca3436b..c184ef9 100644 --- a/patches_treble_td/platform_system_core/0009-fs_mgr-Keep-allowing-encryptable-fstab-flag.patch +++ b/patches_treble_td/platform_system_core/0009-fs_mgr-Keep-allowing-encryptable-fstab-flag.patch @@ -1,4 +1,4 @@ -From 611de800d440dce3c7780bbfcb0bd81d17ec5ed9 Mon Sep 17 00:00:00 2001 +From d73e8d9e5809d4ff46bf81bcad085323b97218a8 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Mon, 3 Oct 2022 13:50:36 +0100 Subject: [PATCH 09/26] fs_mgr: Keep allowing encryptable fstab flag @@ -11,10 +11,10 @@ Change-Id: Id2554d6563a869bb5bcf39c67b0322484bdab0c9 1 file changed, 10 deletions(-) diff --git a/fs_mgr/libfstab/fstab.cpp b/fs_mgr/libfstab/fstab.cpp -index f6a20f98b..f793b5202 100644 +index 8c7aee703..c42e2f400 100644 --- a/fs_mgr/libfstab/fstab.cpp +++ b/fs_mgr/libfstab/fstab.cpp -@@ -324,16 +324,6 @@ bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) { +@@ -328,16 +328,6 @@ bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) { } } diff --git a/patches_treble_td/platform_system_core/0010-FDE-is-dead.-Fallback-FDE-to-no-encryption-and-FDE-F.patch b/patches_treble_td/platform_system_core/0010-FDE-is-dead.-Fallback-FDE-to-no-encryption-and-FDE-F.patch index 1225d47..d60ac9c 100644 --- a/patches_treble_td/platform_system_core/0010-FDE-is-dead.-Fallback-FDE-to-no-encryption-and-FDE-F.patch +++ b/patches_treble_td/platform_system_core/0010-FDE-is-dead.-Fallback-FDE-to-no-encryption-and-FDE-F.patch @@ -1,4 +1,4 @@ -From d2ff33c433010b05ad00117aa9a6a1c56aaa29d7 Mon Sep 17 00:00:00 2001 +From dc22b278b24d542907acd3b028abd0911d21f5d5 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 10 Nov 2022 13:30:50 -0500 Subject: [PATCH 10/26] FDE is dead. Fallback FDE to no encryption, and FDE+FBE @@ -9,7 +9,7 @@ Subject: [PATCH 10/26] FDE is dead. Fallback FDE to no encryption, and FDE+FBE 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs_mgr/libfstab/fstab.cpp b/fs_mgr/libfstab/fstab.cpp -index f793b5202..bccdbe7f9 100644 +index c42e2f400..70945bdd4 100644 --- a/fs_mgr/libfstab/fstab.cpp +++ b/fs_mgr/libfstab/fstab.cpp @@ -188,7 +188,7 @@ bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) { diff --git a/patches_treble_td/platform_system_core/0011-Let-system-override-adb-secure-props-so-we-dont-get-.patch b/patches_treble_td/platform_system_core/0011-Let-system-override-adb-secure-props-so-we-dont-get-.patch index 5da9f6c..e293c36 100644 --- a/patches_treble_td/platform_system_core/0011-Let-system-override-adb-secure-props-so-we-dont-get-.patch +++ b/patches_treble_td/platform_system_core/0011-Let-system-override-adb-secure-props-so-we-dont-get-.patch @@ -1,4 +1,4 @@ -From 9eddbb8c9e97dcc6a8d3a8593b733a23df77befa Mon Sep 17 00:00:00 2001 +From 975a2366ced84e67d1f7ff34e96140f219735e9a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 9 Dec 2022 13:57:10 -0500 Subject: [PATCH 11/26] Let system override adb/secure props, so we dont get @@ -9,10 +9,10 @@ Subject: [PATCH 11/26] Let system override adb/secure props, so we dont get 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index d34d24f89..ed785760e 100644 +index e4b008246..ca47fc83e 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp -@@ -802,7 +802,7 @@ static void LoadProperties(char* data, const char* filter, const char* filename, +@@ -803,7 +803,7 @@ static void LoadProperties(char* data, const char* filter, const char* filename, } else if (it->second != value) { LOG(WARNING) << "Overriding previous property '" << key << "':'" << it->second << "' with new value '" << value << "'"; diff --git a/patches_treble_td/platform_system_core/0012-Allow-apex-on-5.0-kernels.-This-is-needed-because-on.patch b/patches_treble_td/platform_system_core/0012-Allow-apex-on-5.0-kernels.-This-is-needed-because-on.patch index 8b8402e..31e4026 100644 --- a/patches_treble_td/platform_system_core/0012-Allow-apex-on-5.0-kernels.-This-is-needed-because-on.patch +++ b/patches_treble_td/platform_system_core/0012-Allow-apex-on-5.0-kernels.-This-is-needed-because-on.patch @@ -1,4 +1,4 @@ -From 62dbf37d4c662cc310cf268b1a6da57bb0a29034 Mon Sep 17 00:00:00 2001 +From 1b0cbb174d86708abaf6e964608a30ad68055e6c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 28 Apr 2023 12:29:05 -0400 Subject: [PATCH 12/26] Allow apex on > 5.0 kernels. This is needed because on @@ -6,23 +6,22 @@ Subject: [PATCH 12/26] Allow apex on > 5.0 kernels. This is needed because on Change-Id: I334cde4c5557b0ff70d550205c5bb727d4b5dbf5 --- - init/property_service.cpp | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) + init/property_service.cpp | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index ed785760e..5fda97afb 100644 +index ca47fc83e..71a3d0194 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp -@@ -64,6 +64,8 @@ +@@ -64,6 +64,7 @@ #include #include #include +#include -+ + #include + #include "debug_ramdisk.h" - #include "epoll.h" - #include "init.h" -@@ -705,6 +707,16 @@ uint32_t InitPropertySet(const std::string& name, const std::string& value) { +@@ -706,6 +707,16 @@ uint32_t InitPropertySet(const std::string& name, const std::string& value) { static Result load_properties_from_file(const char*, const char*, std::map*); @@ -39,7 +38,7 @@ index ed785760e..5fda97afb 100644 /* * Filter is used to decide which properties to load: NULL loads all keys, * "ro.foo.*" is a prefix match, and "ro.foo.bar" is an exact match. -@@ -802,7 +814,9 @@ static void LoadProperties(char* data, const char* filter, const char* filename, +@@ -803,7 +814,9 @@ static void LoadProperties(char* data, const char* filter, const char* filename, } else if (it->second != value) { LOG(WARNING) << "Overriding previous property '" << key << "':'" << it->second << "' with new value '" << value << "'"; diff --git a/patches_treble_td/platform_system_core/0013-watchdogd-Support-pinging-two-watchdogs.patch b/patches_treble_td/platform_system_core/0013-watchdogd-Support-pinging-two-watchdogs.patch index d7094b6..02e5454 100644 --- a/patches_treble_td/platform_system_core/0013-watchdogd-Support-pinging-two-watchdogs.patch +++ b/patches_treble_td/platform_system_core/0013-watchdogd-Support-pinging-two-watchdogs.patch @@ -1,4 +1,4 @@ -From d0218468cf8ee9113df9c208a6500bd0640667e2 Mon Sep 17 00:00:00 2001 +From b1456361da4b2e3be91baebe6757f8e93007720c Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 27 May 2023 05:36:21 -0400 Subject: [PATCH 13/26] watchdogd: Support pinging two watchdogs diff --git a/patches_treble_td/platform_system_core/0014-healthd-offline-charger-fix-screen-off-3-3.patch b/patches_treble_td/platform_system_core/0014-healthd-offline-charger-fix-screen-off-3-3.patch index e772a05..629fe2b 100644 --- a/patches_treble_td/platform_system_core/0014-healthd-offline-charger-fix-screen-off-3-3.patch +++ b/patches_treble_td/platform_system_core/0014-healthd-offline-charger-fix-screen-off-3-3.patch @@ -1,4 +1,4 @@ -From 0a6db48185d2b6ff0a9511473b8c3818e25d68eb Mon Sep 17 00:00:00 2001 +From 8d2f701129618b26eb710cd7d178d95bfb418172 Mon Sep 17 00:00:00 2001 From: Raphael Mounier Date: Sun, 21 May 2023 16:15:42 +0200 Subject: [PATCH 14/26] healthd : offline charger fix screen off 3/3 diff --git a/patches_treble_td/platform_system_core/0015-Disable-quotas-on-legacy-devices-with-encryption-dis.patch b/patches_treble_td/platform_system_core/0015-Disable-quotas-on-legacy-devices-with-encryption-dis.patch index 82ac9f9..bc74b60 100644 --- a/patches_treble_td/platform_system_core/0015-Disable-quotas-on-legacy-devices-with-encryption-dis.patch +++ b/patches_treble_td/platform_system_core/0015-Disable-quotas-on-legacy-devices-with-encryption-dis.patch @@ -1,4 +1,4 @@ -From 8f52eb3eff28346ad076cbbfd5f161cdc4e78d2b Mon Sep 17 00:00:00 2001 +From 007669d24f5e0c7d6212f283e4ecacb8307f2d31 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 6 Jun 2023 16:17:11 +0100 Subject: [PATCH 15/26] Disable quotas on legacy devices with encryption @@ -10,10 +10,10 @@ Source: https://t.me/phhtreblebuilders/20521 and https://t.me/phhtreblebuilders/ 1 file changed, 7 insertions(+) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp -index 3e0b43d28..a6e6d1508 100644 +index 92a9bbe2f..d3249e151 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp -@@ -378,6 +378,13 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry, +@@ -381,6 +381,13 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry, return; } diff --git a/patches_treble_td/platform_system_core/0016-Add-vendor-firmware_mnt.-Moto-Razr-2019-look-for-fir.patch b/patches_treble_td/platform_system_core/0016-Add-vendor-firmware_mnt.-Moto-Razr-2019-look-for-fir.patch index 65a9b02..5c89f30 100644 --- a/patches_treble_td/platform_system_core/0016-Add-vendor-firmware_mnt.-Moto-Razr-2019-look-for-fir.patch +++ b/patches_treble_td/platform_system_core/0016-Add-vendor-firmware_mnt.-Moto-Razr-2019-look-for-fir.patch @@ -1,4 +1,4 @@ -From 65088ddabf5831202b48e3698b5fa265706fa5f9 Mon Sep 17 00:00:00 2001 +From 697f91bbfe05506eb2a28ca0bb892db05310c3de Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 11 Jul 2023 14:52:40 -0400 Subject: [PATCH 16/26] Add /vendor/firmware_mnt. Moto Razr 2019 look for diff --git a/patches_treble_td/platform_system_core/0017-Ignore-dm-verity-setup-issues.patch b/patches_treble_td/platform_system_core/0017-Ignore-dm-verity-setup-issues.patch index 9151892..73245b0 100644 --- a/patches_treble_td/platform_system_core/0017-Ignore-dm-verity-setup-issues.patch +++ b/patches_treble_td/platform_system_core/0017-Ignore-dm-verity-setup-issues.patch @@ -1,4 +1,4 @@ -From c0c23bbb67f6f9c6c0a494664a7006fcc8966610 Mon Sep 17 00:00:00 2001 +From 3d4b65607e7704858f36c3bcb0de955a0ef4eebe Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 6 Oct 2023 08:20:48 -0400 Subject: [PATCH 17/26] Ignore dm-verity setup issues @@ -16,7 +16,7 @@ Change-Id: If406984b096f71b9f5892e1228d4980aa49079a7 1 file changed, 1 deletion(-) diff --git a/init/first_stage_mount.cpp b/init/first_stage_mount.cpp -index 8cf7a89e4..a7503420a 100644 +index 69acb0075..672af3577 100644 --- a/init/first_stage_mount.cpp +++ b/init/first_stage_mount.cpp @@ -429,7 +429,6 @@ bool FirstStageMountVBootV2::MountPartition(const Fstab::iterator& begin, bool e diff --git a/patches_treble_td/platform_system_core/0018-Fix-support-for-devices-without-cgroupv2-support.patch b/patches_treble_td/platform_system_core/0018-Fix-support-for-devices-without-cgroupv2-support.patch index 01aad8c..1018b42 100644 --- a/patches_treble_td/platform_system_core/0018-Fix-support-for-devices-without-cgroupv2-support.patch +++ b/patches_treble_td/platform_system_core/0018-Fix-support-for-devices-without-cgroupv2-support.patch @@ -1,4 +1,4 @@ -From 580821598b9c6ed42045404ca703739c79f58225 Mon Sep 17 00:00:00 2001 +From 34363a06798a496094dcd26638251bc057965535 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 26 Oct 2022 17:59:11 -0400 Subject: [PATCH 18/26] Fix support for devices without cgroupv2 support diff --git a/patches_treble_td/platform_system_core/0019-Disable-project_quota-on-old-devices-but-new-enough-.patch b/patches_treble_td/platform_system_core/0019-Disable-project_quota-on-old-devices-but-new-enough-.patch index fd5951a..7da360d 100644 --- a/patches_treble_td/platform_system_core/0019-Disable-project_quota-on-old-devices-but-new-enough-.patch +++ b/patches_treble_td/platform_system_core/0019-Disable-project_quota-on-old-devices-but-new-enough-.patch @@ -1,4 +1,4 @@ -From 211b263f066571a102f293cc094c944fd4123b3d Mon Sep 17 00:00:00 2001 +From 56b756f59bdb50773ae224154577c8bd49535f6a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 6 Oct 2023 19:01:27 -0400 Subject: [PATCH 19/26] Disable project_quota on old devices but new enough to @@ -9,10 +9,10 @@ Subject: [PATCH 19/26] Disable project_quota on old devices but new enough to 1 file changed, 8 insertions(+) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp -index a6e6d1508..993396c02 100644 +index d3249e151..738fec4cc 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp -@@ -385,6 +385,14 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry, +@@ -388,6 +388,14 @@ static void tune_quota(const std::string& blk_device, const FstabEntry& entry, want_quota = false; } diff --git a/patches_treble_td/platform_system_core/0020-fix-Nubia-6-series-custom-rc-action-prop-validation.patch b/patches_treble_td/platform_system_core/0020-fix-Nubia-6-series-custom-rc-action-prop-validation.patch index 19b04a9..14cc599 100644 --- a/patches_treble_td/platform_system_core/0020-fix-Nubia-6-series-custom-rc-action-prop-validation.patch +++ b/patches_treble_td/platform_system_core/0020-fix-Nubia-6-series-custom-rc-action-prop-validation.patch @@ -1,4 +1,4 @@ -From ba6a900f97582c66dc35e7ab4c8b9073889df524 Mon Sep 17 00:00:00 2001 +From 248d44c88643a0339efdaef1d324da5ac15c2c2a Mon Sep 17 00:00:00 2001 From: Huy Hoang <38396158+boydaihungst@users.noreply.github.com> Date: Thu, 19 Oct 2023 07:06:55 +0700 Subject: [PATCH 20/26] fix: Nubia 6 series custom rc action prop validation diff --git a/patches_treble_td/platform_system_core/0021-HACK-Ignore-errors-when-setting-fscrypt-directory.-S.patch b/patches_treble_td/platform_system_core/0021-HACK-Ignore-errors-when-setting-fscrypt-directory.-S.patch index bd6cfaf..78013fb 100644 --- a/patches_treble_td/platform_system_core/0021-HACK-Ignore-errors-when-setting-fscrypt-directory.-S.patch +++ b/patches_treble_td/platform_system_core/0021-HACK-Ignore-errors-when-setting-fscrypt-directory.-S.patch @@ -1,4 +1,4 @@ -From b07959ff5733aa9039dfdf9b60fc189f29c49387 Mon Sep 17 00:00:00 2001 +From 5274812050afcf0bf86d36283c561f98f3e5433d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 23 Nov 2023 11:05:20 -0500 Subject: [PATCH 21/26] HACK: Ignore errors when setting fscrypt directory. diff --git a/patches_treble_td/platform_system_core/0022-Keep-our-own-version-of-ro.logd.kernel.-We-do-want-l.patch b/patches_treble_td/platform_system_core/0022-Keep-our-own-version-of-ro.logd.kernel.-We-do-want-l.patch index 0a6a655..8edbb37 100644 --- a/patches_treble_td/platform_system_core/0022-Keep-our-own-version-of-ro.logd.kernel.-We-do-want-l.patch +++ b/patches_treble_td/platform_system_core/0022-Keep-our-own-version-of-ro.logd.kernel.-We-do-want-l.patch @@ -1,4 +1,4 @@ -From eed2d63520cdddb07427a1c2204ef149a33e9d3a Mon Sep 17 00:00:00 2001 +From f1f2c2993a0172e06bb5036cf9df6b328e48ac34 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 25 Nov 2023 09:51:14 -0500 Subject: [PATCH 22/26] Keep our own version of ro.logd.kernel. We do want @@ -9,7 +9,7 @@ Subject: [PATCH 22/26] Keep our own version of ro.logd.kernel. We do want 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index 5fda97afb..f1c162cc9 100644 +index 71a3d0194..2c1c9a895 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -816,7 +816,7 @@ static void LoadProperties(char* data, const char* filter, const char* filename, diff --git a/patches_treble_td/platform_system_core/0023-Keep-capex-when-there-are-vendor-apexes.patch b/patches_treble_td/platform_system_core/0023-Keep-capex-when-there-are-vendor-apexes.patch index 99b4dcb..01ac730 100644 --- a/patches_treble_td/platform_system_core/0023-Keep-capex-when-there-are-vendor-apexes.patch +++ b/patches_treble_td/platform_system_core/0023-Keep-capex-when-there-are-vendor-apexes.patch @@ -1,4 +1,4 @@ -From bb0e5ddb169d8f2d0410ff7ecd37ab2b81bcb07f Mon Sep 17 00:00:00 2001 +From 0b817df9d36b3c4fc28a7250419f07a69981c4b0 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 16 Jan 2024 10:30:57 -0500 Subject: [PATCH 23/26] Keep capex when there are vendor apexes @@ -11,7 +11,7 @@ If there is a vendor apex, enable APEX anyway. 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index f1c162cc9..41e488b2e 100644 +index 2c1c9a895..c64bf7f2d 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -713,8 +713,18 @@ static bool kernel_supports_capex() { diff --git a/patches_treble_td/platform_system_core/0024-When-setting-ro.apex.updatable-actually-set-the-valu.patch b/patches_treble_td/platform_system_core/0024-When-setting-ro.apex.updatable-actually-set-the-valu.patch index b1048a4..6533029 100644 --- a/patches_treble_td/platform_system_core/0024-When-setting-ro.apex.updatable-actually-set-the-valu.patch +++ b/patches_treble_td/platform_system_core/0024-When-setting-ro.apex.updatable-actually-set-the-valu.patch @@ -1,4 +1,4 @@ -From 905d4d6f945de009f868bfd228e02178ab489d7b Mon Sep 17 00:00:00 2001 +From 752e6de14ca8af29349114a5e2b8314cda4b20af Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 25 Jan 2024 15:20:10 -0500 Subject: [PATCH 24/26] When setting ro.apex.updatable, actually set the value @@ -15,7 +15,7 @@ This fixes boot on Samsung Galaxy S24 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index 41e488b2e..649823d92 100644 +index c64bf7f2d..1a06b7072 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -819,17 +819,22 @@ static void LoadProperties(char* data, const char* filter, const char* filename, diff --git a/patches_treble_td/platform_system_core/0025-If-AVB-fails-ignore-disable-AVB.patch b/patches_treble_td/platform_system_core/0025-If-AVB-fails-ignore-disable-AVB.patch index 21a5154..078e63c 100644 --- a/patches_treble_td/platform_system_core/0025-If-AVB-fails-ignore-disable-AVB.patch +++ b/patches_treble_td/platform_system_core/0025-If-AVB-fails-ignore-disable-AVB.patch @@ -1,4 +1,4 @@ -From ced436e94d59cd7567a0305c47c393043108d5e1 Mon Sep 17 00:00:00 2001 +From c4e2f6fddbeb40440b11012474117184e81a8eb6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 31 Mar 2024 17:18:05 -0400 Subject: [PATCH 25/26] If AVB fails, ignore/disable AVB @@ -8,30 +8,51 @@ DO NOT INCLUDE THIS PATCH If you want to run GSIs on a locked bootloader This is needed on Honor View 10 which declares "avb" in fstab while being AVB1.0 --- - init/first_stage_mount.cpp | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) + init/first_stage_init.cpp | 6 +++++- + init/first_stage_mount.cpp | 10 +++++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) +diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp +index c4d0f758d..0470444ff 100644 +--- a/init/first_stage_init.cpp ++++ b/init/first_stage_init.cpp +@@ -520,7 +520,11 @@ int FirstStageMain(int argc, char** argv) { + } + + if (!created_devices && !fsm->DoCreateDevices()) { +- LOG(FATAL) << "Failed to create devices required for first stage mount"; ++ LOG(ERROR) << "Failed to create devices required for first stage mount, retrying without avb"; ++ fsm = CreateFirstStageMount(cmdline + " no_vbmeta"); ++ if(!fsm->DoCreateDevices()) { ++ LOG(FATAL) << "Failed to create devices required for first stage mount, retrying without avb"; ++ } + } + + if (!fsm->DoFirstStageMount()) { diff --git a/init/first_stage_mount.cpp b/init/first_stage_mount.cpp -index a7503420a..aa511f349 100644 +index 672af3577..2e40ac7c6 100644 --- a/init/first_stage_mount.cpp +++ b/init/first_stage_mount.cpp -@@ -267,7 +267,19 @@ bool FirstStageMountVBootV2::DoFirstStageMount() { +@@ -231,6 +231,12 @@ Result> FirstStageMount::Create(const std::stri + } else { + fstab = ReadFirstStageFstabAndroid(); + } ++ if (cmdline.find("no_vbmeta") != std::string::npos) { ++ for(auto& part: *fstab) { ++ part.avb_keys = ""; ++ part.fs_mgr_flags.avb = false; ++ } ++ } + if (!fstab.ok()) { + return fstab.error(); + } +@@ -267,7 +273,9 @@ bool FirstStageMountVBootV2::DoFirstStageMount() { return true; } - if (!MountPartitions()) return false; + if (!MountPartitions()) { -+ // Cheat and disable avb -+ for(auto& part: fstab_) { -+ part.avb_keys = ""; -+ part.fs_mgr_flags.avb = false; -+ LOG(ERROR) << "Failed Mouting partitions with avb. Retrying without it."; -+ if (!MountPartitions()) { -+ LOG(ERROR) << "... still failed"; -+ return false; -+ } -+ } -+ ++ return false; + } return true; diff --git a/patches_treble_td/platform_system_core/0026-Flattened-apexes-no-longer-exist-we-ll-deal-with-it-.patch b/patches_treble_td/platform_system_core/0026-Flattened-apexes-no-longer-exist-we-ll-deal-with-it-.patch index 36f6110..4a6edbf 100644 --- a/patches_treble_td/platform_system_core/0026-Flattened-apexes-no-longer-exist-we-ll-deal-with-it-.patch +++ b/patches_treble_td/platform_system_core/0026-Flattened-apexes-no-longer-exist-we-ll-deal-with-it-.patch @@ -1,4 +1,4 @@ -From ecec3ca008ad5d8c62e673ef7412ca9fc228ceeb Mon Sep 17 00:00:00 2001 +From c29435fcb89a1b753de8ff6321577d5b5e7c4169 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 2 Apr 2024 16:53:08 -0400 Subject: [PATCH 26/26] Flattened apexes no longer exist, we'll deal with it @@ -9,7 +9,7 @@ Subject: [PATCH 26/26] Flattened apexes no longer exist, we'll deal with it 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/init/property_service.cpp b/init/property_service.cpp -index 649823d92..14713c043 100644 +index 1a06b7072..75e180003 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -707,26 +707,6 @@ uint32_t InitPropertySet(const std::string& name, const std::string& value) { diff --git a/patches_treble_td/platform_system_vold/0001-Allow-deletion-of-symlink.patch b/patches_treble_td/platform_system_vold/0001-Allow-deletion-of-symlink.patch index 90daa63..12d9801 100644 --- a/patches_treble_td/platform_system_vold/0001-Allow-deletion-of-symlink.patch +++ b/patches_treble_td/platform_system_vold/0001-Allow-deletion-of-symlink.patch @@ -1,4 +1,4 @@ -From 09d951c1c516c55eb10fd8e68d27715b24b08207 Mon Sep 17 00:00:00 2001 +From 2a2cc3f795240c06e500e5c96b071390d154facb Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 17 Feb 2018 19:39:38 +0100 Subject: [PATCH 1/5] Allow deletion of symlink @@ -9,10 +9,10 @@ Change-Id: I9731895f88729072297f753088583aabbe6990f4 1 file changed, 1 insertion(+) diff --git a/FsCrypt.cpp b/FsCrypt.cpp -index 9f6403c7..b020318a 100644 +index c81c5a5..815e70b 100644 --- a/FsCrypt.cpp +++ b/FsCrypt.cpp -@@ -378,6 +378,7 @@ static bool prepare_dir_with_policy(const std::string& dir, mode_t mode, uid_t u +@@ -386,6 +386,7 @@ static bool prepare_dir_with_policy(const std::string& dir, mode_t mode, uid_t u static bool destroy_dir(const std::string& dir) { LOG(DEBUG) << "Destroying: " << dir; if (rmdir(dir.c_str()) != 0 && errno != ENOENT) { @@ -21,5 +21,5 @@ index 9f6403c7..b020318a 100644 return false; } -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_system_vold/0002-Failing-to-create-facedata-shouldn-t-be-fatal.patch b/patches_treble_td/platform_system_vold/0002-Failing-to-create-facedata-shouldn-t-be-fatal.patch index af35a52..1e2a467 100644 --- a/patches_treble_td/platform_system_vold/0002-Failing-to-create-facedata-shouldn-t-be-fatal.patch +++ b/patches_treble_td/platform_system_vold/0002-Failing-to-create-facedata-shouldn-t-be-fatal.patch @@ -1,4 +1,4 @@ -From 95fedbd400701d064250ba91ea1ab2def4111421 Mon Sep 17 00:00:00 2001 +From c53b0e6194c1606c713400d58ddbeecab07c9a1d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 7 Mar 2020 14:49:09 +0100 Subject: [PATCH 2/5] Failing to create facedata shouldn't be fatal @@ -12,7 +12,7 @@ See https://github.com/phhusson/treble_experimentations/issues/1119 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp -index e82a7c2d..de5583f4 100644 +index e82a7c2..de5583f 100644 --- a/vold_prepare_subdirs.cpp +++ b/vold_prepare_subdirs.cpp @@ -208,7 +208,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla @@ -34,5 +34,5 @@ index e82a7c2d..de5583f4 100644 } } -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_system_vold/0003-Don-t-unmount-rw-system.sh-binds.patch b/patches_treble_td/platform_system_vold/0003-Don-t-unmount-rw-system.sh-binds.patch index 7783d74..58c0a4f 100644 --- a/patches_treble_td/platform_system_vold/0003-Don-t-unmount-rw-system.sh-binds.patch +++ b/patches_treble_td/platform_system_vold/0003-Don-t-unmount-rw-system.sh-binds.patch @@ -1,4 +1,4 @@ -From 1542c0c97d8956fe116a937138f79ee5d725a3e9 Mon Sep 17 00:00:00 2001 +From 38af7f95ea091723fd0f32955b1e95f1f27660e7 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 29 Nov 2021 17:49:13 -0500 Subject: [PATCH 3/5] Don't unmount rw-system.sh binds @@ -9,10 +9,10 @@ Change-Id: If9132c21defa8b09879b79a70794c5275d6852d0 1 file changed, 1 insertion(+) diff --git a/VolumeManager.cpp b/VolumeManager.cpp -index c981f2d4..ce2a4510 100644 +index 4c06b56..1506b51 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp -@@ -1000,6 +1000,7 @@ int VolumeManager::unmountAll() { +@@ -1004,6 +1004,7 @@ int VolumeManager::unmountAll() { while ((mentry = getmntent(fp)) != NULL) { auto test = std::string(mentry->mnt_dir); if ((StartsWith(test, "/mnt/") && @@ -21,5 +21,5 @@ index c981f2d4..ce2a4510 100644 !StartsWith(test, "/mnt/scratch") && #endif -- -2.25.1 +2.34.1 diff --git a/patches_treble_td/platform_system_vold/0004-Exfat-can-be-mounted-with-exfat-kernel-fs-driver-or-.patch b/patches_treble_td/platform_system_vold/0004-Exfat-can-be-mounted-with-exfat-kernel-fs-driver-or-.patch index 92b1dca..edc5f54 100644 --- a/patches_treble_td/platform_system_vold/0004-Exfat-can-be-mounted-with-exfat-kernel-fs-driver-or-.patch +++ b/patches_treble_td/platform_system_vold/0004-Exfat-can-be-mounted-with-exfat-kernel-fs-driver-or-.patch @@ -1,4 +1,4 @@ -From 912126dd1cbdd610440ca1b35c4479fa0c61dc12 Mon Sep 17 00:00:00 2001 +From c2d239096a04484797137017eb717393cc21d212 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 18 Oct 2022 16:08:09 -0400 Subject: [PATCH 4/5] Exfat can be mounted with "exfat" kernel fs driver, or @@ -29,10 +29,10 @@ index 5e719b6..e20f170 100644 } diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp -index c8b19e0..46a0e2d 100644 +index ed53921..bbc739b 100644 --- a/fs/Exfat.cpp +++ b/fs/Exfat.cpp -@@ -61,13 +61,20 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi +@@ -64,13 +64,20 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi auto mountData = android::base::StringPrintf("uid=%d,gid=%d,fmask=%o,dmask=%o", ownerUid, ownerGid, permMask, permMask); diff --git a/patches_treble_td/platform_system_vold/0005-Every-voldmanaged-storage-is-adoptable.patch b/patches_treble_td/platform_system_vold/0005-Every-voldmanaged-storage-is-adoptable.patch index 0cf057d..a9b22cf 100644 --- a/patches_treble_td/platform_system_vold/0005-Every-voldmanaged-storage-is-adoptable.patch +++ b/patches_treble_td/platform_system_vold/0005-Every-voldmanaged-storage-is-adoptable.patch @@ -1,4 +1,4 @@ -From 8ace1f37a88088486cd0f3c90ca57ac4293de5bd Mon Sep 17 00:00:00 2001 +From 81b0def0a844125866b212ecd4ac396a94b3b45a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 11 Mar 2020 14:02:35 +0100 Subject: [PATCH 5/5] Every voldmanaged storage is adoptable @@ -8,11 +8,11 @@ Subject: [PATCH 5/5] Every voldmanaged storage is adoptable 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp -index 078ee14b..475060dc 100644 +index 261f4d4..a45215f 100644 --- a/main.cpp +++ b/main.cpp -@@ -269,7 +269,7 @@ static int process_config(VolumeManager* vm, VoldConfigs* configs) { - std::string nickname(entry.label); +@@ -275,7 +275,7 @@ static int process_config(VolumeManager* vm, VoldConfigs* configs) { + int partnum = entry.partnum; int flags = 0; - if (entry.is_encryptable()) { @@ -21,5 +21,5 @@ index 078ee14b..475060dc 100644 configs->has_adoptable = true; } -- -2.25.1 +2.34.1