summaryrefslogtreecommitdiff
path: root/sdk/src/java/org
AgeCommit message (Collapse)Author
2021-09-22lineage-sdk: add ATV button settingsTimi Rautamäki
Change-Id: I7d41e71301e480aef73c32af77c0eb78c9053b6d
2021-05-23lineage-sdk: Follow AOSP order of PowerMenuConstantsGegham Zakaryan
Partially follow the order of config_globalActionsList and bring emergency and lockdown to top. Some of the order isn't followed as some items such as users and airplane don't exist in AOSP's list but are much more frequently used than, say, bugreport. Signed-off-by: Gegham Zakaryan <zakaryan.2004@outlook.com> Change-Id: Ie49e77fd99ad0f0dee7c6c7956fc7c1d0474ee63
2021-05-23Revert "sdk: Deprecate POWER_MENU_ACTIONS"Gegham Zakaryan
This reverts commit d8742f0727aad8187a903a0afbafbc909edf1d1c. Signed-off-by: Gegham Zakaryan <zakaryan.2004@outlook.com> Change-Id: I4071297652a6cd0a47d6c642909b32f742e60781
2021-05-13lineage-sdk: Disallow KILL_APP action when task is pinnedLuK1337
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3468 Change-Id: I8420d5531422e9ed25588cd6e5198e14472569e5
2021-05-12lineage-sdk: Retire HostnamePreference as net.hostname no longer worksLuK1337
Change-Id: Ibecaccd5f853570fb4e02cba7274429f2bb037b2
2021-05-04lineage-sdk: Add KILL_APP button actionLuK1337
This partially reverts commit 9eca90278d2936b83b420081bbc78d475627ba7e. Change-Id: I9bfc039540936e4dbd4313c8f368ce3e3e445290
2021-05-04lineage-sdk: Remove single hand mode enum valuesLuK1337
Change-Id: I2865d57d5b6e49391898e8de06889b1a26c54970
2021-05-03BatteryLights: Fix disabled lights when fully charged conditionsBruno Martins
Make sure that the option has effect ONLY when battery is uh... fully charged. Additionally add previously missing logging. Change-Id: Ib232d0ea6652230a2435be6931f964dc04a30f71
2021-04-30BatteryLights: Add ability to turn off LED when fully chargedBruno Martins
Change-Id: I01b8c753a1f92838462a797fd97b5f6a3c666158
2021-04-06Introduce anti flicker mode in LiveDisplayArian
Change-Id: Iba7387ff16d463d087c9a38bced90b6c1bd503b1
2021-01-01SystemUI: NetworkTraffic: Refactor message handlingMichael W
* 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
2020-11-09LineageButtons: Add support for skipping tracks with remote controlezio84
For Spotify and other players that allow music controls for remote devices (PC, PS4) through the media notification Change-Id: I38887f8b1cff1a0c1e3adadbfe37d5af59b5cdcc
2020-11-07sdk: Deprecate POWER_MENU_ACTIONSLuK1337
Change-Id: I35b0d1123a427598e548cf865328a7c9423cbbca
2020-10-12sdk: Kill TelephonyExtUtils classBruno Martins
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-08sdk: Remove "long-press back to kill app" featureBruno Martins
Change-Id: I3df4469beb53eeee070cdc486d02bb95001d7f53
2020-05-04lineage-sdk: NetworkTraffic: Cleanup network callbackSam Mortimer
* 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-01lineage-sdk: add powershare qs tileLinux4
Change-Id: Ia324041843b7314881d9958f81fdc45a92b56ea0
2020-04-04lineage-sdk: Add AoD TileAndreas Schneider
Change-Id: I9ab3f3269849edd6052be644f551ec2658615423
2020-03-17NetworkTraffic: Include tethering hw offload statisticsSam Mortimer
*) Regular interface stats don't include hw offload tethering statistics so collect and include them in our traffic calculations. Change-Id: Id72577429840f65ae20d7b80e7490ec41d826579
2019-12-08sdk: Add GLOBAL_ACTION_KEY_RESTART_FASTBOOTLuK1337
Change-Id: Ib4f050f634769f58e654a4240fb521f136fd04e7
2019-11-23sdk: Make phone a new compile targetMichael W
* 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-02SensitivePhoneNumbers: Load numbers only at first actual call to methodMichael W
* 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-02SensitivePhoneNumbers: Convert to singleton classMichael W
* 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-02SensitivePn: Also hide international numbersMichael W
* 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-02SensitivePn: Take into account multiple SIMs for sensitive numbersMichael W
* Instead of only checking the current or default MCC to hide a number, see if any of the connected networks would hide a number * This makes sure that e.g. for multiple sims (e.g. living next to the country border, having one sim for each country) and accidentially using the wrong sim for a call, the number would still get hidden Change-Id: I2692d00217d3143fd55122cee9064528bb09352d
2019-11-02sdk: Import SensitivePhoneNumbersOlaia Segovia
* In order to access the classes in Dialer, we need to expose them This was extracted from the original implementation in Telecom Author: Olaia Segovia <olaia.segovia@bq.com> Date: Thu Mar 16 08:40:30 2017 +0100 (1/2) Make sensitive phone numbers not to be shown in call log history. Considering sensitive phone numbers to be, hotlines dealing with violence against women. In the EU, these numbers do not show up in the phone bill. In order to avoid these phone numbers to be listed in the Call Log, we have implemented a new XML file which is parsed with phone numbers from different countries to be filtered. This file needs to be copied to device via desired Android.mk file in order to be able to process it. The comparison is made checking the network MCC the SIM is connected to in order to consider roaming and multisim scenarios. Test: CallLogManagerTest.testDontLogCallsToSensitivePhoneNumber PASS Change-Id: I4a59ff0577942ce56924f1a434ae0a3a38eacc62 Signed-off-by: Olaia Segovia <olaia.segovia@bq.com> Author: Paul Keith <javelinanddart@gmail.com> Date: Thu Jun 22 19:40:56 2017 +0200 SensitivePhoneNumbers: Handle lists of MCC codes * Some countries have multiple MCC codes, so handle it * In the sensitivePN network field, enter the list of MCCs like so: https://review.lineageos.org/178233 Change-Id: I34225473404b2be2640ea9ab05691dc985c49fa0 Author: Paul Keith <javelinanddart@gmail.com> Date: Thu Jul 6 16:12:12 2017 -0500 SensitivePhoneNumbers: Fix number comparison * Currently, we just compare the strings for equality, which results in incorrect detection of sensitive nums a lot of the time, because adding (or removing) the country code is enough to make the detection fail, meaning the call to that phone number is logged * Use Android's PhoneNumberUtils comparison method to fix this, since it takes these factors into account Change-Id: I26ac180f8a6552cf87a4bada1d370f0ebb884ee1 Author: Michael W <baddaemon87@gmail.com> AuthorDate: 2019-09-07 18:34:57 +0200 CallLog: Fix improper call to SensitivePhoneNumbers * isSensitiveNumber expects a subId to be passed, but with the current implementation gets a PhoneAccountHandle * Actually pass the subId and make the call use an int, while on it * Fall back to the default subId only when we get an INVALID_SUBSCRIPTION_ID Change-Id: Id6d64f2c9f76d94d1b4d9851317ea2cc7e07323b Change-Id: I241c1652105b82d1d15549332cb6e274d7c726ce
2019-09-10lineage-sdk: Clean up importsLuK1337
Change-Id: Ie14853382ebefd42fdf827e2999a2a2a6d0a1cd1
2019-09-09lineage-sdk: Fix moveTaskToFront() call in ActionUtilsLuK1337
* moveTaskToFront() now has 2 nullable parameters at the beginning: - IApplicationThread appThread - String callingPackage Change-Id: I761784bdb3918021a0848e8ee31baa0818540bb1
2019-09-09lineage-sdk: Migrate to androidxSam Mortimer
* Migrate from support library to androidx * Various improvements and cleanup by @bgcngm Change-Id: I10bbf5056125e8309f344c3eb18cc628bd7ec34e
2019-08-30lineage-sdk: Refactor ActionUtilsHan Wang
* Use getFocusedStackInfo() to check active task, also do general cleanups for this class. Hopefully this will get rid of the strange issues of "kill foreground app" feature. Change-Id: Ice1ca8e088ea4fec050fa171d990cb938dd3272c
2019-08-25lineage-sdk: Fix traffic stats for tethering and vpn use casesSam Mortimer
Problems with current TrafficStats.getTotal[RT]XBytes() implementation: * Tethering related traffic is not counted at all. * If you have a VPN active, stats are double counted. So change the approach and track traffic on all non-VPN Internet capable networks since: * Tethering traffic is included in interface specific stats (unlike getTotal*). * VPN networks are excluded so no longer double counted. * Works correctly regardless of hotspot "Allow clients to use VPNs" hotspot setting. * Works with simultaneous wifi ap and wifi upstream. (WIFI_HIDL_FEATURE_DUAL_INTERFACE = true) Change-Id: Ic1135f10388b5be427202b092acd1444f94bd2b6
2019-04-12sdk: notification: allow forcing notification color for previewAlexander Martinz
Parts uses notifications to preview custom notification lights. Since Android O we got NotificationChannels and the internal API uses the color values of the channel instead of the color set at the notification. To prevent unexpected breakage in future, introduce a flag to be used for providing preview colors in a bundle to force said color. Also introduce flags to control the ON and OFF duration. Change-Id: Ifbb7995a19d95b6ddb2627c1b14dd201f9dc5430 Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2019-02-06Add emergency power menu constantLuca Stefani
Change-Id: I44555b31ff14a5d14de7395b88f44d7be93e06f1
2019-01-25TelephonyExtUtils: Handle extphone binder deathdianlujitao
* If extphone binder service is invoked after death, phone service would crash due to android.os.DeadObjectException. Change-Id: I8dec7bfd709b0443654001ecd67219a2ba8cc134
2019-01-21TelephonyExtUtils: Set timeout for (de)activating provisionnico
* catch OEM RIL being unresponsive to UICC provisioning request Change-Id: Ic28c01412bffaec4cadabd3d68434ddef75693ef
2018-09-16PowerMenuConstants: Add user logout as new global actionBruno Martins
* Google introduced user logout in Pie: https://github.com/LineageOS/android_frameworks_base/commit/044588599c97ceff70d74a133c9eb01a028db00c Change-Id: I60a64beb5fc69e89d5872c74439bec30a47d4d0c
2018-09-03lineage-sdk: Rewrite Lineage preference classes used in about phone viewLuK1337
* Now extending TextView to match Android P settings. Change-Id: Ieed7174a92e3801e6c782b39c36731a67ae1be59
2018-09-01ActionUtils: Switch getLastTask to IActivityManagerLuca Stefani
* An alternative to using the getRecentTasksForUser method that got removed with the following commit: https://github.com/LineageOS/android_frameworks_base/commit/5fa397533fa29254e8a45a05675b2c03756a0ada Change-Id: I752c2445c3ffc0933dfe6290c99d839a036e4bc3
2018-08-25LineageNotificationLights: Don't create KeyguardManager in constructorLuK1337
* Apparently creating it so early can cause serious breakages that make StorageManagerService and UsbDeviceManager end up getting null pointer when trying to get KeyguardManager with ctx.getSystemService(KeyguardManager.class). * Moving ctx.getSystemService(KeyguardManager.class) out of constructor to isKeyguardLocked() solves these issues. * Also move to getSystemService(Class<T>) while at it. Change-Id: Ib3f65ba2e726149089ab1fb12030321e0ecdeab1
2018-08-04sdk: Allow controllable brightness for non-RGB segmented battery LEDsPaul Keith
* For non-RGB segmented battery LEDs, we currently don't allow any kind of brightness control, because the alpha channel is taken up by the level * To remedy this, set the brightness in the color channel like we do for setting panel backlight brightness by setting the brightness as R/G/B Change-Id: I4e47861643e0b2b8766af0f2ff275069fc580108
2018-08-02Import preference class for custom hostname featureLuK1337
Change-Id: I85383db3583eba75f675ad5e4a4be1379c012ef6
2018-07-20[2/2] Add vendor security patch level to device infoTobias Tefke
Change-Id: Ic65290aa2c5fa159512e16a3781bc407876b9e5a
2018-06-28lineage-sdk: Introduce TelephonyExtUtilsMichael W
Change-Id: Ifdd18dd6e89e23c5b804c3454ee8473a5920b562
2018-06-26NetworkTraffic: Resolve status bar indicators tintsAdrian DC
* Apply the color tint with PorterDuff.Mode.MULTIPLY as the original color is white, with transparencies * Use the DarkReceiver tint's value as icons tint * Results: Before and after: https://ibb.co/k15ony * Test: Bright wallpaper with status bar contrasts: https://ibb.co/dxupSy Change-Id: I4f31cf5a9a3db4018543603a891fa7967ccbb4a3
2018-06-12sdk: Add an option to force pre-O apps to use full screen aspect ratioJesse Chan
When an app target pre-O releases, the default max aspect ratio is 1.86:1 which leads to ugly black areas on devices that have screens with higher aspect ratio (for example Galaxy S8/S9). This change adds an option to allow users to change aspect ratio for pre-O apps to full screen aspect ratio. Change-Id: I2531542f736ee7b809ef7faffd72e5963e7d20d6
2018-06-05Add led capability LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESSSam Mortimer
*) Many existing liblights support notification brightness control via the alpha channel but do not support similar for the battery led. *) https://github.com/LineageOS/android_lineage-sdk/commit/8f7a4559ab4a81855f399eae32ebe4a3f531e8b2 introduced a dependency on light capability LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS such that, when set, it was assumed that the battery led brightness is also liblights adjustable. It turned out that this was not the case. *) Create a new capability to allow devices to distinguish whether their liblights supports adjustable brightness control for notification and battery leds independently of one another. *) Document how brightness support works in LightsCapabilities. *) Copy LightsCapabilities comments to the default lights config to raise visibility. Change-Id: Id95905f07128c78c6acacf3b60d71bb37f70bcfb
2018-05-24lineage-sdk: Add backend for reading enhancementRashed Abdel-Tawab
Change-Id: Ibd1c9e057ddf8e9d21657aef0ebeeaa9a253e92d
2018-04-26LineageBatteryLights: Fix brightness for devices with segmented ledsBruno Martins
* In case mCanAdjustBrightness was false, the brightness level would always be set to the maximum value. Change-Id: I034bc17ac1174c491830f0a6cb1969a99ee900a7
2018-04-26LineageBatteryLights: Take current user settings into accountBruno Martins
Change-Id: Ie99c14a73c14e1f5b6c39125625153f2628f884d
2018-04-26LineageBatteryLights: Rename some class members and add more debuggingBruno Martins
* Follow LineageNotificationLights debug logic Change-Id: I6b4a91db45a119c8c0b8b30684386765b73b93d2