64 Commits

Author SHA1 Message Date
5af9b6a3a6 PixelParts: Nuke ChargeControl
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-04-13 17:59:01 -07:00
786b150ee3 New Crowdin updates (#3) 2024-09-13 01:00:39 +08:00
69093b2f84 New Crowdin updates (#2)
* New translations strings.xml (Czech)

* New translations strings.xml (Italian)

* New translations strings.xml (Russian)

* New translations strings.xml (Turkish)
2024-08-16 01:11:15 +08:00
30aeb77fc9 New Crowdin updates (#1)
* New translations strings.xml (French)

* New translations strings.xml (Spanish)

* New translations strings.xml (Hungarian)
2024-08-03 01:34:36 +08:00
138546f791 PixelParts: Use binder instead of service call
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-07-11 15:03:36 +00:00
4b451fd9be PixelParts: Remove battery info and fast charge
We ship unmodified prebuilt kernel therefore we can't ship fast charge.
The ROM now includes a battery information panel.
Rename charge control to percentage-based charge control.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-07-11 15:01:58 +00:00
wangchaohui
79cfbca0bc PixelParts: Migrate to CompoundButton.OnCheckedChangeListener
fix for UQPR2

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-03-27 18:14:02 +00:00
Peter Kalauskas
aa120e7531 PixelParts: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Fix for UQPR2

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-03-27 18:13:49 +00:00
Alfred Lin
47922ad261 PixelParts: Import AOSP color mode preview for saturation
Change-Id: Iebaaa6867f2039a25a5e1fd280a89b5bc9297e6b
Co-authored-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Co-authored-by: AnierinB <anierin@evolution-x.org>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-26 10:01:28 +00:00
0d9a5eab27 PixelParts: Allow continuousUpdates for saturation SeekBarPreference
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-26 00:53:24 +00:00
6f7b81ebc0 PixelParts: 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>
2024-01-20 10:36:53 -08:00
be9de7cc55 PixelParts: Add PixelTorchButtonService
Accessibility service for toggling Pixel torch when both volume buttons
are simultaneously pressed.

Used https://github.com/cyb3rko/flashdim as a reference for the key
event detection.

This change also implements PixelTorchHelper, a helper class for both
the tile and accessibility service (potentially more) for code
reusability and state syncing between services via sharedPrefs.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-17 05:02:55 +00:00
20bc816214 PixelParts: Add option to cycle between multiple torch strengths
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-14 01:06:47 +00:00
iusmac
759817d91d PixelParts: Implement TileHandlerActivity to handle QS long press
We will always start an invisible activity on QS tile long press which
fire ACTION_QS_TILE_PREFERENCES action. Then use route logic to replace
current invisible activity with the corresponding tile activity if it
has one, otherwise start the App Info activity (default behavior).

Signed-off-by: iusmac <iusico.maxim@libero.it>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:01:59 -08:00
1f6e8019e4 PixelParts: Implement TileUtils to handle requesting tile additions
https://developer.android.com/develop/ui/views/quicksettings-tiles#prompt-user

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:01:44 -08:00
fa6c3f24e6 PixelParts: Use UsageProgressBarPreference for capacity & status
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:01:24 -08:00
cc2b833340 PixelParts: Add manufacture date & first usage date preferences
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:01:17 -08:00
Yi-Ling Chuang
f707910f08 PixelParts: Add a footer message for battery cycle count
Bug: 276399056
Test: rebuild
Change-Id: I3aea252ace55edbde117698c17f1b4e0ab601b89
Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:01:10 -08:00
7ce53cb8e4 PixelParts: Version 2.0
- Move all features to the appropriate locations in Settings rather than
having an entire activity/fragment for assorted features.
- Set pixel torch as UNAVAILABLE onTorchModeUnavailable.
- Display accurate message if get*StringResourceId fails.
- Include overlay to disable ROM side cycle_count preference.
- Remove Jitter benchmark (we have it ROM side).
- Remove Direct HBM.
- Remove ShakeUtils and LeonidsLib.
- Remove about activity/fragment.
- Various misc changes and cleanups.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2024-01-13 15:00:57 -08:00
81fab5b17c PixelParts: Introduce and switch to ComponentUtils
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-08-01 01:56:03 -07:00
2cd36944c5 PixelParts: Remove PixelTorch feature if no torch hardware
The Google Pixel Tablet does not have an LED torch/flash.

https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)
https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CAMERA_FLASH

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-07-23 02:59:27 -07:00
a9e64adc21 PixelParts: Fix PendingIntent creation for QS Tiles
Follow up to commit b0ea6fc35a

E AndroidRuntime: java.lang.IllegalArgumentException: org.evolution.pixelparts: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

https://developer.android.com/reference/android/app/PendingIntent#FLAG_IMMUTABLE

https://developer.android.com/reference/android/service/quicksettings/TileService#startActivityAndCollapse(android.app.PendingIntent)

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-07-12 17:25:05 -07:00
4f0c3d1ecf PixelParts: Mark tiles as UNAVAILABLE if isFileWritable returns false
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-07-08 11:15:01 -07:00
9fe7a3eca0 PixelParts: Rename Camera category to LEDs
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-24 03:00:02 -07:00
9e1d3e7976 PixelParts: Update saturation preview images
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-24 02:59:44 -07:00
6a9b0f4915 PixelParts: Use UsageProgressBarPreference for current_lux_level
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-24 02:15:35 -07:00
e29011db5e PixelParts: Use FooterPreference from SettingsLib
Also included:
Drop HBM info warning as it seems a bit redundant.
Drop empty preference category in saturation fragment.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-23 17:01:31 -07:00
d3a31c4cbf PixelParts: Utils --> FileUtils
Better reflects the actual usecases of that class.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-23 16:13:17 -07:00
1294bacf5b PixelParts: pixel_parts_warning_text most --> some
We only have one feature that relies on an added sysfs attribute.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-23 16:13:05 -07:00
ace788b49f PixelParts: Orbital nuke on power efficient workqueue
- Workqueues are created on kernel boot.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-23 12:16:09 -07:00
b0ea6fc35a PixelParts: Add tiles to launch PixelParts, BatteryInfo & Saturation
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-22 02:46:54 -04:00
ff8fbf0195 PixelParts: Add an about page
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-20 04:17:46 -07:00
0971a0d56a PixelParts: Display the current lux level in AutoHBM fragment
During onSensorChanged, the lux level is set as the summary for the
current_lux_level preference.

Listener is registered when enabling the main switch and when the
fragment is resumed (only if the main switch is on). Listener is
unregistered when the main switch is turned off and when the fragment
is paused (only if the main switch is on).

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-18 02:51:22 -07:00
b74f223ba0 PixelParts: Move autohbm preferences into their own fragment
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-18 02:01:52 -07:00
28ef4bf892 PixelParts: Update README, banner and screenshots
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-14 23:16:14 -07:00
b17ea9fa68 PixelParts: Use Build.MANUFACTURER & Build.MODEL for TopIntroPreference
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-14 10:47:57 -07:00
42d86f5965 PixelParts: Add menu item to launch AOSP battery usage summary
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-12 15:47:49 -07:00
0a4dc1d73f New Crowdin updates (#12) 2023-06-12 15:14:20 -07:00
7992609957 PixelParts: Implement Options Menu in battery info fragment
Move temperature and refresh interval prefs there as checkboxes.
This also makes the refresh interval 5000ms by default and 1000ms
when checked.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-12 15:13:52 -07:00
e0e8cd1a30 PixelParts: Update USB 2.0 fastcharge info string
To mention the device needs to be disconnected and reconnected for
the changes to take effect.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-12 04:53:41 -07:00
1c23ba0893 PixelParts: Enable click behavior for all battery info prefs
When clicked, a AlertDialog will appear, providing explanations
regarding what each preference represents.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-12 04:53:22 -07:00
649d08db5d PixelParts: List USB connection type
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-11 21:05:39 -07:00
152eb7f8b9 PixelParts: Generalize QS-Tile subtitle strings and apply to all
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-08 22:20:29 -04:00
f427a5a7f3 PixelParts: Refactor Flashlight QS-Tile (now Pixel Torch)
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-08 21:51:12 -04:00
20adb10f90 PixelParts: Add preference fragment for changing saturation level
To apply the saturation changes, the method executes the command
"service call SurfaceFlinger 1022 f [saturation]" using
Runtime.getRuntime().exec() when the seekbar progress is set.
However, when the devices color mode is set to 'saturated',
a saturation value of 1.0 does not register any changes. To
overcome this, a value of 1.001 is set for a seek bar value of 100.

Co-authored-by: SKULSHADY <anushekprasal@gmail.com>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-07 19:47:45 -07:00
574d173da0 PixelParts: Add SwitchPreference to set temperature to Fahrenheit
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-06 20:35:48 -07:00
b8c0e67208 PixelParts: Make status, health & capacity level translatable
Previously, the status, health and capacity level values returned
by the respective nodes were always in English (by design ofc),
providing no straightforward way to support translations. This
commit overcomes that limitation by mapping these values to
string resources using a switch-case mechanism.

With this change, we link each English value obtained from the node
to a specific case. Each case is directly associated with a unique
string resource ID. Utilizing this ID, we retrieve the corresponding
string from resources, effectively enabling support for translations.

All possible status values were retrieved from:
db1fca1f81/drivers/power/supply/power_supply_sysfs.c (L75)

All possible capacity level values were retrieved from:
db1fca1f81/drivers/power/supply/power_supply_sysfs.c (L122)

All possible health values were retrieved from:
db1fca1f81/drivers/power/supply/power_supply_sysfs.c (L95)

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-06 20:35:26 -07:00
8ed8a0fa4f New Crowdin updates (#10) 2023-06-06 23:55:52 +08:00
2c9ed6157a New Crowdin updates (#9)
* New translations strings.xml (French)

* New translations strings.xml (Hungarian)

* New translations strings.xml (Swedish)

* New translations strings.xml (Spanish)

* New translations strings.xml (Russian)

* New translations strings.xml (Russian)

* New translations strings.xml (Portuguese, Brazilian)
2023-06-06 20:10:24 +08:00
7761e7456c PixelParts: Update preference summaries for node isFileR/W failures
This makes it more clear rather than only disabling the preferences
when isFileReadable or isFileWritable returns false.

Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-06-05 16:23:43 -07:00