* 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
* 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
* 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
* 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
* 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
* Fix bp and manifest to work with AndroidJUnitRunner.
* Remove broken tests (we no longer intercept in fw/b
settings provider and QS_USE_MAIN_TILES was removed).
* Tests pass when executed using:
adb shell am instrument org.lineageos.lineagesettings.tests/androidx.test.runner.AndroidJUnitRunner
(see README.md for more info)
Change-Id: I3fcf4885c61106f43e99847293220afee78e2f6a
API changed here:
633a13e2fa (diff-944e798f679ef205433bd711345d06dcR75)
Fixes:
AndroidRuntime: Caused by: java.lang.SecurityException: The authority
unknown does not match the one of the contentProvider: lineagesettings
Change-Id: I5fe85fee777f919824e6a2ff78986e2d736e0267
* moveTaskToFront() now has 2 nullable parameters at
the beginning:
- IApplicationThread appThread
- String callingPackage
Change-Id: I761784bdb3918021a0848e8ee31baa0818540bb1
* 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
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
* LiveDisplayConfig isn't instanced until boot completed, thus if
LiveDisplayManager is instanced earlier, null is always returned.
Change-Id: I003886ffced86a5a82dec25a4cc7b542da0f2331
* Handle the migration for old settings and default
to Android's stock battery style.
* Hiding battery icon is now achieved using icon blacklist
via system tuner settings.
Change-Id: Ie41d71c774a34abe225e2c0a6a0a9fd4316189cd
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>
* The parameter here only has to have the type you want it to return,
so creating an array of size > 0 is unnecessary and wasteful
Change-Id: I28e490fb6fa3703d7edca21b29d640105072947b
* While we're at it, hide the use of getSupportedFeatures(),
since it only works for lineagehw java features, not hidl
* Cleanup some minor styling/organization issues
Change-Id: I905010bc7c6d7d8578eeca501be23f665127aa27
* DISPLAY_GAMMA_CALIBRATION
* LONG_TERM_ORBITS
* SERIAL_NUMBER
* While we're at it, cleanup tests for removal of other features too
Change-Id: I1a572cf3bcc5298d208a3dc234f9d82da1105bf0
* If extphone binder service is invoked after death, phone service
would crash due to android.os.DeadObjectException.
Change-Id: I8dec7bfd709b0443654001ecd67219a2ba8cc134
* Our overlay name now confuses people as Google introduced a screen
burnin protection feature for ambient mode in Oreo. Just re-use AOSP
one and kill this.
This reverts commit 088ddf5aaf.
Change-Id: Ia76b28444cd7b117559062fbd8230602962616b2
* An alternative to using the getRecentTasksForUser method
that got removed with the following commit:
5fa397533f
Change-Id: I752c2445c3ffc0933dfe6290c99d839a036e4bc3
Replaces the need for:
32e67e6020
*) frameworks/support are now built with gradle and are included as prebuilts.
*) API level 26 (8.0) introduced PreferenceDataStorage which can be used
to implement what we need without touching the support library.
Change-Id: Ide3417019ccf8bde5dca3b2aec3d2075e7c8b597
* 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
* The current API makes no sense, and doesn't really
fit with how the other boolean features work
* While we're at it, place AutoContrast properly
Change-Id: I81d7805411c281e435c7451c0b62689711dbb323
* 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
* This service is currently used for loading custom hostname,
it may be used for more than that in the future.
Change-Id: I9b4da124b54bdc28544becb2ad25b7b43d46f123
Allow fine-tuned management of trust warnings,
the user is now able to disable specific warnings
instead of blocking everything
Change-Id: I04c7aa5fba76fd7500fd70c0c874fa0c3e59e03a
Signed-off-by: Joey <joey@lineageos.org>
* 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