Commit Graph

1016 Commits

Author SHA1 Message Date
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
Michael Bestas
a674865ad8 Automatic translation import
Change-Id: Iad577fd5870aefc1c6b21d1a938106929c86352d
2020-06-26 17:24:58 +02:00
Alexander Martinz
4fed3ece43 LineageSettingsService: prevent setting net.hostname to null
If the user did not set a custom hostname, the settings service will
set net.hostname to null.

Only set net.hostname if the user actually set a custom hostname.

Change-Id: Ie9cc84e5e8c9468a7e698896e2b21c14a37ebffc
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2020-06-25 16:20:29 +02:00
Jesse Chan
343d1e5f1d Implement quick QS brightness slider [3/3]
Change-Id: I00ad1ce2742faa1f5a24e4b4f034b314c61cbfd0
Signed-off-by: Jesse Chan <jc@lineageos.org>
2020-06-01 16:21:27 +02:00
Jesse Chan
d649b1d261 Implement hide gestural navigation hint bar [3/5]
Change-Id: Iaf776d9d70b951119134eb31bc44a3a63f468698
Signed-off-by: Jesse Chan <jc@lineageos.org>
2020-05-26 22:07:38 +02:00
Jesse Chan
9d01848dcd lineage-sdk: add black theme for dark mode [4/4]
Change-Id: I53bbb8b9115d5b523aebd09cdb550df577c27272
2020-05-26 19:23:23 +02:00
Joey
d07821003e sdk: add top exclusion to the back gesture
Change-Id: I908714d80740598188ef6a27f35e4f2cb228094a
Signed-off-by: Joey <joey@lineageos.org>
Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Signed-off-by: Jesse Chan <jc@lineageos.org>
2020-05-26 19:22:29 +02:00
Michael Bestas
d4444ddb0a Automatic translation import
Change-Id: I935c810592e329abd48705c57d67f855071d21c9
2020-05-23 18:20:09 +03:00
Michael Bestas
abce3bd2d5 LineageSettingsProvider: Add privapp permissions xml
Change-Id: Ic3b263a94b9269a478c162cd01073870e518df94
2020-05-06 21:39:59 +03:00
Michael Bestas
a5e2132739 sdk: Remove weather from default services
* It's not brought up

Change-Id: I4bcce5d3a8273a2863f5987c8c44e3ab318c811c
2020-05-06 19:49:16 +03:00
Michael W
eec59ae1b6 Trust: Actually cancel notification if the setting is disabled
* When onboarding, the notifications show up properly
* Once you disable any of the notifications, none of them vanishes
  due to the logic being inverted:
  We want to cancel the notification if the warning is not allowed!

Change-Id: Id3f3b3c9e184cc11d2909dd1e0f7859e32588728
2020-05-05 00:27:35 +02:00
Sam Mortimer
082c3c6b86 lineage-sdk: NetworkTraffic: Cleanup network callback
* Don't call ConnectionManager.get* methods from within the callback,
  docs say it's racy.

* Remove the NetworkState struct whilst we're here.  It was
  useful for debug during development but is no longer needed.

Change-Id: Ia1abbdfa31b258c38ba809844340d0dc06e5bd07
2020-05-04 10:22:48 +02:00
Linux4
1c3c0432d0 lineage-sdk: add powershare qs tile
Change-Id: Ia324041843b7314881d9958f81fdc45a92b56ea0
2020-05-01 17:00:54 +02:00
Michael Bestas
8bd3a0cbf7 Automatic translation import
Change-Id: I907c2c99ffee9b9a24c2bbafc1b1ad29c145f092
2020-04-23 16:46:09 +03:00
Michael W
373a11adfb Profiles: Work with a list of subscriptions
* This is a better approach to work with all subscriptions independently

Change-Id: Ibb8f8a2483bfc1e36dc27e5d6abaf9fc653fbeeb
2020-04-22 08:09:46 +02:00
rautamak
fdf30702a7 sdk: Allow translucent notifications background on lockscreen [2/3]
Change-Id: I5f2ee373e446713aee236540f8d16e2685227b32
2020-04-21 21:04:38 +02:00
Chippa-a
5802c11140 lineage-sdk: Update path for custom charging sound
Audio files were moved to /product on Android 10.
Moreover, align with AOSP and use the wireless sound
for wired usecase too.

In order to perform upgrade properly, handle the migration
for custom charging sound setting.

Change-Id: Ifb2085e3f56d777091d66544a72cdd75c843fb56
2020-04-21 15:05:56 +01:00
Bruno Martins
b485a25aa3 profiles: Fix typo in static variable naming
Change-Id: Ic17febc55e6726f0efc18c201223856bbc2798b3
2020-04-21 11:53:28 +02:00
Bruno Martins
bd39ad8c07 profiles: Account for deprecated location API methods
Settings.Secure#setLocationProviderEnabled is deprecated since API level 19.

Change-Id: I7d1d13de3af100fb81d87e957acf89fb7f08cb7d
2020-04-21 00:47:55 +01:00
Andreas Schneider
f3b9b0c95d lineage-sdk: Add AoD Tile
Change-Id: I9ab3f3269849edd6052be644f551ec2658615423
2020-04-04 19:00:36 +02:00
Michael Bestas
a693b1e74a Automatic translation import
Change-Id: I83a67e766b76c8e68bc719ef8ef41c7c22bf14ae
2020-03-30 20:27:55 +03:00
Sam Mortimer
f12a1e5568 NetworkTraffic: Include tethering hw offload statistics
*) Regular interface stats don't include hw offload tethering
   statistics so collect and include them in our traffic
   calculations.

Change-Id: Id72577429840f65ae20d7b80e7490ec41d826579
2020-03-17 21:23:00 +02:00
Nico
c3b5589ccf Implement edge long swipe gesture [2/3]
Set up standard action setting for long swipe gesture.
(KEY_EDGE_LONG_SWIPE_ACTION)

Change-Id: Ida75e768b822542dea944cc719408e192bbb7d7e
2020-03-15 11:48:18 +01:00
Wang Han
06ecc3c168 lineage-sdk: Drop Expanded Desktop API
* This conflicts with AOSP gestures implemention now, and
   the framework part is hard to port.
 * Furthermore the original implementation has the following
   bugs/issues:
   1. Pressing power button or double tap does not wake up the device
   2. No soft-key buttons when opening the keyboard
   3. Probably more

Change-Id: Ia233c3b9d0aa7426f0fd15dffe4da203b4e09b1d
2020-03-09 15:36:50 +01:00
Michael Bestas
e987cfdc6f Automatic translation import
Change-Id: I00a026ec55060642ba678a54e00dd98c88ed0d61
2020-01-27 16:40:24 +02:00
BeYkeRYkt
5cb3e512cd PerformanceManager: Fix applying power profile in low power mode
* Fixes the wrong power profile after rebooting the device, if before that low
  power mode was turned on.

Change-Id: I6008433b5e304a0f168ba9c7eeb189f4d3e83347
2020-01-17 10:16:46 +02:00
Michael Bestas
f355fdbfe8 sdk: Remove berry style leftovers
Change-Id: I59cf25452d1de34bc3c357cdc01b6a4f985802ad
2019-12-16 15:10:11 +01:00
Wang Han
d0702b1288 lineage-sdk: Drop root status of Trust
Change-Id: Iaec0b2a8a781a0e9d301a21a3af5e4362a5d6630
2019-12-08 23:04:18 +01:00
LuK1337
7f4f356c67 sdk: Add GLOBAL_ACTION_KEY_RESTART_FASTBOOT
Change-Id: Ib4f050f634769f58e654a4240fb521f136fd04e7
2019-12-08 20:23:40 +01:00
Michael W
8505f77f36 sdk: Make phone a new compile target
* Moving SensitivePhoneNumbers to sdk got us significantly bigger
  zip packages due to libphonenumber being part of every package that is
  using org.lineageos.platform or org.lineageos.platform.internal
* In order to correct this, move the "phone" folder to an own library that
  statically links libphonennumber and subsequentially make use of that
  package where needed

Change-Id: I4effd7a9248290aeb23ab47ff8e30385dce4401a
2019-11-23 13:10:42 +00:00
Bruno Martins
4eeac2c95b sdk: Nuke Berry Styles
This is being ditched in favour of ThemePicker.

Change-Id: I00c5faca452164d59b804cb64166edb83611f77d
2019-11-21 02:36:13 +02:00
Sam Mortimer
507605002f lineage-sdk: Bump PREF_HAS_MIGRATED_LINEAGE_SETTINGS for 17.0
Change-Id: Ia88d36533c0b0a2dd8ca18e93de5d03441dd8092
2019-11-15 00:24:18 +01:00
Bruno Martins
6cd66659a2 sdk: Mark PG settings as deprecated and remove related resources
Change-Id: Ie2867e46e20ff8749ca4755f7ead847c7962b583
2019-11-04 14:30:37 +02:00
Michael W
ba27ffbbe0 SensitivePhoneNumbers: Load numbers only at first actual call to method
* Constructor is called during boot, adding boot time where
  it's not necessary
* Use the first actual call to a function to parse the list

Change-Id: I02548d004c5d78db65c872247cd36a0405d826ea
2019-11-02 19:08:11 +01:00
Michael W
1498ef9052 SensitivePhoneNumbers: Convert to singleton class
* Now that there are more users than just call log, it is better to parse
  the XML-file just once
* Keep an instance around for the various users of this class

Change-Id: Iff1510dc40d68a211a6a1c5f19e4ca9ac64c3fcd
2019-11-02 19:07:14 +01:00
Michael W
bf0d04e4de SensitivePn: Also hide international numbers
* When calling the number with intl. prefix it is currently not hidden
* Remove the international prefix before checking th number

Test:
Before:
116006 - hidden
+49116006 - not hidden
004911606 - not hidden

After:
116006 - hidden
+49116006 - hidden
0049116006 - hidden

Change-Id: I72ec2c9a4da87ef243c59c8c4bab33585fdbd854
2019-11-02 19:04:28 +01:00