39 Commits

Author SHA1 Message Date
Peter Kalauskas
320254d1c4
MotoActions: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e
2024-03-10 22:46:04 +02:00
Michael Bestas
9c6227b575
MotoActions: Update DozePreferenceFragment for QPR2
The OnMainSwitchChangeListener is replaced with OnCheckedChangeListener

Change-Id: I6b8cb85210eac5f0499a08a8392b3f6997542f86
2024-03-10 22:45:57 +02:00
dianlujitao
42a4d5f209 MotoNrEnabler: Add a service to enable 5G via OEM RIL request
Clearing and rebuilding modem cache (e.g. mdmddr, mdm1m9kefs1,
mdm1m9kefs2, carrier, and ddr partitions for MDM devices) is typically
necessary after modem firmware upgrade. However, NR is disabled in
Moto's modem firmware by default, so choosing NR results in "No signal"
after rebuilding modem cache with custom ROMs installed. Users have to
go back to stock once to make it work again, which is a huge pain.

It's observed that stock ROMs control NR via a custom RIL request, and
choose it based on carrier config and user preference (yes they have a
toggle in system settings) after SIM provisioning. Here, we implement a
service to automatically enable NR and DSS in the same approach, so
that users no longer need to go back to stock after upgrading modem
firmware. The implementation is based on telephony-common.jar,
qti-telephony-common.jar and qcom-moto-telephony-ext.jar from nio.
You're suggested to check if the magic numbers and payload formats
match your device's stock ROM before using this service.

Change-Id: I5ecfae93717fe87e6b1c1a75caa674b466403391
2024-01-12 23:22:35 +08:00
SGCMarkus
0847f2dbca interfaces: add com.motorola.hardware.biometric.fingerprint@1.0
Change-Id: I85cd687bf059eac111829705f26ee288eb5fa663
2023-01-29 06:22:58 +01:00
hpnightowl
126240e564 MotoActions: Don't hardcode fillColor value of drawables
* White stroke color  makes it very hard to interpret icons in dark mode
   Before/After: https://imgur.com/a/1vz6SON

Change-Id: Idaedaa4bb62a42253c1000001476ccfedd01b790
2023-01-08 17:42:24 +00:00
Bruno Martins
ed49bbc414 MotoActions: Fix compilation for QPR1 merge
Change-Id: Ifa602ed1ae0734dbda40663770f2e54075bfa208
2022-12-06 14:09:25 -05:00
Jan Altensen
aab6d1924d
motorola: add android_system_qcom to lineage.dependencies
* needed for libqsap_shim, compiling troika/kane fails otherwise

Change-Id: I663554f6937365fef65e4191d6bce917bdf9b1d2
2022-11-08 11:20:51 +01:00
dianlujitao
5653c1c489 Add common RRO overlay to enable AOSP camera launch gesture
Change-Id: Ia2e124beb01f8be7625e894df1e28289a4cb4110
2022-11-04 21:14:41 +08:00
dianlujitao
2e86ad1f91 MotoActions: Drop camera activation action
AOSP has exact the same built-in feature.

Change-Id: Ib508cddc74498a3eba507e1b1962c53c7b591e6e
2022-10-28 18:38:55 +08:00
Erfan Abdi
5444bafbeb libqsap: Rename to libqsap_shim
* To match other shims.

Change-Id: Iac74d00078d627ffd64acb8a7c40f05874c4f843
2022-09-28 17:13:06 +02:00
Nolen Johnson
23de3c7d47 Provide a shim for libqsap
* Android.mk because we link libqsap_sdk which is Android.mk.

Co-authored-by: Dan Pasanen <dan.pasanen@gmail.com>
Co-authored-by: Erfan Abdi <erfangplus@gmail.com>
Co-authored-by: Prema Chand Alugu <premaca@gmail.com>
Co-authored-by: Jeferson <jroliveira.oliveira301@gmail.com>
Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I97b856d1bf6d390c65cb0043e8ffe4d3d0d55d75
2022-09-21 12:57:22 -04:00
dianlujitao
7f2f48beae MotoActions: Move rest strings to devicesettings
Change-Id: I66c4768a45d20ea5e33500379369578980bfdfee
2022-06-08 20:06:20 +08:00
TheScarastic
860266e24f MotoActions: Adapt to S style
* Use Theme.SubSettingsBase for theme
 * Replace PreferenceActivity with CollapsingToolbarBaseActivity
 * Add Titles to preference screen
 * Remove onOptionsItemSelected and where necessary move to activity

Co-authored-by: Erfan Abdi <erfangplus@gmail.com>
Change-Id: I87af15f5e165aa7bcd556eb2b716c0ce624ca4e7
2022-02-16 23:23:41 +08:00
dianlujitao
8a96ebc5a1 MotoActions: Specify a qualified user for start activity
Fixes warning:
  ContextImpl: Calling a method in the system process without a
  qualified user

Change-Id: I9352fc85adfacebcf535dfc2b5328dd07476cdb6
2022-02-12 23:31:00 -05:00
Michael W
a95471f870 MotoActions: General cleanup
* Remove unused classes, methods, interfaces, imports
* Reorder imports
* Add final where applicable
* Fix line lengths
* Use local variables where possible
* Replace deprecated Vibrator.vibrate(long) with the successor
* Simplify conditions where they are always met
* Rearrange tags and remove unused schemas in resources
* Merge ScreenReceiver into the service
  -> a separate, instantiated but never called-into class makes
     one think it's unused

Change-Id: I05cff7ecaf424c166fedceb1f4f8963164c6085a
2022-02-12 23:30:46 -05:00
Kyle Harrison
63d883171d MotoActions: Broadcast doze pulse as current user
- Fixes warning in logcat

Change-Id: Ibed659bd5d801a8cdcfe12ec9dd789cb8ce481cb
2022-02-12 23:28:18 -05:00
Jeferson
4a07e9ca98 MotoActions: Remove gestures icon
Change-Id: I5d3b246a8e496e03ff31eb67e63c867262840832
2022-02-12 23:28:13 -05:00
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