Skip to content
Snippets Groups Projects
  1. May 24, 2022
    • Kevin Chyn's avatar
      Workaround to support low-area UDFPS on BP · 4e08b36d
      Kevin Chyn authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      1) Ensure the spacer measurement is clamped to 0. Negative values
         cause the layout to exhibit undefined behavior.
      2) Instead of making the layout xml even more complicated, for low-area
         sensor devices, we just have onLayoutInternal() translate the icon
         and indicator to where it should be. Note that this can definitely
         cause overlap with the button bar, but at least this implementation
         allows the button bar to be shown (and thus pass curent CTS
         requirements). We can have additional refinement in the future.
      
      Bug: 201510778
      Test: atest CtsBiometricsTestCases
      Change-Id: Ie9869f15fc3afddc3bd4392a2fd08efbf136cd6c
      4e08b36d
    • Tư Mã Tần Quảng's avatar
      Add CLI command to restrict all network usage · b062e19f
      Tư Mã Tần Quảng authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Reference: https://review.lineageos.org/c/324695
      
      
      Signed-off-by: default avatarTư Mã Tần Quảng <baobaoxich@gmail.com>
      Change-Id: I07dd734faca6116356fc05af7dff262bec65b4cb
      b062e19f
    • tumatanquang's avatar
      Add CLI commands to restrict Wi-Fi, Cellular, and VPN data · cf46d964
      tumatanquang authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      * The creates a CLI accessible version of per-app cellular data,
        VPN, and wifi restrictions.
      
      Reference: https://review.lineageos.org/c/259455
      
      
      Signed-off-by: default avatartumatanquang <baobaoxich@yahoo.com>
      Change-Id: I005cacdd7be3e6311ef47465d3fca7fa847d3b7e
      cf46d964
    • SagarMakhar's avatar
      Use flow layout for advanced power menu as well · 1f0b93cf
      SagarMakhar authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      Change-Id: I62e46729278d57b8b21aa0c307f25d9ec053b216
      Signed-off-by: default avatarSamarV-121 <samarvispute121@pm.me>
      1f0b93cf
    • Michael Bestas's avatar
      frameworks: Add support for advanced restart options · 0c120a33
      Michael Bestas authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      Based on the following changes:
      
      Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
      Date:   Mon Nov 4 03:37:40 2013 +0000
      
          framework: Add advanced reboot options (2 of 2)
      
          This commit is an squash of the commits below and re-adds the reboot
          logic to CM.
      
          I took the liberty to rewrite some of the ShutdownThread code because
          it had some lingering issues present since I originally wrote this
          for CM7 (!!). Namely, the reboot reason was being changed when the items
          are pressed instead of when the user presses the positive button. This
          made some people add workarounds like handling back button presses and
          whatnot, these are gone now.
      
          commit 588464bea40b92b04c4aeee35c47f7becceeed56
          Author: Roman Birg <roman@cyngn.com>
          Date:   Thu Jul 10 14:20:42 2014 -0700
      
              advanced reboot: add soft reboot option
      
              Adds a "Soft reboot" option which restarts zygote, as requested in JIRA
              CYAN-3998
      
              Change-Id: Ia6e5ed9b053e1c5ebd1fc55e5692858b97f7e0fc
      Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
      
          commit 3e7b92551bbf818ace41cd9b9532473ed7d18f2f
          Author: Veeti Paananen <veeti.paananen@rojekti.fi>
          Date:   Tue Jul 23 16:34:35 2013 +0300
      
              Show advanced reboot if using an insecure lock screen
      
              Enables the advanced reboot menu when locked if the selected lock method
              is insecure (= slide unlock).
      
              Change-Id: I759b7b31c5411597e2537a85183d73ec02eb2461
      
          commit cf42ed3993d5d05c9b2591883fefb6338fbcdd40
          Author: DvTonder <david.vantonder@gmail.com>
          Date:   Thu Feb 21 18:20:01 2013 -0500
      
              Framework: Show the Advanced reboot menu only for the primary user
      
              Change-Id: I73f82eade26f268e2b4608fa23cabcf0bb8fc862
      
          commit 08aa6fd643e0359114b86f50053921dd2d86fc50
          Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
          Date:   Mon Nov 4 03:37:40 2013 +0000
      
              Framework: Add Advanced reboot (2 of 2)
      
              This commit responds to a setting in Development settings for including
              options in the power menu for rebooting into recovery or bootloader. It
              is defauled to off.
      
              When enabled, the Advanced reboot options will only be available once the
              device is unlocked.
      
      Change-Id: I2bc1e7024abb69cb62154d3081df5a3eb7e79df9
      
      Author: Michael Bestas <mikeioannina@gmail.com>
      Date:   Fri Nov 21 23:31:53 2014 +0200
      
          Enhance power menu reboot option
      
          * Use our old reboot icon
          * Set correct dialog title & message when rebooting
          * Move strings to cm_strings
          * Add back reboot_download string used by samsung devices
          * Remove Chinese translations, will be handled through crowdin
      
          Change-Id: I3ba0e20dcdba0a295a071304048eebab6cfcf49d
      
      Author: Michael Bestas <mikeioannina@gmail.com>
      Date:   Sat Jan 31 06:06:38 2015 +0200
      
          GlobalActions: Use circular user avatars
      
          * Use circular & smaller avatars, logic copied from SystemUI
          * Improve current user indication (thanks to maxwen)
      
          Change-Id: I81e6c4afd604f5cb8b22e2c4db9b174bbe7fb3f0
          Ticket-Id: OPO-456, CYNGNOS-1901
      
      Author: Jorge Ruesga <jorge@ruesga.com>
      Date:   Fri Oct 23 19:55:12 2015 +0200
      
          base: don't show reboot options for safe mode
      
          In a user long press in "power off" menu the system lead it to "reboot to safe mode", but if
          the our advance power menu is enabled, we are showing the reboot options instead of the
          safe mode advice message. Since reboot options doesn't made sense here is better to
          respect the original behavior.
      
          Change-Id: I45e7f7a780655ed79d442f583fd9ffa6fba4e447
      Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
      
      Author: Zhao Wei Liew <zhaoweiliew@gmail.com>
      Date:   Sat Dec 10 18:07:51 2016 +0800
      
          core: Adjust power menu icons for 7.1
      
          Resize the icons to fit in with the new power off & restart icons.
      
          Also, use an icon without a home button for the screenshot icon,
          since home button-less phones are a growing trend.
      
          Change-Id: I5131346f65345010bba45dca04f3d767e6f9746a
      
      Author: Dave Kessler <activethrasher00@gmail.com>
      Date:   Wed Feb 18 10:27:58 2015 +0200
      
          GlobalActions: Always add power off option to power menu
      
          Change-Id: I3083cda3b8c665a65f1260984a5be41faa384510
      
      Author: Zhao Wei Liew <zhaoweiliew@gmail.com>
      Date:   Fri Dec 9 20:52:29 2016 +0800
      
          GlobalActions: Inform user of screenshot long-press action
      
          Long-press actions are extremely obscure.
          Hiding the partial screenshot feature behind a long-press
          action is highly detrimental to its discoverability.
      
          Inform the user of the screenshot long-press action
          by displaying a short summary message.
      
          Change-Id: I949bd0ef80a654d6cdf852b7a3138e7379ad36d2
      
      Author: Michael Bestas <mikeioannina@gmail.com>
      Date:   Sat Nov 7 23:52:26 2015 +0200
      
          Fix reboot dialog messages
      
          * Fix mismerge
          * Fix wrong messages being displayed when rebooting to recovery
      
          Change-Id: I09a04cc82d48539e8086fd55c30d6160c292bc08
      
      Author: maxwen <max.weninger@gmail.com>
      Date:   Fri Nov 15 00:16:26 2019 +0100
      
          SystemUI: Add reboot fastboot to power menu
      
          Change-Id: I88f00a273f4a0be1355158c58a24db78cb8e684e
      
      Author: Bruno Martins <bgcngm@gmail.com>
      Date:   Fri Feb 25 09:49:09 2022 +0000
      
          GlobalActionsDialog: Hint that there's more behind restart button
      
          If advanced restart is enabled, show a slightly different text to
          hint that there might be something more behind it. The string exists,
          so make use of it.
      
          Change-Id: I607fb48c24ea7a8c004ccca33af19ced1847e170
      
      Change-Id: Id561b0111e8cc7a80c345668d79a363ec0ec389c
      0c120a33
    • Jesse Chan's avatar
      Implement click to take partial screenshot [1/3] · 712c5b3a
      Jesse Chan authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      Default to the old long press behaviour when the feature is enabled.
      
      Change-Id: I5fc37f818b06db2bd2d315cffee2041a740781ed
      Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
      712c5b3a
    • LuK1337's avatar
      SystemUI: Don't store pending ControlAction if the device is locked · 81b9546a
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Passing control action to activityStarter.dismissKeyguardThenExecute()
      is enough to toggle it post device unlock.
      
      Test: Use a control action from locked device, notice that it's no
            longer toggled twice.
      Change-Id: I48cb9e0ad2425d35063fddefc738ab36c01690b8
      81b9546a
    • Arne Coucheron's avatar
      SystemUI: Only add GarbageMonitor tile to default tiles on ENG builds · 0bf7cd29
      Arne Coucheron authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: Ice1bab5f3d1b3a15f20085cfb7f5578c7f70855a
      0bf7cd29
    • Han Wang's avatar
      SystemUI: Disable heads up debugging on non eng builds · 65179aea
      Han Wang authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
       * Causes much logspam, especially when using Clash/Shadowsocks
         because notification is updated every second.
      
      Test: m, no logspam anymore
      Change-Id: Ibe2db6afa18ebc68032730d81c29fb4cfaf8601f
      65179aea
    • LuK1337's avatar
      webkit: SystemImpl: Make systemIsDebuggable() check IS_ENG as well · 7881bc39
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      * Since we are shipping userdebug builds by default
        it'd be nice to keep signature and version downgrade
        checks intact.
      * Fixes : https://gitlab.com/LineageOS/issues/android/-/issues/2192
      
      Change-Id: Ib46ccb50ac091469caf99a73a5a08942cbc457f6
      7881bc39
    • dianlujitao's avatar
      Enable Binder Proxy Tracking by Uid only on eng builds · d45f9ff0
      dianlujitao authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
       * App would be killed once limit reached, this is really bad for users.
      
      Change-Id: I226a7a34031c9e9d8bf6843c22d79e72203bf867
      d45f9ff0
    • zhangjianqiu's avatar
      Zygote: Fix an issue when empty the usap pool. · 2ff0d490
      zhangjianqiu authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      When empty the usap pool, the usap processes may be blocked by
      usapPoolSocket.accept(), which cause the usap process fail to kill
      immediately. So we can move the position of blockSigTerm after
      usapPoolsSocket.accept() and delele the old blockSigTerm in the while
      loop.
      
      Test: manual test.
      1.setprop persist.device_config.runtime_native.usap_pool_enabled true.
      After 1 min, trigger fill usap pools.
      2.setprop persist.device_config.runtime_native.usap_pool_enabled false.
      After 1 min, trigger empty usap pools.
      3.repeat step 1.
      
      Signed-off-by: default avatarzhangjianqiu <zhangjianqiu@oppo.com>
      Change-Id: I657940b30f71cdc717c673be6d70738e61e2bb68
      2ff0d490
    • Bruno Martins's avatar
      fwb: Re-introduce keyboard backlight brightness control · a1f28b5c
      Bruno Martins authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Picked remaining support from commit bbd00b7 and lid state
      handling from commit 68771fe.
      
      Change-Id: I310dfd026b2dc5e7bc47dd4a2c1ae029d58a1e8e
      a1f28b5c
    • Corinna Vinschen's avatar
      PowerManager: Allow to distinguish different keypresses · a628ecb6
      Corinna Vinschen authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      * Use keypress info to exclude pressing volume keys from
        illuminating HW buttons in config_buttonLightOnKeypressOnly
        mode.
      
      Change-Id: I6bfc7ddd075e12e1ad10c3663a63e80c8d7f983d
      Signed-off-by: default avatarCorinna Vinschen <xda@vinschen.de>
      a628ecb6
    • Anas Karbila's avatar
      PowerManagerService: Allow to light up buttons only when pressed · 8112f19f
      Anas Karbila authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      
      Author: Anas Karbila <anaskarbila@gmail.com>
      Date:   Sat Jun 3 03:21:32 2017 +0200
      
          PowerManagerService: Allow to light up buttons only when pressed
      
           * Right now capactive, lit hardware keys are being
             lit every time you either touch them or the screen.
      
             But some devices handle this differently on stock:
      
             Display touch => buttons not lit
             Buttons touch => buttons lit
      
           * Thus, add a setting in order to allow the user
             to choose the preferred behavior.
      
          Change-Id: I35ac71a8274568901f962c9692788d1c682a98dd
      
      Author: Corinna Vinschen <xda@vinschen.de>
      Date:   Sun Aug 6 15:05:54 2017 +0200
      
          PowerManagerService: fix HW button illumination timeout
      
          Change I35ac71a8274568901f962c9692788d1c682a98dd, introducing hardware
          button backlight on button keypress only, also introduced a bug:
      
          When touching a button and then performing display activity while
          the buttons are still on, the buttons would keep lightened up until
          the next user interaction, potentially only switched off at the next
          screen off timeout.  Also, the buttons were not illuminated on
          device wakeup.
      
          This patch fixes it, together with another, long-standing problem:
      
          When touching a hardware button, nextTimeout was set to
          now + mButtonTimeout, even if mButtonTimeout is longer than the timeout
          determined by the screen off timeout.  To wit, if screen timeout is set
          to 15 secs, but button timeout to values > 15 secs.
      
          Change-Id: I8a56f1d1e0138c38ed6fe294e4816a9f7f744f1e
      Signed-off-by: default avatarCorinna Vinschen <xda@vinschen.de>
      
      Change-Id: I5b486e65a5b7d9d16590941df0af4d9c604dedc4
      8112f19f
    • Ricardo Cerqueira's avatar
      fw/b: Button backlight brightness · 239ba147
      Ricardo Cerqueira authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Squash of:
      
      Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
      Date:   Fri Nov 23 14:23:16 2012 +0000
      
          Reintroduce button-backlight (and respective inactivity timeout)
      
          The power manager rewrite from Change I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
          completely removed support for control of the button backlights, which makes
          all capacitive buttons out there stay dark. The commit message in that change
          mentions it hasn't been implemented _yet_, so this fix should be temporary
          until upstream does their own implementation
      
          Change-Id: I6094c446e0b8c23f57d30652a3cbd35dee5e821a
      
      Author: Danny Baumann <dannybaumann@web.de>
      Date:   Thu Aug 22 08:53:24 2013 +0200
      
          Add PowerManager integration for button and keyboard backlight.
      
          Allows setting button and keyboard backlight brightness as well as
          button timeout.
      
          Change-Id: I550cccafc0a8f90d6347de9261adb26b75955cc4
      
      Author: Steve Kondik <steve@cyngn.com>
      Date:   Sat Jan 3 05:13:26 2015 -0800
      
          power: Disable keyboard/button lights while dozing/dreaming
      
           * With hardkeys and doze mode enabled, entering suspend results in
             an epic battle over the lights. It's a bad situation. Disable
             them when we're sleepy.
      
          Change-Id: I7f1fc35a1573717d1ea101a07c4171d6f66d1553
      
      Author: nadlabak <pavel@doshaska.net>
      Date:   Sun Jun 7 02:01:05 2015 +0200
      
          PowerManagerService: Fix updating of mUserActivitySummary
      
          I7f1fc35a1573717d1ea101a07c4171d6f66d1553 missed the fact that the primary
          purpose of the affected condition block was to update mUserActivitySummary
          and the button/keyboard light handling was just appended to it later.
      
          This fixes the waking from dream/screensaver by user activity.
      
          I30c5c8c9c09e3d57ace18cac72b783510b9b3bf3 is removed here as well as it was
          just a band aid.
      
          jira: NIGHTLIES-1285
      
          Change-Id: I6b2f6c58e73110787d62e86d4d2ef538638cf491
      
      Author: Bruno Martins <bgcngm@gmail.com>
      Date:   Tue Dec 26 17:15:05 2017 +0000
      
          Forward-port button brightness implementation to O
      
           * Reworked for the new handler interface, restoring also removed
             methods (partial revert of commit 86c39f9e).
      
           * Keyboard backlight brightness support left out for now.
      
          Change-Id: I53f031fa2da394e95a2b29a01eb3c6a8f8132507
      
      Change-Id: I5176a2028c18408c17bac7f25e62b5612fd6c227
      239ba147
    • Bruno Martins's avatar
      Add support for runtime toggle of navbar · 9605c9d3
      Bruno Martins authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      This is a refactor of the following changes, so to make use of tuner API.
      
      Author: Timo Wendt <timo@tjwendt.de>
      Date:   Thu Aug 30 12:18:41 2012 +0300
      
          Runtime toggle of navbar
      
          This adds the framework support for enabling the Navigation bar
          on devices with hardware keys. It is toggled from Settings, and
          depends on device-specific support for the KeyDisabler hardware
          control
      
          Change-Id: I88fecb2ca1e8613591c327a93f53909b00239cd8
      
          wm: Nullify hardkey function assignments if enabling the navbar
      
          This caused erroneous (and sometimes duplicate) events being generated
          due to the regular key function assignments. The navbar does its
          own action management, so don't try to derive from the actions
          usually present in hard keys.
      
          Change-Id: I82866e24547f8145cac4f07820ae90aacce09281
      
          Update DEV_FORCE_SHOW_NAVBAR constant.
      
          Change-Id: Ie5b4317162c514d22276956f81007e064a3d0f32
      
          Settings: Move DEV_FORCE_SHOW_NAVBAR load to loadSecureSettings.
      
          Change-Id: I6ac53b8c9f7fce6f9ca6b4ad7bf31a1c1e896863
      
      Author: Paul Keith <javelinanddart@gmail.com>
      Date:   Tue Jan 16 15:47:07 2018 +0100
      
          PhoneWindowManager: Make sure KeyDisabler is always called on boot
      
          * Otherwise, some KeyDisabler classes are left in a weird state
          * Because we don't keep track of whether an initial state was ever set,
            we never call KeyDisabler on boot if the setting is set to 0
          * To remedy this, keep track of whether an initial state was set
      
          Change-Id: Ib432ed3278dd8f4f4cba3ba488879b3c1cd9c8f4
      
      Author: LuK1337 <priv.luk@gmail.com>
      Date:   Sat Sep 29 20:42:04 2018 +0200
      
          PhoneWindowManager: Fix issues introduced with runtime navbar
      
          * With system settings we need to pass UserHandle.USER_CURRENT
            to make sure we are getting proper value, otherwise we always
            end up getting '0'. Also we need to make sure to set valid
            mHasNavigationBar in setInitialDisplaySize().
      
          Change-Id: I3efd614e735f9a602f13263a742ce858a9d14769
      
      Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
      Date:   Tue Mar 24 22:04:47 2020 -0300
      
          DisplayPolicy: Fix watchdog when adding new display
      
          * Fixes system crashing after connected to Android Auto or started screen record
      
          That was introduced on toggle navbar commit
      
          Only register content observer if default display
      
          Change-Id: Ia43a922251803be94de8618eb442dcf132e479e9
      
      Change-Id: I4a6d3f89bc171c3921875b24c077cb78c03517ad
      9605c9d3
    • HazouPH's avatar
      Camera button support · 4990a1af
      HazouPH authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Add support for camera button
      
      Based on commit http://review.cyanogenmod.org/#/c/51487/
      
      This patch adds:
      - Use camera button as wake key
      - Use focus button as peek and wake key
      - Use camera button to launch (secure) camera
      
      Change-Id: Ia515c04cca098bf0d20b077ebffc079ee4008f21
      4990a1af
    • nadlabak's avatar
      Forward port 'Swap volume buttons' (1/3) · 28f6e69f
      nadlabak authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      [mikeioannina]: Adjust for 5.0 changes
      
      Change-Id: I1b45da63b815aa1b3ddf7cda2b7afb0872ab433f
      28f6e69f
    • LuK1337's avatar
      Use custom flag for edge long swipe gesture · 5a308591
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Previously we were using same flags that'd be used for regular back key
      long press thus being unable to determine whether the event was sent
      from EdgeBackGestureHandle or not.
      
      Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4194
      Change-Id: I5c4fd455f581ac5c9c5e3a146095be33e82e8d6e
      5a308591
    • Danesh Mondegarian's avatar
      PhoneWindowManager: Forward port long press back to kill app · c32655f5
      Danesh Mondegarian authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: If3ed27e8408cdf383653c7d18988112c13f8bcea
      c32655f5
    • LuK1337's avatar
      Don't pass repeated back key events to app if custom action is set up · 7ff40175
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Some apps may react to back key long press and it doesn't make sense to
      allow them to do that if 'Back long press action' is set to anything
      other than 'No action'.
      
      Change-Id: Iacac909d6a288cacf964c89d9586d572d14d1871
      7ff40175
    • LuK1337's avatar
      PhoneWindowManager: Add support for back key long press customization · 9bf2783d
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: I28762c88d4777f8dbc8f213a2522875c3428fdab
      9bf2783d
    • Nico's avatar
      Implement edge long swipe gesture [1/3] · bf89a428
      Nico authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      The gesture will activate if user executes edge swipe for a long
      horizontal motion. The triggered action is configurable in Button
      Settings.
      
      Reference:
      https://gerrit.dirtyunicorns.com/q/topic:%22back-longswipe-actions%22
      
      Change-Id: Ie1bbe6645b6a00d346af60d6bb5e4d584997d6e9
      bf89a428
    • Sam Mortimer's avatar
      fw/b torch: Let long press power turn torch off when screen is on. · bac435da
      Sam Mortimer authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      * When the torch is on, any subsequent long press power is almost certainly
        intended to turn the torch off (regardless of screen state).  Therefore,
        always allow long press power to toggle torch if the torch is on.
      
      * Tested: long press power toggles torch on/off with screen off.
                long press power toggles torch off with screen on and torch on.
                long press power brings up global actions menu with screen on and torch off.
      
      Change-Id: I932caa9f3be06d14408aea2ecb3a6eca73e052e0
      bac435da
    • ezio84's avatar
      PhoneWindowManager: Allow torch and track skip during ambient display · c0a923e3
      ezio84 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      This allows long press power button for torch and long press
      volume buttons for track skip to work during ambient display.
      
      sam3000/razorloves: partial pick from:
      
      Author: ezio84 <brabus84@gmail.com>
      Date:   Fri Feb 2 01:24:34 2018 -0500
          base: Support binding the power button to flashlight
          Thanks to beanstown106 for the initial longpress action calls in
          PhoneWindowManager (improved by lineage guys)
          [cut]
          Allow torch action also on ambient display
          Change-Id: I12da044f86c7b625872607529cf8524615cf576b
      
      Author: ezio84 <brabus84@gmail.com>
      Date:   Sun, 7 Jan 2018 21:24:53 +0100
          Fix volume rocker skip track on Ambient Display and Lift to Wake
          we need to check if dream service is dozing before checking
          keyguard status
          Change-Id: Ic3a6c830496188bb6edf27043cd24eb2d553bb82
      
      Change-Id: I2463579e056364652b549524bc9775da4fa35b1f
      c0a923e3
    • Sam Mortimer's avatar
      fw/b: Allow customisation of navbar app switch long press action · 463ca936
      Sam Mortimer authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: Idfb12a7bae6d921d207b5becd69b1005ce3d2b92
      463ca936
    • Oleksandr Byelkin's avatar
      PhoneWindowManager: Implement press home to answer call · 20537af6
      Oleksandr Byelkin authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: I7662b593f5ba52cafe3d7ba7cf2099b29b8d308b
      20537af6
    • martincz's avatar
      PhoneWindowManager: Tap volume buttons to answer call · 20fb40e7
      martincz authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: I5ebe1ad88950ba56ce1445b77b7f8cdf030463da
      20fb40e7
    • LuK1337's avatar
      Reimplement device hardware wake keys support · ee0ad05a
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Author: LuK1337 <priv.luk@gmail.com>
      Date:   Mon Jun 4 10:05:37 2018 +0200
      
          PhoneWindowManager: Improve home button wake haptic feedback handling
      
          * This fixes an issue where haptic feedback is used
            when screen is off and home button wake is disabled.
      
          Change-Id: I7ac4c00598cedf7f174dc99629f55dc7b74b0d2a
      
      Author: Gabriele M <moto.falcon.git@gmail.com>
      Date:   Mon Sep 26 00:43:08 2016 +0200
      
          Fix volume keys wakeup status handling
      
          The same status flag is used for the three different volume keys,
          however nothing prevents users from pressing multiple keys at the
          same time. This allows to set the status flag with one volume key
          and clear it with the other volume key.
      
          Use one flag per key so that we never end up in an inconsistent
          state. This fixes the seldom power button issues that happen when
          the "volume wake" feature is enabled.
      
          Change-Id: I08f5f9ff696bef3dd840cff97d570e44ebe03e4e
      
      Author: Martin Brabham <optedoblivion@cyngn.com>
      Date:   Wed Dec 3 11:48:28 2014 -0800
      
          Android Policy: handle volume key event as wake key when preference is set
      
          Change-Id: If9a61cd65553bf00f0efda1a75b1ab75b9129090
      
      Author: willl03 <wgangers@gmail.com>
      Date:   Mon Dec 8 11:13:28 2014 -0500
      
          Only go HOME if screen is fully awake
      
          Avoid going home when hardware home button is used to wake the device on an insecure keyguard
      
          Change-Id: I5d5d8c4fff76967c29e70251f7b165205005ba11
      
      Author: Matt Garnes <matt@cyngn.com>
      Date:   Tue Mar 31 14:39:38 2015 -0700
      
          If a wake key is disabled by the user, do not wake from doze.
      
          Currently, any wake key will wake the device from a doze, even if that
          key has not been enabled as a wake key in Settings.
      
          If the device is 'dreaming' in the Doze state, check if the user has
          explicitly disabled the wake key (or never enabled the setting in the
          first place) before waking the device.
      
          Change-Id: I7397087c143161e8e1ddb84d0e23f6027fea0aac
      
      Author: Michael Bestas <mikeioannina@gmail.com>
      Date:   Thu Dec 18 04:26:38 2014 +0200
      
          Cleanup button wake settings (2/2)
      
          Change-Id: Ie37136cbd57c4c334321abbfa4543727e940bc43
      
          Keep quiet when volume keys are used to wake up device
      
          - Userspace will make a 'beep' with it receives a key up, so
            consume that event as well.
          - Removed wake key check in music control code as it will already
            be disabled here.
      
          Change-Id: I93839acd39aec8a2ee40291f833a31f6b048c9f8
      
          Wake Keys: enforce the wake keys overlay
      
          * Keys disabled as wake keys by the overlay were
            still being allowed to wake the device. This change
            enforces the hardwareWakeKeys settings.
      
          Change-Id: Ifde0491b2de64a7f61a101cf22f5589cb5e841e2
      
          Allow disabling Search/Recents button wake (2/2)
      
          Change-Id: I6a2ac064efc4fe85413bf0b935c28aa7bde5d672
      
      Author: Danny Baumann <dannybaumann@web.de>
      Date:   Sun Nov 30 23:04:37 2014 -0600
      
          fw/base: allow home button to wake device [1/2]
      
          Change-Id: I2b79561dcfa7e569b2e24bbabfffb11517d4d313
      
      Change-Id: Ic294515c7200c1260ac514db23ef3778d374d727
      ee0ad05a
    • Phil Tunstall's avatar
      Reimplement hardware keys custom rebinding · 74949e56
      Phil Tunstall authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Fixups for ten @sam3000
      
      This is a squash of the following commits:
      
      Author: Phil Tunstall <ptunstall@gmail.com>
      Date:   Fri Nov 14 09:44:49 2014 -0800
      
          Hardware key custom rebinding (1/2)
      
          Framework changes to allow rebinding of the actions performed on the
          following key press events: Home long-press, home double-tap, menu press,
          menu long-press, search press, search long-press, app-switch press and
          app-switch long-press.
      
          The available actions are: Nothing, open/close menu, recent apps
          switcher, search assistant, voice search, in-app search, device sleep,
          and launch camera.
      
          Change-Id: I72c0d220a09d79230bfa299e0521ed693e5c25f1
      
      Author: Steve Kondik <steve@cyngn.com>
      Date:   Tue Oct 18 23:38:28 2016 -0700
      
          wm: Add support for split screen button behavior
      
           * And make it the default for long-press recents like the navbar.
      
          Change-Id: I432c80a2c9b29b9a02d64e29d484f92623b0648a
      
      Author: Bruno Martins <bgcngm@gmail.com>
      Date:   Mon Dec 25 22:10:28 2017 +0000
      
          Forward-port hardware keys custom rebinding to O
      
           * Adapted to Lineage SDK as well as to the moved hardware keys
             configs and constants.
      
           * Converted variables that track user-customisable behavior for
             certain key events from int to Action in order to use the newly
             introduced SDK function helpers.
      
      Change-Id: I2e2234e3d01d943e0cadd23898288f8a88936a47
      
      Setting a custom menu key action will do both the custom action
      and the default action at the same time. Comparing code with 14.1
      we're missing the return here.
      
      Change-Id: I2f188ec78fae5068ffa1a5c80a8afa5ee2f167b5
      74949e56
    • Erfan Abdi's avatar
      Import ActionUtils from lineage sdk · ace1f155
      Erfan Abdi authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: I43f3d339b73a3ff3cc19a881975f018b56b9d472
      ace1f155
    • beanstown106's avatar
      Long-press power while display is off for torch · b96c8f2d
      beanstown106 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Fixups for twelve (@neobuddy89)
      Fixups for ten (@sam3000)
      
      Squash of:
      
      Author: beanstown106 <nbenis106@gmail.com>
      Date:   Sun Jan 17 09:14:19 2016 -0500
      
          policy: Long-press power while display is off for torch
      
          Long-press the power button while the display is off
          to turn the torchlight on and off.
      
          Credits:
           - Lion0738: The main hooks here:
             https://github.com/lion0738/android_frameworks_base/commit/9af2b7844a4d973c8b6c542d7937f56a24a7e5f1
      
      
           - Atlantis: The logic on where to hook into this for power button only
           - Alex Cruz: Helping and giving me some pointers along the way
      
          Change-Id: I14365389990eb06daaa127f5db66df45abf6c064
      
      Author: Sam Mortimer <sam@mortimer.me.uk>
      Date:   Sat Dec 24 13:22:53 2016 -0800
      
          [1/3] Torch long press power: add auto-off function
      
          Change-Id: Icdf50082324f8292859f0df8b271e730b02c84e7
      
      Author: Pranav Vashi <neobuddy89@gmail.com>
      Date:   Fri Dec 3 08:53:59 2021 +0530
      
          Fix long-press power for torch on Android S
      
          * We must define FLAG_IMMUTABLE when creating PendingIntent on Android S
      
      Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
      
      Change-Id: I49222892c8fbc8a63af580c763e8987b225b11d2
      Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
      Signed-off-by: default avatarLibXZR <i@xzr.moe>
      b96c8f2d
    • Erfan Abdi's avatar
      VolumeKeyHandler: Adapt for 12 · 6f6b393a
      Erfan Abdi authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: I56306e3a2bc9633c29a01196452c8e158d0d7fa7
      6f6b393a
    • ezio84's avatar
      VolumeKeyHandler: Add support for skipping tracks with remote control · b096e059
      ezio84 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      For Spotify and other players that allow music controls for
      remote devices (PC, PS4) through the media notification
      
      Change-Id: I38887f8b1cff1a0c1e3adadbfe37d5af59b5cdcc
      b096e059
    • Simon Shields's avatar
      PhoneWindowManager: add VolumeKeyHandler · 71ee13cd
      Simon Shields authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      We can't use a generic DeviceKeyHandler here, because we don't want to
      override some of the AOSP logic (silencing incoming calls, screenshots)
      and we need to know if the device is interactive or not (for screen-off
      music controls)
      
      Change-Id: I485c2f6006c5bbd358ba0cbd32917689826c5c6d
      71ee13cd
    • Arian's avatar
      UdfpsController: Call onFingerDown on action down events · c3426479
      Arian authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      Change-Id: Icf333f13bccfed9ba4ec030716d2bcf83841ef55
      c3426479
    • TheScarastic's avatar
      udfps: Allow to configure hbm overlay type · 433c04f9
      TheScarastic authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
       * Local HBM does not shows pressed icon
       * Global hbm shows pressed icon
      
      Change-Id: Ic9f51a33c1781527f0c7fc41e8bfe320bf2653d2
      433c04f9
    • TheScarastic's avatar
      udfps: Change window type to TYPE_DISPLAY_OVERLAY · 32d4dce1
      TheScarastic authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
       * TYPE_KEYGUARD_DIALOG was below volume and navbar and would
         have caused cause issues when HBM was enabled
      
       * BiometricPrompt uses different layer which again is below
         navbar and causes bright volume and navbar
      
      Change-Id: Ia37930ffd7a28fc8785f26ada3b69a02df0d4891
      32d4dce1
    • LuK1337's avatar
      udfps: Implement default udfps hbm provider · 0387cefc
      LuK1337 authored and Mohammad Hasan Keramat J's avatar Mohammad Hasan Keramat J committed
      This should let us choose between multiple UdfpsHbmProvider
      implementations.
      
      Change-Id: I9b93e32644feaf1398cdac69e9696d8ec195f246
      0387cefc
Loading