Commit Graph

29 Commits

Author SHA1 Message Date
Mashopy
4cdcb94010 oplus: Run bpfix
Change-Id: Ida4dd24167f0f15b1e67a3ae3f73454caa4e1f6e
2025-04-13 23:45:13 +00:00
Edwin Moquete
a6435e6bc0 doze: Fix compilation on V QPR2
Change-Id: If1693603abc530af3b761b53396f2dda8225177e
2025-03-12 23:35:45 +00:00
AnierinB
e50dfe2d6c doze: Move to PreferenceFragmentCompat
PreferenceFragment was deprecated in API level 28.

https://developer.android.com/jetpack/androidx/releases/preference#1.1.0

Change-Id: Ie8a4b04bd588afbbbc5882349ddbc05f988f80bf
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-02-26 23:00:34 +00:00
LuK1337
884a7584ca doze: Fix build on QPR2
Change-Id: I7b1486116c89f7df89753ba1ac2493c7bbb9cf95
2024-03-20 10:49:27 +00:00
Chaohui Wang
61e39d5c48 doze: Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427 | AOSP | AOSP
Test: manual - check Settings pages
Test: m RunSettingsLibRoboTests
Change-Id: I85a70d4c504d8584030ea4a058f30d74206ab835
2024-03-20 10:49:11 +00:00
Peter Kalauskas
6526bfaa6a oplus: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e
2024-03-20 09:56:06 +00:00
Bruno Martins
06034b73be doze: Fix compilation for QPR1 merge
Change-Id: Ifa602ed1ae0734dbda40663770f2e54075bfa208
2022-12-06 18:03:47 +00:00
LuK1337
d0e36f6d22 doze: Move sensor trigger values to resources
This lets us use android.sensor.tilt_detector on Oplus.

Change-Id: I21db794d86656bfa41dfe32d33b272d4b55ec199
2022-04-11 17:19:46 +02:00
TheScarastic
e854088f20 doze: Adapt to S style
* Reference e7db7fc560

* Adapted and rewritten in Kt

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

Change-Id: I4d35ade6f45022944df4db787948c03b5bc14e5f
Signed-off-by: Rohan Hasabe <rohanhasabe8@gmail.com>
Signed-off-by: Bruno Martins <bgcngm@gmail.com>
2022-04-11 17:19:46 +02:00
Micheal
3f5b2402b6 doze: 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: I12d27c23624eb5259da582b86ac1bd7572754f0c
2022-04-11 17:19:46 +02:00
Anay Wadhera
760aded5b9 doze: Drop minSdkVersion
Change-Id: Idbbe6713999ca8b942b2bf91cc899118e22a062b
2022-04-11 17:19:46 +02:00
LuK1337
25593fedb6 doze: Mark intent as nullable for onStartCommand() and onBind()
See: https://developer.android.com/reference/kotlin/android/app/Service
Change-Id: I547db2abffc40863a00c42528cd44182e0889e68
2022-04-11 17:19:46 +02:00
LuK1337
c7f76a731f doze: Java -> Kotlin + bp -> mk
Change-Id: I377658589af22c58ddbf1768f4c89d06594d2762
2022-04-11 17:19:46 +02:00
LuK1337
5d62057c70 doze: Make all features optional
This change makes all users of doze app declare supported sensors in
their device tree overlays.

Change-Id: I6444da1e8b42d0064a04981632c84f6c90ddaee7
2022-04-11 17:19:46 +02:00
LuK1337
2edf978bd0 doze: Enable proximity sensor check for raise to wake
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3646
Change-Id: Ic546b25126e0dc44af444179f7041f6b5fe51763
2022-04-11 17:19:46 +02:00
Nauval Rizky
0d2a7ae425 doze: Introduce raise to wake gesture
* Highly inspired by iOS raise to wake

- Adapted to OnePlus sdm845 doze

doze: Add min interval for raise2wake

* avoid having early wakeup
* also fix typo in acquire timeout

doze: Enable pickup when raise to wake is toggled

- This is needed in order for raise to wake to function properly.

doze: Fix pickup status for raise to wake

Co-authored-by: AnierinB <anierinb@evolution-x.org>
Co-authored-by: AshutoshSundresh <ashutoshsundresh@gmail.com>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Signed-off-by: AnierinB <anierinb@evolution-x.org>
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
Signed-off-by: LuK1337 <priv.luk@gmail.com>
Change-Id: I5df0c4f11f1b24ab813abc393960c5f03f5fab1f
2022-04-11 17:19:46 +02:00
arian
3887783596 doze: Add vector icons
* from https://materialdesignicons.com/ with small changes

Signed-off-by: Anunay Maheshwari <anunaym14@gmail.com>
Change-Id: Ibbb18065f97ed6f8f5376752495255aeafe1db82
2022-04-11 17:19:46 +02:00
Bruno Martins
d96d12c4ae doze: 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
2022-04-11 17:19:46 +02:00
LuK1337
4b4f6ac9dc doze: Update AmbientDisplayConfiguration class path
Change-Id: Ib0444acc1fd8614a9d47dbac06ac5f25cd6a5719
2022-04-11 17:19:46 +02:00
Bruno Martins
2d05423495 doze: Migrate to androidx
Change-Id: Ifaa67283a3437549a2304088a0ce377b399da19f
2022-04-11 17:19:46 +02:00
LuK1337
dee2c56d9c doze: Fix default DOZE_ALWAYS_ON value
* It's disabled by default in our fwb overlay.

Change-Id: Ie38a51c2cc73078d201985cc30f0b6fa3d1630d5
2022-04-11 17:19:46 +02:00
Luca Stefani
dd4992aba9 doze: Move Utils.checkDozeService in an handler
* There's no need to manually write to the gestures prefs
  as long we are sure the handler is run after we return true
  in the onPreferenceChangeListner

Change-Id: I090c0c6c91267aff69c45365b95b5f5e26d07b07
2022-04-11 17:19:46 +02:00
Luca Stefani
0973b7601e doze: Set entry timestamp before registering sensor
Change-Id: Ifa8aa1ded029c3c7be44ac94355e6814c080be44
2022-04-11 17:19:46 +02:00
Bruno Martins
3b231c9517 doze: Add AOD support to Ambient Display
* This makes the always on display mode feature visible for those
   devices that explicitly set it as available via AOSP overlay.
   Should only be enabled on devices where the display has been tuned
   to be power efficient in DOZE and/or DOZE_SUSPEND states.

Change-Id: If543936f9421dd7a6c0be594f7cb76afb227e34b
2022-04-11 17:19:46 +02:00
Luca Stefani
91be55268b doze: Add missing pocket mode hooks
Change-Id: I81af20cb9f737e0a2260c42fc91530572b16ec5e
2022-04-11 17:19:46 +02:00
Luca Stefani
5189ba8f4c doze: Add pocket mode support
Change-Id: I68498fb3e523fcc77a3db0ecb5d57c1a0df2a701
2022-04-11 17:19:46 +02:00
Joey
47486c23d1 doze: Match Pie settings UI
Change-Id: Ia1cde37923c55faf057189f7085b69522e2802ef
2022-04-11 17:19:46 +02:00
Anton Hansson
f3051b8160 doze: Set LOCAL_PRIVATE_PLATFORM_APIS
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Bug: 73535841
Change-Id: I61299717ab2a6a1fd9a14dde7e1c7961388f722a
2022-04-11 17:19:46 +02:00
LuK1337
fc3c8ba36b Add OplusDoze app for pickup sensor handling
* Based off android_device_oneplus_oneplus3 doze app but
  with proximity related features stripped out and updated
  pickup sensor name.

Change-Id: I9f81b153948069cd4370c75817f12e91f6869e1d
2022-04-11 17:19:38 +02:00