22 Commits

Author SHA1 Message Date
dianlujitao
276242afab MotoActions: Use stow sensor for both hand wave and pick up gestures
* The behaviors of stow and proximity sensors are pretty similar, so
   there's no need to use both at the same time. Simply use the stow
   sensor to handle both hand wave and pick up gestures.
 * Switch to timestamp associated with the sensor event to determine the
   operation while at it.

Change-Id: I39767cf7b2e48bc2b0baabfac1e47240012f71d6
2022-02-12 23:28:07 -05:00
dianlujitao
aa1d43e9fd MotoActions: Implement a dedicated pocket gesture toggle
Change-Id: I23b41d396f88e897004e571c24a1128ef3e29d49
2022-02-12 23:28:00 -05:00
dianlujitao
9201be6534 MotoActions: Drop glance sensor for doze
* This sensor gets triggered by any physical movements of the device.
   Slight shakes of your table could even wake up the device, which is
   clearly undesired.
 * The ordinary pick up gesture is detected by the flat up sensor.

Change-Id: I1fe492e8e23f09adebab38f123f6bb497cc7a0f4
2022-02-12 23:27:54 -05:00
dianlujitao
2c77e9bb68 MotoActions: Relocate to AOSP gestures category
Change-Id: I28995767c55749bf2f8daa2738d7543d554787b8
2022-02-12 23:27:33 -05:00
dianlujitao
79505d555e MotoActions: Bring doze settings up-to-date
Based off oneplus3 doze app and integrated with MotoActions.

Change-Id: Ie5e87ecd1cf33631b71186a95e33dcddd70acb11
2022-02-12 23:27:26 -05:00
dianlujitao
97a3a03979 MotoActions: Use common style from devicesettings
Change-Id: I613b106fec0b6580d08a0a580988007807958db2
2022-02-12 23:27:21 -05:00
dianlujitao
d84b79e801 MotoActions: Convert to Android.bp
Change-Id: I678d6bfd1058248203e8a5fb7e5720a2d2573ca2
2022-02-12 23:27:12 -05:00
Michael Bestas
efbbd4c461 MotoActions: Add an exported flag in manifest
Targeting S+ (version 31 and above) requires that an explicit value
for android:exported be defined when intent filters are present

Change-Id: I2ce2b2cd1dcd69e343ae8577587483b19d825fdc
2022-01-29 18:30:15 +01:00
Vachounet
a3fed85a0f MotoActions: TorchAction: register custom torch callback
* Actually callback is not registered and never triggered. When user enabled torch with power long press or with qs tile and then do the gesture to disable it (or the other way around), he will have to do the gesture twice since boolean has not been updated.

Change-Id: I03e88b6975300943fbeaf536fdf8552b9e3b3396
2021-02-19 12:18:57 +01:00
Erfan Abdi
bcfceddbd8 MotoActions: doze: Register approach sensor properly
Change-Id: I55814f673756965614e4a4a3d687de8ac73ac173
2021-01-27 17:36:51 +01:00
jro1979oliver
0cfc187223 MotoActions: Set doze options back to true
* While c9999dacb17 introduced options to false, whole code sets to true as default.
Bring it back to default code behavior

Change-Id: I32cb9851c81282e0440f5a0d1654f31b37e35c91
2021-01-18 12:58:27 +01:00
Jeferson Oliveira
e8e3def827 MotoActions: Fix always on detection
* PreferenceCategory is removed since c9999dacb17c. Insert again to fix AOD.

Change-Id: I5b16317875ec6c0bce6463bcf853d9085dfc0087
2021-01-08 20:17:53 +01:00
Erfan Abdi
5811c17e54 MotoActions: use simple style for gestures menu
Change-Id: I7f2d8d26dc1c03d67b05d6767b65f3dd7a464c88
Signed-off-by: Erfan Abdi <erfangplus@gmail.com>
2021-01-05 21:18:52 +01:00
UtsavisGreat
1bbdaed20b MotoActions: add material icons for Ambient Display
* Make follow system accents as well

Change-Id: I8ea63f82e079ba7868313c14e4973f9c1dd9789d
(cherry picked from commit c9999dacb17c2372be960a05789b603f827dad2b)
2021-01-05 21:18:28 +01:00
Jan Altensen
588a0d1d1c MotoActions: move to system_ext
Change-Id: I3b4d22eb0fb7a020a804bfb084b66f59bc042d41
2021-01-04 18:39:37 +01:00
Michael W
3cffd7470f MotoActions: Don't show preference for non existing sensor
* Looks like some variants don't have a CameraActivationSensor, so let's
  remove the preference as the user's choice won't have an effect anyway

Change-Id: I7d157a992a6cb9ee333752772bc5e3b647b614f2
2020-12-29 18:33:35 +01:00
Michael W
9ccc54c3d2 MotoActions: Don't crash settings
* Registering a non-existing sensor causes a RuntimeException which crashes
  the Settings app which in turn takes down the whole system
* Change the RuntimeExceptions to normal error loggings

Change-Id: I18a73adc311bec6b70440a3266c7e2af74baa55a
2020-12-29 18:23:17 +01:00
Vache
b5fe31396d
MotoActions: Import Stock drawables
Co-authored-by: Rohan Hasabe <rohanhasabe8@gmail.com>

Change-Id: Ifea41d44ab133db5b921341f5beb3e9bf5e618c5
Signed-off-by: Rohan Hasabe <rohanhasabe8@gmail.com>
2020-12-23 18:06:21 +01:00
Jan Altensen
d2314727ed
motorola: rename LineageActions to MotoActions
Change-Id: I07e4b35309b3a645fab5acfcd1d18f8c30109b92
2020-12-23 16:23:30 +01:00
Joshua Blanchard
ccde739ef1
motorola: move LineageActions to system
Change-Id: I843c188bde89e37483fc66dbc4d09e2a600a37fe
2020-12-23 16:19:23 +01:00
Jan Altensen
b71d9a4ea1
motorola: import LineageActions from nash
* taken from f587977924db43a1f37b8a7a5ffcf73d5c4ae4a2 @ LineageOS/android_device_motorola_nash

Change-Id: Iaad009cb167850e39b324edcea302eccb5b0fccf
2020-12-23 16:19:18 +01:00
Jan Altensen
4578f45d60
initial commit
Change-Id: I29e50165a96864fbcdd19d32e76b58dff5c03737
2020-12-23 15:24:46 +01:00