Commit Graph

112 Commits

Author SHA1 Message Date
Adithya R
cfc13a3311 sm6150-common: sepolicy: Allow system_server to read fastcharge node
* required for oem fast charger detection

Change-Id: Ide02d4a2161b4e0d023eba18626aebe8cd3e11f9
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
madmax7896
aef13ef6af sm6150-common: sepolicy: Import changes for Dolby Atmos
Change-Id: I6999d3a5c6edcf6f85ada7d0077149be639f814d
Signed-off-by: Mesquita <mesquita@aospa.co>
Signed-off-by: basamaryan <basam.aryan@gmail.com>
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
Adithya R
90580e81c9 sm6150-common: Update XiaomiParts from sm8450-common
History:

commit ab1ba8cc8256c97c288d0aa31931643a8598b761
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Apr 14 19:57:23 2024 +0530

    sm6150-common: parts: Move dolby to hw/xiaomi

    Change-Id: Ie7ac39dfc4e69982cd43da019d434ba01f65c787

commit 9bc63a79e1d90af61fb758781040cd08c0de1b8f
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Apr 14 18:17:54 2024 +0530

    sm6150-common: parts: Get rid of proguard flags

    This is obsolete.

    Change-Id: I1b692d3e1a96c49ac6efd54907ea23c4b4494f7e

commit 0c64092cb978babffb776c0775e8c5090b3f17d7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Apr 14 18:06:04 2024 +0530

    sm6150-common: parts: Move to device encrypted storage

    Kill unnecessary explicit app version while we're at it.

    Change-Id: I678e3598b28b57e1920da584102d8c526ab452ef

commit 3bb69c1c22dee2d2d0f830c0da08d27b620030d2
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Mar 21 21:35:36 2024 +0530

    sm6150-common: parts: Restore dolby profile on audio changes

    Something keeps resetting back at random times, from what I observed,
    after resuming media or on a device change, lets workaround that.

    Change-Id: Id065f2482636194655c2399f0c35ad56b8e7a29d

commit bf02a606ceff8b950fa3f9b28031b5078c098a6c
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Dec 31 20:36:52 2023 +0530

    sm6150-common: parts: Re-enable speaker virtualization after bootup

    For whatever reason, speaker virtualization isn't automatically
    restored at bootup unlike the other parameters. It was reported to be
    fixed by connecting and disconnecting headphones or disabling and
    enabling the toggle, so let's just automate that at bootup.

    Change-Id: I091ef403ec6fcdcc382c824b7a2e71e28301d684

commit 9bacc59d19250e4407dbd0509f55f0e902b13ba2
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Dec 10 14:49:23 2023 +0530

    sm6150-common: parts: Fix thermal profile screen state handling

    Change-Id: I7c85757e7ee5d1d44c86b5c32834281efa362f93

commit 1ef2c05cc91a6c5dcc8077b1021fe9d69d2c6028
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Nov 7 08:12:46 2023 +0530

    sm6150-common: parts: Start services as early as possible on bootup

    BOOT_COMPLETED intent is broadcast only after the device is unlocked and
    user data (encrypted storage) is available. Use LOCKED_BOOT_COMPLETED
    intent for services that don't require accessing data.

    While we're at it, target latest SDK and uprev the package.

    Change-Id: I460c1612fd060655fde1f984ed5b025c575acb0e

commit f00f985207e60b911400bb4703d1b0f72d9f7a42
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Mon Nov 6 23:53:46 2023 +0530

    sm6150-common: parts: Yeet misound and clear speaker

    Change-Id: Ief9cb1e31ace1cd9505cea1607c917336c5ddf80

commit c1bc213b222a6c785598ed578481dc3fd8fd95e7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Mon Oct 16 06:44:06 2023 +0530

    sm6150-common: parts: Add toggle for Dolby volume leveler

    Change-Id: I63804773535f290d09724cfc8b1ee58f32ca89ab
    Signed-off-by: basamaryan <basam.aryan@gmail.com>

commit 75544a654056f8605c0777059dc921f463fd3195
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Oct 12 19:30:05 2023 +0530

    sm6150-common: parts: Implement Dolby profile-specific settings

    Change-Id: I779c49bbb1d625628d8af55733e1f8c614cacbfa
    Signed-off-by: basamaryan <basam.aryan@gmail.com>

commit 1af07ceffa521bdc050599c66c4bf7eb3d7bd62e
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Mon Oct 9 21:58:58 2023 +0530

    sm6150-common: parts: Remove play/pause hack while toggling Dolby

    Not required with/fixed by:
    35217: audioflinger: Do not allow DAP effect to be suspended | https://gerrit.aospa.co/c/AOSPA/android_frameworks_av/+/35217

    Change-Id: I6264cb773b2577c627cfe5a4f52cea5c437ee796

commit c755f396f0bbba06f912ce6cc84a5841b17af7f8
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Oct 10 08:04:31 2023 +0530

    sm6150-common: parts: Introduce more Dolby Atmos effects

    - Bass Enhancer
    - Dialogue Enhancer
    - Stereo Widening

    Change-Id: I9fccea5fd2c391a06af894ca0dad4e73d981bf6f
    Signed-off-by: basamaryan <basam.aryan@gmail.com>

commit a1161a70237183a300aa5eac087177bd640ee6ba
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Sep 13 21:44:46 2023 +0530

    sm6150-common: parts: Rename app to Xiaomi Parts

    This sounds less confusing than "Advanced settings".

    Change-Id: Ibb34a5a18534ec27563715a00ae452fc50edbaec

commit 041b170bf7f1e5baba717ebfe03c4bb05c087cb9
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Sep 13 21:41:20 2023 +0530

    sm6150-common: parts: Set proper summary for dolby settings

    Show the current status in Settings > Sound as well as the QS tile.

    Change-Id: I85226144494b82c2bf3359ca3831acfa6640a341

commit b41ebe250c7eb930bce616ef11205d3700c17449
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Sep 13 20:22:03 2023 +0530

    sm6150-common: parts: Override MusicFX and handle EQ intent

    Get rid of AOSP equalizer, no one uses it. Instead advertise our
    Dolby Atmos settings as the system-wide equalizer, allowing apps
    such as Spotify to open it directly.

    Change-Id: I4dc4a8d16b68181f5cd0e3d09430f3c4f7ce29e5

commit f027b9c6e09f82b47a5f65e23a138e03ff2bfe07
Author: Fabian Leutenegger <fabian.leutenegger@bluewin.ch>
Date:   Fri Aug 25 10:26:53 2023 +0200

    sm6150-common: parts: Always refresh playback if status changed

     * otherwise dolby would stay active even if you disable its setting

    Change-Id: If59d8081fa12da2aa67e5149db97965c0805d76e

commit 8a346a31ed0f39aa87beff9ba41bf1fd09c6e6f4
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Mon Aug 21 13:21:18 2023 +0530

    sm6150-common: parts: Introduce Dolby Atmos

    Based on existing dirac implementation and observing stock
    sound effects app and daxservice.

    Thanks to jhenrique09 for the hack from old dirac parts
    "Pause/play music stream to get effects applied".

    TODO: bring back misound (same as stock)

    Co-authored-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
    Change-Id: I528a8c90defe336dcb79fa1c31d3d52b9d39fe14
    Signed-off-by: basamaryan <basam.aryan@gmail.com>

commit 13e03eaa6a9de6b5b55eb6081e166db403a5b09a
Author: Jyotiraditya Panda <jyotiraditya@aospa.co>
Date:   Sat Jun 3 23:38:59 2023 +0530

    sm6150-common: parts: Refactor ClearSpeakerFragment code

     - Removed unused imports
     - Proper resource release by using try-finally block
     - Added null checks for MediaPlayer methods
     - Remove audio parameter as its unused

    Change-Id: I7dc2ba7baf6e0193e13583a7454da296254d7333
    Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

commit 7023c6cec6b5717c9449f09a8f2435eba1b42048
Author: someone5678 <nemui3353@gmail.com>
Date:   Tue Jan 11 03:23:15 2022 +0900

    sm6150-common: parts: Add {navigation,video} thermal profiles

    * icon taken from https://fonts.google.com

    Change-Id: Ica3ced4d6fd79ff048f20469d4c4d2082e17ee7b
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit 7c60b8549487bf12a04628e85213b96d0c705c40
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Fri, 31 Dec 2021 12:29:01 +0530
        lisa: parts: Cleanup and adapt for lisa

         * move to system_ext
         * remove lcd features (we have amoled)
         * remove thermal profiles for now until we
           rework it to use touchfeature

    commit 7e2b229e82988faa9c703020dad6e78d5140860f
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat, 14 May 2022 19:32:41 +0530

        lisa: parts: Enable back thermal settings and service

commit be0b6a7c6582de694b583eee4a52c8377af80c1a
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun May 15 14:02:06 2022 +0530

    sm6150-common: sepolicy: Allow system_app to write thermal sysfs

     * required for xiaomi parts thermal profiles

    Change-Id: I10c14088b591720801b51e412a8c666ebc53e31e

commit 36f226ecc3497437e00c4edbd5679e9dc76bad25
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Oct 13 23:25:05 2022 +0530

    sm6150-common: parts: Use S theme in thermal settings

    The new spinner theme in T (v33) is too large.
    Ref: da5db6f9db

    Change-Id: I6ae59548e1fb417ea681158df844bcd17ef8bf56

commit b717f60b9abf701b1e30c3541ee2a169431448be
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Oct 13 12:06:35 2022 +0530

    sm6150-common: parts: Restore MiSound scene on boot complete

    This seems to be necessary only for scene (and not
    other parameters).

    Change-Id: I8bc3f2bd280174a3628dc2458ff969d66c1e79b3

commit 2c378805e55571fa85742e9ba3ae8a06c23eef12
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat Jul 23 01:29:10 2022 +0530

    sm6150-common: parts: Open settings on QS tile long press

    Since we have only one QS tile, being MiSound, open
    its settings activity on long presing the tile, instead
    of the default behavior of opening app info.

    Change-Id: Ie3b3444a975a471c2d3ee83eac9347d028521c18

commit 98116844a386fa8828ea8d38eb587734c8b35eb1
Author: Lostark13 <tushar9915@gmail.com>
Date:   Sat Mar 19 21:00:00 2022 +0300

    sm6150-common: parts: Update MiSound headset types

    From lisa V13.0.4.0.SKOMIXM

    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Change-Id: I59e24d429b948dcf5a57449e4f58fc8db58d7627

commit 9899e5be5aaee7053d8aec545e4788e79711b2cd
Author: Lostark13 <tushar9915@gmail.com>
Date:   Sat Mar 19 19:20:57 2022 +0300

    sm6150-common: parts: Add support for MiSound scenes

    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Change-Id: I7a21568dd7fa1bbfe0974e27bb75e570c80e5bd4

commit d34360fa915270019999c9c0942aefce631937d7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Jun 29 16:16:58 2022 +0530

    sm6150-common: parts: Avoid unsafe boot completed receiver

    Ref: https://stackoverflow.com/questions/52628780/how-to-fix-unsafeprotectedbroadcastreceiver
    Reported-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Change-Id: Ib3d72640eca4eda9277ad5fd1181881f2171bcfc

commit 93e16fef831662e60eb020ed6852bd69c433baf5
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun May 15 13:59:56 2022 +0530

    sm6150-common: parts: Sync thermal states with sdm845-common

    https: //github.com/LineageOS/android_device_xiaomi_sdm845-common/blob/lineage-19.1/parts/src/org/lineageos/settings/thermal/ThermalUtils.java#L35
    Change-Id: I21f861dd8d689ce36fcabc6af2cd425b381246a2

commit cbfd42c83606e96905d22ae7337225be9099dcc7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat May 14 19:58:54 2022 +0530

    sm6150-common: parts: Remove per-app touchscreen settings

    Our touchscreen driver uses only xiaomi_touch ioctl
    for configuring touch (gaming) parameters. Until we
    add xiaomi touchfeature or convert it to sysfs, lets
    not use touch profiles for now.

    Change-Id: I6a71b14c95e555b43d71e58a8f6580288e3f2540

commit 4ef9c7bdd8340ad9058db549714351d1d5d2425c
Author: Nauval Rizky <enuma.alrizky@gmail.com>
Date:   Thu Nov 18 00:39:28 2021 +0700

    sm6150-common: parts: Improve thermal profiles and touch settings

    * Migrate from ListView to RecyclerView for better integration with the
      collapsing toolbar and smoother scrolling
    * Move touch settings to its own activity
    * Several UX improvement over the items layout

    Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
    Signed-off-by: chrisw444 <wandersonrodriguesf1@gmail.com>
    Change-Id: I7d843c917b49fe9159dfe89bb38f7bbfed9db48c
    Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

commit 700e79ec79308c3f73283dc7497b271321dbcbb7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat Nov 6 19:46:04 2021 +0530

    sm6150-common: parts: Update and polish vector drawables

    Thanks to WSTxda for these icons

    Co-authored-by: WSTxda <wstxda@gmail.com>
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Change-Id: I89b6935ee8e8afd3da0cbbd971b9941aebd935a5

commit 9a64cf52118a2a8bbb6270a8d175dc8640f02480
Author: Volodymyr Zhdanov <wight554@gmail.com>
Date:   Wed Oct 20 18:04:39 2021 +0300

    surya: parts: Fix Clear Speaker IllegalStateException

    * trace:
      E AndroidRuntime: java.lang.IllegalStateException
      E AndroidRuntime:     at android.media.MediaPlayer._stop(Native Method)
      E AndroidRuntime:     at android.media.MediaPlayer.stop(MediaPlayer.java:1397)

    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

commit 76a573a110e4022b0f7a24b499ac782a9f160244
Author: TheScarastic <warabhishek@gmail.com>
Date:   Wed Oct 6 07:25:13 2021 +0000

    surya: parts: Adapt UI to Android 12 style

     * Use Theme.SubSettingsBase for theme
     * Replace PreferenceActivity with CollapsingToolbarBaseActivity
     * Add Titles to prefernce screen
     * Remove onOptionsItemSelected and where neccessary move to activity

    [ghostrider-reborn]
     * Adapt to our XiaomiParts (surya)

    Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

commit 9920fd5ff04c393d138b5a04c92d20153050e651
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Oct 31 14:43:19 2021 +0530

    surya: Initial Android 12 bringup

commit ee07247b649074048be64a69928c06c3a7cb0e0b
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat Sep 4 00:34:25 2021 +0530

    surya: parts: Update CABC icon from WSTxda

    Credits: https://t.me/WSTxda

commit bcf02911748ca8ae09b1e0386b51fa74bce3cbac
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Sep 1 00:28:46 2021 +0530

    surya: parts: Improve thermal profiles strings

commit cad45a279775d988fc3ac9aba6a95d932a52694c
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Aug 18 15:02:38 2021 +0530

    surya: parts: Improve game mode and ditch touchfeature

     * nvt driver exports procfs nodes for all these touch
       controls, so there's no need of xiaomi's touchfeature bs

commit 18291cc124d449881b399f8ad1b506905682f3f8
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Wed Aug 18 12:43:50 2021 +0530

    Revert "surya: parts: Remove touchscreen/gaming profiles"

    This reverts commit 6db0f6f6b7cb061a5888816865e3307251028d08.

commit 8ea6cb25efad3c399dd81e5e1660cfe19a3e5996
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sun Aug 15 21:56:27 2021 +0530

    surya: parts: Add support for LCD HBM and CABC

     * write preferences and qs tiles
     * kang icons from realmeparts
     * enable cabc by default
     * address sepolicy denials

    Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

commit be56fe58fd2e70ec509adc71eac0514d5e0188c3
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat Jun 12 15:03:03 2021 +0530

    surya: parts: Add headphones warning for clear speaker

commit b1fe10a4a155b8ac7d875ed50be8ded8da3cdec0
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Sat Jun 12 15:02:54 2021 +0530

    surya: parts: Update clear speaker audio from MIUI 12

commit 6db0f6f6b7cb061a5888816865e3307251028d08
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Mar 9 18:43:07 2021 +0530

    surya: parts: Remove touchscreen/gaming profiles

     * we don't use touchfeature hal atm

commit 82f9fca1c04da1e90e374912bcb899ba7da4e6f1
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Mar 9 18:39:39 2021 +0530

    surya: parts: Remove refresh rate settings

     * we use dynamic refresh rate + aosp's way of setting min refresh rate

commit 2aaeb47b454a7e8d783a919f3d564f92e3e2789c
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Mar 9 18:33:34 2021 +0530

    surya: parts: Remove ambient display settings

     * we use Paranoid Doze

commit cfc4d0b82266381cc6c5e7441ff4330bac8061a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Tue Mar 9 18:31:36 2021 +0530

    surya: Import XiaomiParts from previous device tree

    History:

    commit e869b7dd467f1f6c90dfda6b446c15fb8b78b29b
    Author: Akhil Narang <me@akhilnarang.dev>
    Date:   Thu Apr 2 01:01:09 2020 +0530

        devicesettings: refactor to XiaomiParts, update package name

          * org.lineageos.settings.device -> org.lineageos.settings

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit be555a7d78a54ebae26fb245b3f4a3a6dec4831a
    Author: Joey <joey@lineageos.org>
    Date:   Fri Dec 28 11:33:30 2018 +0100

        phoenix: parts: Introduce Dirac preferences

        Add a frontend for Dirac sound optimization settings.
        Inject into sound preferences through settings IA.

        Change-Id: I37f6e64fa440c43dbe238cc65af5f9b0bbd60d83
        Signed-off-by: Joey <joey@lineageos.org>
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 75e3df970f85ff64c70413e2c07f540cef6c2e2b
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Fri Dec 28 15:13:24 2018 -0500

        phoenix: parts: Add DiracSound backend

        Special thanks to vasishath for his base work on mi3

        Change-Id: Id81e60a18dc34c991b82a5a2685c9041222a6ea7
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 544422c55f632ed6c400f09a60cc0ba3dc83b9c9
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Fri Aug 30 19:00:39 2019 +0530

        phoenix: Add support for hifi

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 39b99cf62950324666b3739ac3c77c78b95fad2d
    Author: Bruno Martins <bgcngm@gmail.com>
    Date:   Tue Jul 9 22:31:00 2019 +0100

        phoenix: parts: dirac: Migrate to androidx

        Change-Id: Ifaa67283a3437549a2304088a0ce377b399da19f
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 6c8964e163b32b8c2c4e42bbf95f6ee7cbd067bf
    Author: Bruno Martins <bgcngm@gmail.com>
    Date:   Mon Sep 2 10:15:57 2019 +0100

        phoenix: parts: Clean up proguard flags

        Change-Id: If0250fb629417d36c2af7286bc0620e682c4576e
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 7232a6a9d3fd9c1c248812e3f3a8409d7c82bcf7
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Fri Oct 4 12:20:49 2019 +0530

        phoenix: Dont restore values on boot

        * Dirac libs are smart enough to store these values on power-off
          and restore them on boot.

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 081aee912efd5c6cde459cfdafbd625087948f34
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Sat Oct 12 17:52:34 2019 +0530

        phoenix: Inject doze preference through ia

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 737c9f7e6543e1f8556f14643158995b100a9c7d
    Author: Akhil Narang <me@akhilnarang.dev>
    Date:   Thu Apr 2 01:18:53 2020 +0530

        phoenix: parts: move cutout and refresh rate settings to display settings

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 5e7b544adcafc470a18dd0666162ec0758ab2f54
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Sat May 9 08:23:43 2020 +0000

        phoenix: Add dynamic thermal profile implementation

        Also add in FileUtils

        Change-Id: I4667b24a8a29a418796dc51b245ede0aca51eea6
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 682065a64cee408252f42e3cda516e40adb40876
    Author: Akhil Narang <me@akhilnarang.dev>
    Date:   Wed May 13 13:04:59 2020 +0530

        phoenix: parts: drop support for browser and youtube thermal modes

          * phoenix doesn't seem to support these

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 2ff56c485635a998de89bede3b1460be8ea8cf7a
    Author: Akhil Narang <me@akhilnarang.dev>
    Date:   Fri Jul 31 11:53:31 2020 +0530

        phoenix: parts: fix refresh rate switching

          * Added in a 90hz option - used SurfaceFlinger for this
            (All credits to DD3Boh for the `RefreshRateUtils.setFPS()` method)

          * Thanks to Abhishek for helping with fixing the BootCompletedReceiver

          * Also formatted code in android studio

        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 3e798e7a83037f933dde98591e7a64aec7ee582e
    Author: Pranav Vashi <neobuddy89@gmail.com>
    Date:   Thu May 21 21:57:18 2020 +0530

        phoenix: Set dynamic thermal interval to 5 sec

        Change-Id: I96a67297645ad9074045e94fce84e664723aa64c
        Signed-off-by: Akhil Narang <me@akhilnarang.dev>

    commit 2f037d2bfeebde57f4edde70d84e8b41e944fc0e
    Author: xyyx <xyyx@mail.ru>
    Date:   Fri Oct 9 09:43:53 2020 +0300

        surya: parts: Fix refresh rate values

        Thanks to akhilnarang for testing commands

        Signed-off-by: Tushar Mahajan <mahajant99@gmail.com>

    commit 5487ea615ea362a81d228156ef947c38d9f12890
    Author: Thomas Shum <jabashque@gmail.com>
    Date:   Tue Feb 25 11:06:43 2020 +0000

        surya: Set config_deviceLightCapabilities
        Signed-off-by: officialyash007 <officialyash007@gmail.com>

    commit 50a0b3a2ea4c54b65bbcc59d35c53548774688f8
    Author: Pranav Vashi <neobuddy89@gmail.com>
    Date:   Thu May 21 23:43:29 2020 +0530

        surya: parts: Add switchbar to disable dynamic thermal

        * Disabled by default since all profile are set to 0 by default.

        included  Switch back to default thermal profile when screen off

        Signed-off-by: Tushar Mahajan <mahajant99@gmail.com>

    commit ac6c96ab4b0cbc3d18e7ae7b7703bbbf11a48c8b
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Tue Oct 20 09:26:33 2020 +0000

        surya: parts: Switch to TaskStackListener

        Signed-off-by: Tushar Mahajan <mahajant99@gmail.com>

    commit cbb83782d5d927b770bb20d4240b6ee3762e6937
    Author: xyyx <xyyx@mail.ru>
    Date:   Tue Oct 20 14:06:01 2020 +0300

        surya: parts: Add a toggle to hide stock cutout

         * replacing existing toggle of pill-style notch

        [filtered from 6107871097]
        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit e190f574409155b4d2d966f7d75eb8ba570768e2
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Jan 2 13:49:54 2021 +0530

        surya: parts: Remove device restart toast from cutout toggle

         * overlays apply immediately, there's no need for a reboot

    commit 7ad716a67e7f7f874ad5e96e4e6a62687e300992
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Jan 2 14:41:20 2021 +0530

        surya: parts: Remove hifi toggle from dirac

         * we don't support it

        This reverts commit 544422c55f632ed6c400f09a60cc0ba3dc83b9c9.

    commit 3620a90cb29f8b3403d6c27b20ebc48865653c42
    Author: arian <arian.kulmer@web.de>
    Date:   Sat Dec 15 15:55:55 2018 +0100

        surya: parts: Add icons to doze menu

        Change-Id: Ibbb18065f97ed6f8f5376752495255aeafe1db82

    commit 2becd16056a5ed0731ddd5f6bb5ac5006930b685
    Author: Arian <arian.kulmer@web.de>
    Date:   Wed Oct 14 23:06:47 2020 +0200

        surya: parts: Allow to wake the screen instead of pulsing

        Co-authored-by: Nauval Rizky <enuma.alrizky@gmail.com>
        Co-authored-by: Fabian Leutenegger <fabian.leutenegger@bluewin.ch>
        Change-Id: I1e74f8eafa51843e77d2d8c514c646a4494327cd

    commit b6fb8d5ce66fb227dc6c7d22fc97c21b45159a56
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Jan 2 16:11:54 2021 +0530

        surya: parts: Bring back proximity sensor doze setttings

    commit 37f8097538d092879377216bd96ffc2e5bee2ed2
    Author: Jyotiraditya <jyotiraditya@aospa.co>
    Date:   Wed Jun 24 13:07:55 2020 +0200

        surya: parts: Implement Clear Speaker

        Co-authored-by: Adithya R <radithya2002@gmail.com>
        Signed-off-by: Jyotiraditya <jyotiraditya@aospa.co>
        Change-Id: I23b8ebd106502e083b6feec9b58efd76e49d3367

    commit 2ab1729921024b31e82e171d6cff5aa0432d97f4
    Author: AshutoshSundresh <ashutoshsundresh@gmail.com>
    Date:   Tue Aug 11 19:39:00 2020 +0200

        surya: parts: Add icon for Clear Speaker

        * Source: d9d25ff406

        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit c8225710b76671ec18088197e4adb9cbd821b079
    Author: Henrique Silva <jhenrique09.mcz@hotmail.com>
    Date:   Wed Jan 16 18:35:48 2019 -0200

        surya: parts: Add summary for dirac

        Change-Id: Icf1f2a5e5aadc7515b5a948b0918d9958aab0f2f

    commit 5b7c2faa82dde494b331b14b50aeed50497c500b
    Author: Henrique Silva <jhenrique09.mcz@hotmail.com>
    Date:   Wed Jan 16 18:51:22 2019 -0200

        surya: parts: Refactor dirac strings

        * From MIUI

        Change-Id: I1caab62ffe441bd9bdb18b429849466d868033dc

    commit e289ccc01f0e7d43522c33eedd39772807184dd4
    Author: Henrique Silva <jhenrique09.mcz@hotmail.com>
    Date:   Wed Jan 16 20:06:11 2019 -0200

        surya: parts: Import dirac translations from MIUI

        Signed-off-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
        Change-Id: I00e015f67d9a01391768a0d07605aea0f6a36765

    commit c9360ecca62f61306be6f41f6bece4de7ab1b44f
    Author: arian <arian.kulmer@web.de>
    Date:   Sat Dec 15 15:55:55 2018 +0530

        surya: parts: Add vector icons to dirac

        * from https://materialdesignicons.com/ with small changes

        Change-Id: I8eacd97a569ec1a9bcf861ef3bd72c809b611089

    commit 43667c3ca8acf72a5a4bcbe071ba9707f8753f9c
    Author: HarukeyUA <inazarrusnak@gmail.com>
    Date:   Fri Mar 15 18:28:02 2019 +0200

        surya: parts: Add dirac QS tile

        Change-Id: I31759219fc25c8473d52d755eb98f21f5894f691
        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit d597caa99ea756acecb55245cc85a788ea205da4
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Jan 3 02:48:48 2021 +0530

        surya: parts: Increase BootCompletedReceiver priority

         * set the priority to SYSTEM_HIGH_PRIORITY to match other system services
           so our settings are restored faster on bootup

         * also cleanup BootCompletedReceiver while at it

    commit 5a99e271ffe8a1f5d617ea429e03894237d7fe4d
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Jan 2 16:57:24 2021 +0530

        surya: Switch to 90Hz refresh rate by default

         * a sweet spot between 60Hz (battery life) and 120Hz (smoothness)

    commit 443a85200ea670ed9b65ea0fb3928d5f99d30b5a
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Mon Jan 4 20:24:38 2021 +0530

        surya: parts: Add a summary to ambient display

         * "Advanced settings"

    commit 52b70d82fae55aa0db8f66fd05c250107dab2065
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Tue Jan 5 17:12:03 2021 +0530

        surya: Implement proper notch masking to hide camera cutout

         * this shrinks the display till the area below the notch when
           the toggle is activated, like in MIUI

         * refactor the toggle to show "Hide camera cutout" instead of
           "Use camera cutout"

         * also bring back the toast prompting to reboot, since systemui
           is in a somewhat unstable state after disabling cutout

    commit d3e2d40c5158bfe36c291d2e76e30c29c63e341a
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Tue Jan 12 21:15:30 2021 +0530

        surya: parts: Move thermal profiles to system settings

         * let's not pollute our beautiful battery settings menu

    commit dda07409f7bcca41c8582ce806ecf551226b0b9c
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Jan 16 20:13:15 2021 +0530

        surya: parts: Display icon beside thermal profiles

    commit c52d991e4db4313a97a09694d6414cb49d6cd934
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Tue Jan 19 16:34:55 2021 +0530

        surya: parts: Implement auto-lowering refresh rate on battery saver

    commit f8ace799189a5642fd5b9e5a5d2c19848768c18f
    Author: Bruno Martins <bgcngm@gmail.com>
    Date:   Sat Jan 18 19:04:13 2020 +0000

        surya: parts: Fix dark theme issues

        This brings SwitchBar widget inline with 10 and fixes the
        theme issues when the dark mode is enabled.

        Change-Id: I6909b77bc649eb9eb760bf01b46f66570363e9d9
        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit aecbdebae5059890eb7d2d92c78eb1d1a3398bce
    Author: Bruno Martins <bgcngm@gmail.com>
    Date:   Sat May 16 12:10:14 2020 +0100

        surya: parts: Prevent NPE before DiracSound is initialized

        There can be an edge case where the BOOT_COMPLETED intent is not
        yet received and user tries to open Dirac sound settings. Avoid
        letting it crash by making sure init is executed before showing the
        preference screen.

        Change-Id: I77e6bdd0c61994338f0dbbce4bfa532d84b8afb7

    commit c2b435ddedd4e7999ca2c07257b4e60cb34ac1f2
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Jan 24 14:13:23 2021 +0530

        surya: parts: Remove switchbar from dynamic thermal

        This partially reverts commit 50a0b3a2ea4c54b65bbcc59d35c53548774688f8.

    commit 8decedb02bff5af1132c67b515c7caf06ff68f27
    Author: TheScarastic <warabhishek@gmail.com>
    Date:   Tue Oct 20 18:21:03 2020 +0000

        surya: parts: Add touch profiles for gaming and benchmarking

        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit b7f71a25e0d9c12dd184dd1a56302df9f8bcf5cc
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Jan 24 15:33:56 2021 +0530

        surya: parts: Adapt gaming profiles for our device

    commit e38a388c2e710dde58603bbe94d6e1dbfa1a21b6
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Jan 31 16:46:03 2021 +0530

        surya: parts: Add ACTION_SCREEN_ON intent filter

         * this should fix thermal/touchscreen profiles not
           getting restored after turning screen back on

    commit 9b8cab5982e291d0e116cc4139bcc9b52a9a77e7
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Jan 31 17:12:06 2021 +0530

        surya: parts: Improve strings for game mode

    commit 06f75cad29dc704a8ce9fc2d7fd02d9275f449f6
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Fri Feb 12 19:47:12 2021 +0530

        surya: parts: Reduce thermal profiles summary length

    commit 11f468131d4c907142c8462c26a07ba325e602a5
    Author: Kuba Wojciechowski <nullbytepl@gmail.com>
    Date:   Fri Feb 12 21:10:28 2021 +0300

        surya: parts: Introduce LOCKED_BOOT_COMPLETED handler

        * sets the fps a little earlier, providing better ux in some cases
        * note: fps doesn't actually get set until screen is power cycled, I
          believe this is a bug with our prebuilt display stack (hwc?)

        Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>

    commit 85b0ed765f43dab75eaa38c3e808047c96126d72
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Fri Feb 12 22:44:29 2021 +0530

        surya: parts: Introduce Refresh Rate QS tile

         * icon kanged from 9dd04b5791 (diff-004f2aace6a940c83c59f0a9311ad0e929b6f0c24cd4ec8049c8c71b42dca70f)

    commit 0768837459db74dcf4b09b16f5c3d6070ec27105
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sun Feb 14 00:13:57 2021 +0530

        surya: parts: Update dirac QS tile title

    commit 40bce77b65b5b088e7f3bbc984d1beee81dd0453
    Author: Anushek <anushekprasal@gmail.com>
    Date:   Fri May 24 09:31:12 2019 +0000

        surya: parts: Update dirac QS tile icon

        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

    commit aa03d0af1fc9c9810231f414c5f4a727678e5e9c
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Thu Feb 18 22:44:26 2021 +0530

        surya: parts: Use headphones icon for dirac QS tile

         * looks far better than the current "D" icon introduced in
           40bce77b65b5b088e7f3bbc984d1beee81dd0453

    commit 47ce0a7237bebed46bf0165250eba7814657c8e0
    Author: Kuba Wojciechowski <nullbytepl@gmail.com>
    Date:   Thu Feb 4 11:07:21 2021 +0300

        surya: parts: Get rid of cutout settings

        * it doesn't work that great and it should be provided by the system, if desired

        Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
        Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>

Change-Id: I7dc832e725442c4be50ebd84fbdfc11fb4d6589d
Signed-off-by: basamaryan <basam.aryan@gmail.com>
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
vantoman
8470910084 sm6150-common: livedisplay: Rename AntiFlicker node
Change-Id: I563b4de02ae41755d707da84bc1bbf937228b68c
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
basamaryan
215025ef4d sm6150-common: sepolicy: Allow vendor_fp_prop to be modified
Change-Id: I48e0d1a885ac62886b1e622ce68598270044ef84
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
basamaryan
3df5cd506c
sm6150-common: Commonize sepolicy
Taken from davinci, courbet, surya, sweet, and sweet2

Change-Id: Ie9bd3354d42a36e88004ee77343e0da5397a0eba
2024-10-15 13:25:09 -04:00
Michael Bestas
15305da793
sm6150-common: sepolicy: Move common wakeup nodes to qcom sepolicy
These are not device specific and don't belong here.

Change-Id: I47de84155fa4bd81fb67b3d6ba5465b0b5db4437
2024-07-16 12:21:02 +05:30
basamaryan
12c3135ffb
sm6150-common: sepolicy: Allow fingerprint HAL to use vndbinder
Change-Id: Ic6c70a39392e349e0770411f42af15eebc5dfea4
2024-06-22 17:27:09 +05:30
basamaryan
0c3bad3c75
sm6150-common: sepolicy: Allow fingerprint HAL to interact with uevent socket
Change-Id: I11d2388b6c7894917f488334efd2851d5a938cd3
2024-06-22 17:27:09 +05:30
basamaryan
50193c8135
sm6150-common: sepolicy: Add fortsense and sunwave fingerprint rules
Change-Id: Icea6d25bde0cb54e3926b009a7b76c264e44c77e
2024-06-22 17:27:09 +05:30
Sebastiano Barezzi
176839842d
sm6150-common: sepolicy: Label double_tap sysfs node
Change-Id: Idcff758444a5c89ba20f2ae804a407ee78c445cb
2024-06-22 17:27:09 +05:30
Sebastiano Barezzi
ed6986e80f
sm6150-common: Move to common Xiaomi light AIDL
Change-Id: I00494cd392d19abd97cd65aeb4ec4bd9c9b11352
2024-06-18 02:05:33 +05:30
Bruno Martins
22ae2ff2f8 sm6150-common: Use common libqti-perfd-client and power-libperfmgr
Change-Id: I22d6b35c72629553817005deaefcae60abc72cfd
2024-05-19 18:07:53 +02:00
danielml
54a261cbd5
sm6150-common: sepolicy: Follow stock label for ro.product.mod_device
* This allows us to dynamically override the property from vendor_init

Change-Id: Id80b60028e78ae1fcc9236f66570a27759ecbdc4
Signed-off-by: danielml <daniel@danielml.dev>
2024-04-10 13:26:48 -04:00
Michael Bestas
f531fce60d
sm6150-common: Switch to android.hardware.usb@1.3-service.dual_role_usb
Change-Id: Ibd14f7d31dfaf41e040302eda3bc49f351deb618
2024-04-10 13:26:48 -04:00
basamaryan
828234a087
sm6150-common: sepolicy: Drop duplicated wakeup node
* https://review.lineageos.org/c/LineageOS/android_device_qcom_sepolicy_vndr/+/356003

Change-Id: Id5b60a4d89324cabb224609d35ca583482685447
2023-10-05 11:00:04 -04:00
danielml
cc633a0998 sm6150-common: sepolicy: Label /dev/block/mmcblk0p1 as sdcard block device
* Needed for DSU

Change-Id: I25f7272621451723eb0fc72d9b772795a1f8ed51
Signed-off-by: danielml <daniel@danielml.dev>
2023-08-20 18:47:33 +02:00
Arian
ffd0ded683 sm6150-common: sepolicy: Label cust, system and vendor block devices as system_block_device
Change-Id: Id230ee4893e67689e9162e834e9c7b9c5482c6c8
2023-08-20 18:46:58 +02:00
Arian
19e23767df Revert "sm6150-common: Force restorecon for /mnt/vendor/persist"
This reverts commit a13246a7fc.

This causes dac_override denials, set no_sehash_xattr on persist
in fstab instead to fix the issue.

Change-Id: I75f824d5b2beca5f7c3835045a7f568736e148f0
2023-06-05 11:38:04 +02:00
danielml
84cbd43575 Revert "sm6150-common: parts: Enable doze_status on screen off"
* Manually setting the doze status before entering the low-power mode
  makes the doze mode not to be set correctly on sweet.

* The doze status is automatically set when entering the low-power mode

This reverts commit 10f101e143.

Change-Id: I4dfee2ffb351b9bc426268e437a26f9eaefec319
2023-06-05 11:38:04 +02:00
danielml
f4e2098486 sm6150-common: sepolicy: Rename sys.panel.display to vendor.panel.display
Change-Id: I1765a9f867dad4ec7bdea40c50671e6416f871cb
Signed-off-by: danielml <daniel@danielml.dev>
2023-06-05 11:38:04 +02:00
Sebastiano Barezzi
c87372b3db sm6150-common: sepolicy: Drop camera.sensor* properties
* These were renamed to vendor.camera.* properties whose definition
  already exists in our current policy

Change-Id: I4392a7880d36b6b6d6aff4a6d9b43c1fc2bab950
2023-06-05 11:38:04 +02:00
Sebastiano Barezzi
6d2810da32 sm6150-common: sepolicy: Bringup property_contexts for Android 13
Change-Id: I60070ba7658ce262be66ee3bdd0cb6cdcf9b8c49
2023-06-05 11:38:04 +02:00
danielml
187b64e74f sm6150-common: sepolicy: Remove no longer existing properties
Change-Id: Icf3ef6dbf497671fec757f0de56d58df432d1d87
Signed-off-by: danielml <daniel@danielml.dev>
2023-06-05 11:38:04 +02:00
basamaryan
4fd45a6d3a sm6150-common: sepolicy: Label fpc wakeup node
Change-Id: I6c7b7d5d2777bfae02b3bd8b0d875ccc2564f337
2023-06-05 11:38:04 +02:00
LuK1337
b2babf0134 sm6150-common: Make trust use dwc3 usb_data_enabled
Change-Id: I8fab94faf383c57e872596f8bb3c448afc6d75de
2023-06-03 21:42:43 +02:00
raghavt20
4a67b5eb26 sm6150-common: sepolicy: Label Spi IR node
Change-Id: I550e823b11bbc8e37cffa164a2047d57d8a5499a
Signed-off-by: raghavt20 <raghavt20@aospa.co>
2023-05-18 17:09:45 +05:30
basamaryan
52a5530afe sm6150-common: sepolicy: Label more wakeup nodes
Change-Id: I3fd5d4f44b28b7c0c8bff6adb8d39e9a389b1981
2023-01-27 01:32:59 +00:00
Bruno Martins
bb8d9f4905 sm6150-common: sepolicy: Label UDFPS state node
Change-Id: I7a4ca9a3e98e0af90be5aedc88fa1eaa344abb76
2022-11-15 11:20:32 +01:00
Arian
28b9dec732 sm6150-common: sepolicy: Label new telephony properties
Change-Id: Iad765076ceba263e4933374178eec670ffc81959
2022-07-13 17:54:15 +02:00
Bruno Martins
cc3ba5c9c2 sm6150-common: Move to common fingerprint HIDL
Change-Id: I7cb0a45c865d9dbfd800b1d633f8d5ae613bb1b9
2022-06-28 00:41:07 +02:00
Arian
f97544641c sm6150-common: sepolicy: Extend vendor_toolbox permissions to files in persist
Change-Id: Idf0d7b67e861d2dcb8f6b46cbd2cc5b26b77e08d
2022-06-28 00:40:59 +02:00
Arian
dc759f6420 sm6150-common: sepolicy: Label additional usb related wakeup nodes
Change-Id: I21b3a00d504938f0b1da02f606c8f0fb729aa089
2022-06-28 00:23:34 +02:00
Arian
08b94607f0 Revert "davinci: sepolicy: Remove qcom PMIC devices wakeup nodes"
* These are not labelled by qcom sepolicy on 19.1 anymore

This reverts commit a02dd0dd72.

Change-Id: I5beb0916a1942507f13720de0d0d986422e5eb2e
2022-06-28 00:23:34 +02:00
Felix
a13246a7fc sm6150-common: Force restorecon for /mnt/vendor/persist
The restorecon_recursive directive in init is only applied if the
file_contexts file changed between builds, but not necessarily if any
file or folder inside /mnt/vendor/persist/ has changed.

The restorecon code checks whether an xattr named
"security.sehash" contains a string that matches the current
combined hashes of the SELinux context files and skips restoring labels
if there is a match, see
https://android.googlesource.com/platform/external/selinux/+/refs/tags/android-9.0.0_r35/libselinux/src/android/android_platform.c#1546

Force wiping that xattr so that restorecon always runs since it's not
very expensive (there are currently only about 50 files on /persist).

The restorecon is needed to fix issues such as wrong stock labels on
/mnt/vendor/persist/sensors/:
sensors_persist_file -> persist_sensors_file

Change-Id: Ic0cd848836ee550499d9236f56ed6e939e35f01e
2022-03-27 13:38:12 +02:00
Arian
f23eac1c98 sm6150-common: sepolicy: Add vendor prefix to camera persist file type
Change-Id: Ia42113acb0fcf5667c0b89ecdd7def13681ca0be
2022-03-27 13:38:07 +02:00
Arian
5a4c03d68e sm6150-common: sepolicy: Move xiaomi specific property labels to vendor
Change-Id: I4f2f5e2ee9b0751e3af14fbb1cd4ab93814755f8
2021-12-29 10:19:42 +00:00
Arian
1edab42a1a Revert "davinci: sepolicy: Label manufacturer prop used by camera hal"
This is labelled in system/sepolicy as build_prop now

This reverts commit 50625df1c3.

Change-Id: Ia744a2c2eba1c6aade04e29c975c6b8bc26c9fee
2021-12-29 10:19:01 +00:00
Inseob Kim
87b0b914b1 sm6150-common: sepolicy: Attach vendor_property_type to properties
We are going to enforce that each property has an explicit owner, such
as system, vendor, or product. This attaches vendor_property_type to
properties defined under vendor sepolicy directories.

Bug: 159097992
Test: m selinux_policy && boot device
Change-Id: Ibed833cd9e5d786e82985ded6bc62abdf8cd9ded
Merged-In: Ibed833cd9e5d786e82985ded6bc62abdf8cd9ded
(cherry picked from commit 44eb8e1f89adf04fd413a69391fd444ba68af742)
(cherry picked from commit 1922128397116d551a663d5344b4456a84bf46eb)
2021-12-29 10:18:50 +00:00
Cosmin Tanislav
bd7d6d7d59 sm6150-common: fingerprint: Add thread listening for fod_ui sysfs event
Change-Id: I36f5789657daa70cf39fbdfe501392b9f96dbf2e
2021-12-29 10:17:39 +00:00
Arian
3cf7b626a4 sm6150-common: fingerprint: Conditionally implement UDFPS
hardware/fingerprint.h is imported from android-12.0.0_r1.
The xiaomi fingerprint extension command was added to the
fingerprint_device struct and it was clang-formatted.

Change-Id: I5c5f876eb47a558059a2423ca5f6cc75afaf3e1d
2021-12-29 10:16:45 +00:00
Arian
a54d369435 sm6150-common: fingerprint: Uprev to 2.3 HAL
Change-Id: I56ea1646ef464f7e533add5a0017620e21db686d
2021-12-29 10:13:58 +00:00
Arian
565809d0b5 Revert "sm6150-common: fingerprint: Allow to build without fingerprintextension"
This reverts commit a8c1391091.

Change-Id: I78244b2491b8ba824907cf1cb056c2f26bffbc72
2021-12-29 10:13:58 +00:00
Jaegeuk Kim
778c3c7f4a sm6150-common: sepolicy: Allow ioctl to zram_swap for performance
This fixes permission denied when setting F2FS_PIN_FILE.

[   46.726131] init: [libfs_mgr]Failed to set pin_file for f2fs: /data/per_boot/zram_swap: Permission denied
[   46.726151] init: [libfs_mgr]Failure of zram backing device file for '/dev/block/zram0'
[   46.726341] type=1400 audit(1601025878.312:17): avc: denied { ioctl } for comm="init" path="/data/per_boot/zram_swap" dev="dm-9" ino=4868 ioctlcmd=0xf50d scontext=u:r:init:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=0

Bug: 169311165
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I982f70556284ac55d659bae6aff93b84d71e67f0
2021-12-29 09:59:07 +00:00
Mimi Wu
479a60f41c sm6150-common: sepolicy: Modify sepolicy for toolbox to rm -rf /data/per_boot
type=1400 audit(1581489923.612:571): avc: denied { getattr } for comm="rm" path="/data/per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.612:572): avc: denied { read } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.612:573): avc: denied { open } for comm="rm" path="/data/per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.616:574): avc: denied { getattr } for comm="rm" path="/data/per_boot/ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=1
type=1400 audit(1581489923.616:575): avc: denied { write } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.616:576): avc: denied { remove_name } for comm="rm" name="ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1
type=1400 audit(1581489923.619:577): avc: denied { unlink } for comm="rm" name="ft09,GYyRLUL4NXv4BjupD" dev="dm-9" ino=4578 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=1
type=1400 audit(1581489923.656:578): avc: denied { rmdir } for comm="rm" name="per_boot" dev="dm-9" ino=4577 scontext=u:r:toolbox:s0 tcontext=u:object_r:per_boot_file:s0 tclass=dir permissive=1

Bug: 147469156
Test: flash full build and find avc errors gone
Change-Id: I22706c63fb13ea2aae0cd9fe8b92edc578fd459e
Signed-off-by: Mimi Wu <mimiwu@google.com>
2021-12-29 09:59:01 +00:00
Mimi Wu
73025604d6 sm6150-common: sepolicy: Add sepolicy for kernel to access /data/per_boot/zram_swap
type=1400 audit(1581485243.256:88): avc: denied { read } for comm="loop29" path="/data/per_boot/zram_swap" dev="dm-9" ino=9820 scontext=u:r:kernel:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0

Bug: 147469156
Test: flash full build and find avc errors gone
Change-Id: I48d7684ce3b4ca1ada81011b1cab21007c758ba5
Signed-off-by: Mimi Wu <mimiwu@google.com>
2021-12-29 09:58:35 +00:00
Arian
514f6bb6b0
sm6150-common: sepolicy: Allow power HAL to read idle_state node
Change-Id: I53e0f3ed275a93d6d5cd0001a438221a043e3ea8
2021-07-14 21:05:07 +02:00
Arian
5875449baa
sm6150-common: sepolicy: Label fastrpc adsprpc wakeup nodes
Change-Id: Ia0268c7aa4cc9344e5a2a76dd661ff1a15b747ef
2021-07-14 20:59:14 +02:00
Arian
a73e27936f
sm6150-common: Set permissions on /dev/xiaomi-touch
Change-Id: I94f9b64f983098b6497ffcdee9817c72d471528f
2021-07-13 22:13:56 +02:00
Arian
10f101e143
sm6150-common: parts: Enable doze_status on screen off
* This allows to enter the doze state faster when unlocking from lockscreen

Change-Id: I1900436c974a605555275ef67b283ead2cf720b5
2021-07-03 21:23:39 +02:00