Commit Graph

1051 Commits

Author SHA1 Message Date
LuK1337
44427ae3ef lineage-sdk: Add preference keys for back key long press customization
Change-Id: I8a5d80ef5f8aa238ad73ba034d275ea1094dffe9
2021-05-04 13:39:13 +02:00
LuK1337
122825fa60 lineage-sdk: Remove single hand mode enum values
Change-Id: I2865d57d5b6e49391898e8de06889b1a26c54970
2021-05-04 11:15:06 +02:00
Bruno Martins
d1461d3451 BatteryLights: Fix disabled lights when fully charged conditions
Make sure that the option has effect ONLY when battery is uh...
fully charged.

Additionally add previously missing logging.

Change-Id: Ib232d0ea6652230a2435be6931f964dc04a30f71
2021-05-03 19:05:45 +01:00
Bruno Martins
c47d955826 BatteryLights: Add ability to turn off LED when fully charged
Change-Id: I01b8c753a1f92838462a797fd97b5f6a3c666158
2021-04-30 19:40:57 +02:00
Arian
5f3ded7d05 Introduce anti flicker mode in LiveDisplay
Change-Id: Iba7387ff16d463d087c9a38bced90b6c1bd503b1
2021-04-06 11:35:41 +02:00
Luca Stefani
97c2e135f1 lineage-sdk: Move to schema parser
Change-Id: Id79656a4abed0d94e2af81f1935b663164ccc8d8
2021-03-13 17:36:20 +01:00
Luca Stefani
402a3860f4 lineage-sdk: Include SPN parser in org.lineageos.lib.phone
Change-Id: Ib87961a739d5494619c70ecc5f35df6aaadb2eb0
2021-03-13 17:35:59 +01:00
Luca Stefani
34c9267a74 lineage-sdk: Import SPN schema
* Will be used to verify SPN xml at build time
  and to automatically generate a C++/Java parser

Change-Id: Ic401c01b74a958b2e813f986725e6c677febabfb
2021-03-13 17:35:59 +01:00
Luca Stefani
0a32731db8 lineage-sdk: lib.phone: Compile against public SDK
* In order to be able to reference this package
  in non-platform packages, we need to compile
  this against the current sdk

Change-Id: Id87059d876854907d947e5802a04db634435c6ed
2021-03-13 17:35:55 +01:00
Michael W
9c5242de8b SensitivePhoneNumbers: Expand XML parsing
* Allow each item to carry additional infos:

<item>
   <name>SomeNameHere</name>
   <number>1234</number>
   <someTag>someValue</someTag>
</item>

* We treat all but <number> as optional
* This way we can show info we have and skip what
  we don't know

Change-Id: I724d9ac25ce8a0ae7f69ec513ba9796b06c9e7f2
2021-03-13 16:02:28 +01:00
Michael W
520e6e45a6 SensitivePhoneNumbers: Additionally check against the sim operator
* In order to also mark numbers as sensitive when calling to your home
  country, check the sim's operator as well
* Also move the fallback mechanism out of the "else" in order to perform
  as many checks as possible to not miss any case of hiding

Change-Id: I23b67145406793506be657df8b62f5d09b5a2a18
2021-03-13 16:02:24 +01:00
Han Wang
4457a818c3 lineage-sdk: Fix NPE when using getPictureAdjustmentRanges()
* This method can return null, and List.addAll(null) will
   throw NPE. Fix it.

Change-Id: I4e5fc719209dbfbce785b1e0b07588e2406203ea
2021-03-06 10:27:55 +01:00
Michael Bestas
09b2736bce Automatic translation import
Change-Id: I42337aacd36b8e1f5a5ef2feb4de3cc048d191b3
2021-02-28 02:38:28 +02:00
Arian
056187e74f LineageHardwareManager: Introduce keys swap feature support
Change-Id: I789814d780b06b146c1f9ab62293f4d6ca287208
2021-01-07 17:24:01 +00:00
Michael W
54d862cac4 SystemUI: NetworkTraffic: Refactor message handling
* In certain network situations (e.g. while changing from wifi to
  cellular) it can happen, that the HashMap is modified while the stats
  are currently being recalculated
* We can prevent this by moving adding and removing of any network
  to the same handler so the callbacks can happen without breaking the
  flow
* Move the existing code in handleMessage into some little helper
  methods so it stays simple and readable

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/2870
Change-Id: I38c0c27a4f76fab5aeee013beab346c088bbbd59
2021-01-01 14:19:44 +01:00
Sam Mortimer
89f20377c7 lineage-sdk: Create minimal lineagesettings library for apex use
Change-Id: I48f81b4428c355fc6c7b0e4effc5dd7b5dc48fe3
2020-12-22 10:26:35 +01:00
Alessandro Astone
967b1a8b8f Profile: Don't NPE when service is not started
On FDE we check wether keyguard is enabled before starting non-core
services like ProfileManager.
All method calls are already guarding RemoteException for a binder
fail, so just throw one if getService() fails.

Change-Id: I44a3a5ea56a5277d84d96a0bc2c7135433811e20
2020-12-21 19:25:00 +01:00
Han Wang
6b80931a54 PerformanceManagerService: Account for QCOM perf HAL 2.0
* This also allows waiting for MPCTL to start on boot
   if devices are using the newest perf HAL.

Change-Id: I3855198d7bcf01472595616e820d47bcec01d8d4
2020-12-11 17:07:53 +01:00
Bruno Martins
c127bb2d83 sdk: Set AOSP default behavior for app switch button long press action
The default is no action. Furthermore, split screen is not supported
on Android Go devices and being that one the default action makes it
inconsistent with Go-aware ButtonSettings code in LineageParts.

Change-Id: I21e834f8557d0d0dc81af8443bcb8db30300ded0
2020-12-05 00:32:25 +01:00
Michael Bestas
ed4ef6e3d1 Remove unused org.lineageos.platform.xml
Change-Id: Ie7a1571d9359aed29eb978eabab2147a2492ca95
2020-11-23 20:44:50 +02:00
LuK1337
56e1fbec1b LineageSettingsProvider: Make lockscreen visualizer off by default
Change-Id: Ia7a3ddc32d189c53bca5aad8989d75636da7bdb4
2020-11-20 16:31:53 +01:00
Jesse Chan
e588c4aa83 Implement click to take partial screenshot [3/3]
Change-Id: I9de0cd4f1b793119a7dd45a95b040f70d6c151a6
Signed-off-by: Jesse Chan <jc@lineageos.org>
2020-11-11 00:10:00 +01:00
ezio84
f90b813374 LineageButtons: Add support for skipping tracks with remote control
For Spotify and other players that allow music controls for
remote devices (PC, PS4) through the media notification

Change-Id: I38887f8b1cff1a0c1e3adadbfe37d5af59b5cdcc
2020-11-09 11:03:21 +01:00
LuK1337
d8742f0727 sdk: Deprecate POWER_MENU_ACTIONS
Change-Id: I35b0d1123a427598e548cf865328a7c9423cbbca
2020-11-07 17:15:09 +01:00
Bruno Martins
1f93089a72 sdk: Allow support for keyboard lights toggle mode only
Change-Id: Ibf7d9f5a2fb15e2085161275236d998b3f162450
2020-10-29 16:19:59 +02:00
Bruno Martins
13069beb3a sdk: Move to new button and keyboard brightness configs
For as strange as it may be, so far the visibility of the features depended
on the default value of config_{button,keyboard}BrightnessSettingDefaultFloat.
This was nonsense, because it would force everyone to overlay that default
with a value of 0.0, just to make the unsupported feature go away.

Change-Id: If605238bf30642db057b06b03224d9a8b4451f12
2020-10-29 14:16:18 +00:00
Bruno Martins
88daa87a94 ConstraintsHelper: Allow replacing multiple keys at once
Change-Id: Ic676aaf12abd4d4b7a6a60b66308774a944ffdd8
2020-10-25 20:04:12 +02:00
Bruno Martins
7bf74325e4 sdk: Kill TelephonyExtUtils class
Since Android 10 arrived, the support for manual SIM provisioning
was never ported. In fact, there seems to be a way to do that
using some bits of AOSP code.

This way we get rid of the telephony-ext dependency for good.

Change-Id: Ibe4e430d696782032b7d9840ab36db040c3a4df9
2020-10-12 18:03:11 +02:00
Bruno Martins
af3c06c2b1 sdk: Mark ADB_NOTIFY and ADB_PORT settings as deprecated
Android 11 introduced Wireless Debugging, rendering our good old feature
redundant.

Change-Id: I7581fd79c5addad4542f392217365fa7e192528d
2020-10-12 18:01:36 +02:00
Bruno Martins
9eca90278d sdk: Remove "long-press back to kill app" feature
Change-Id: I3df4469beb53eeee070cdc486d02bb95001d7f53
2020-10-08 20:28:08 +01:00
LuK1337
612a8b9820 sdk: Switch to public API getting WiFi SSID
Change-Id: Icd3f05169a8884ea981f0cf1dbf7c024c34c721e
2020-10-08 13:57:53 +02:00
LuK1337
9104aee9cd LineageSettingsProvider: Migrate keyboard/button backlight to 0.0f -> 1.0f range
Change-Id: I42123b2cc2acde35c5db9087f478be5adc63b3ec
2020-10-05 20:35:53 +01:00
Bruno Martins
a5fcead6cf lineage: res: Introduce overlays for biometrics hax
Change-Id: I5037be2fc49680a5092939b5e8b6518a506d7297
2020-10-05 20:35:11 +01:00
Bruno Martins
05473f5a8d lineage: res: Introduce button/keyboard backlight config overlays
Change-Id: I55214f39aefda1bdcbc2fa7aa5845812a68f94af
2020-10-05 18:09:51 +01:00
LuK1337
fcfcf5d47d lineage-sdk: Make org.lineageos.platform compile again
Change-Id: I30a509684a32ed1013e8f23e40894d23177f3fa8
2020-10-05 02:18:02 +02:00
Bruno Martins
4218524124 TrustInterfaceService: Do the needful at a later stage
According to the lifecycle of a SystemService, onStart() is called to get
the service running and the service should publish its binder interface
at that point. First of all, ensure to do that and then do the real work
once boot is completed.

This was actually the root cause of the issue that commit c06e32d
addressed (not entirely correctly). Although the crash was no longer
observed after that commit, the proper fix is actually this one.

Change-Id: I42dc7182ba3d0db5413709de229ab9c0c4926df6
2020-10-01 19:21:18 +02:00
Bruno Martins
9b94f22095 LineageHardwareService: Publish binder service during onStart()
According to the lifecycle of a SystemService, onStart() is called to get
the service running and the service should publish its binder interface
at that point.

Change-Id: I99031807f45d8d7e048582749b1ba6885aa12af4
2020-10-01 19:21:18 +02:00
Bruno Martins
5d877cde9c ProfileManagerService: Fix initialization order
According to the lifecycle of a SystemService, onStart() is called to get
the service running and the service should publish its binder interface
at that point. First of all, ensure to do that and then initialize the
rest of the stuff only during PHASE_ACTIVITY_MANAGER_READY boot phase,
because services can only broadcast intents after that phase.

This fixes a particular issue, that was causing LineageParts to crash
while starting System Profiles activity.

Change-Id: I8a397523aec8b5008da3e596eee23463618c8489
2020-10-01 19:21:18 +02:00
Paul Keith
4b568b121c sdk: Add overlay for disabling livedisplay
* config_defaultLiveDisplayMode should also be set to 0.

Change-Id: I06ded48ec8783d5319925f391cb7f54391cd1dea
2020-10-01 16:42:18 +02:00
Bruno Martins
c06e32dcc2 TrustInterfaceService: Init mNotificationManager in the constructor
Ensure that the variable is not null when removeNotificationForFeatureInternal(int)
is called so to avoid the NPE:

   E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.NotificationManager.cancel(int)' on a null object reference

This fixes LineageParts crashing when disabling Trust notifications.

Change-Id: Ia0fa793378116101821a7bd424e0859869db48f5
2020-09-26 14:39:36 +02:00
Bruno Martins
063a591095 jni: Switch to jni_headers
Change-Id: I9df3558e828fcf4071681775c3790d1c75e96043
2020-09-20 23:02:20 +02:00
Bruno Martins
97fa452b81 jni: Use NELEM macro from utils/misc.h
Change-Id: I5b8a584fa0b72bb1a4955dce5e73b42cbb4f8250
2020-09-20 23:02:01 +02:00
LuK1337
bede8e54bd Trust: setBlockableSystem() has been renamed to setBlockable()
Change-Id: I62a560971c1be2fb1f26d58c75c0761f5db98278
2020-09-15 10:16:10 +02:00
LuK1337
31ed872726 lineage-sdk: Clear variables before attempting to generate res R/Manifest.java
* Fixes really strange looking errors while building rild:
  FAILED: ninja: 'out/target/product/generic_arm64/vendor/bin/hw/org.lineageos.platform-res.apk', needed by 'out/target/product/generic_arm64/vendor/bin/hw/rild', missing and no known rule to make it

Change-Id: I0fb91383829b9b478b3dee9686e9e719ea3ed695
2020-09-15 10:14:15 +02:00
LuK1337
1317cf2b12 LineageSettingsProvider: Make it compile again
* IContentProvider API now requires us to pass an attribution tag.

Change-Id: Ie991f71fb34717ab7d811ccb519a0d2d595df388
2020-09-15 10:11:35 +02:00
Sam Mortimer
fdf52b5ed0 lineage-sdk: Run bpfix
* Run bpfix -w .

Change-Id: I72bf80791a5053de06e5472b3d6fccb3d6b0ed55
2020-09-15 00:01:31 +02:00
Sam Mortimer
07564a9939 lineage-sdk: use libnativehelper
* And modify include paths to allow compile:
  JNIHelp.h -> nativehelper/JNIHelp.h

Change-Id: I8d7b09a4f4d4bf1b6c49d5cd5cc191b383080809
2020-09-14 22:09:11 +02:00
Sam Mortimer
93abc79d05 lineage-sdk: use platform_apis for LineageSettingsProvider
* Fixes compile error:
  lineage-sdk/packages/LineageSettingsProvider/Android.bp:17:1: module "LineageSettingsProvider" variant "android_common": platform_apis: platform_apis must be true when sdk_version is empty.

Change-Id: I3024ef46e729fea6f85ed9e84acf8ab5a9f05cb1
2020-09-14 22:07:11 +02:00
Paul Duffin
374e4df7b1 Replace no_framework_libs: true with sdk_version: "core_platform"
(cherry picked from commit 7954524e3cc618830f0bf7b23687bf222ecd285b)

Bug: 134566750
Test: m
Change-Id: I0260942108a13cc5e9bed1d6005abfb8daffe0ac
Exempt-From-Owner-Approval: minor build change
2020-09-14 14:49:05 +02:00
Jarl-Penguin
ae6540bc43 lineage-sdk: Fix typo for filterDisplayModes comment
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I710a23500909beff04392b8df8e4bf9e9e33162d
(cherry picked from commit 38d62ca22f02ca4c1b74fa3c2f53491d00484ef3)
2020-09-12 10:57:36 +02:00