18 Commits

Author SHA1 Message Date
Michael Bestas
3dc348ff37
MotoActions: Convert to SwitchPreferenceCompat
Change-Id: Ic1cbaba37d499da1855af9c3930f2df426e2d3af
2024-03-10 22:46:10 +02:00
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
Bruno Martins
ed49bbc414 MotoActions: Fix compilation for QPR1 merge
Change-Id: Ifa602ed1ae0734dbda40663770f2e54075bfa208
2022-12-06 14:09:25 -05: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
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
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
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
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
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
Jan Altensen
d2314727ed
motorola: rename LineageActions to MotoActions
Change-Id: I07e4b35309b3a645fab5acfcd1d18f8c30109b92
2020-12-23 16:23:30 +01:00