No longer necessary to initialize the variable, since the helper
returns the default NFC adapter, or null if no NFC adapter exists.
Additionally, try...catch can also be removed.
Change-Id: Ic3a1fac8cdf892d5ceccec4e39090ac20cc91e5d
IPv6-only networks that support 464XLAT use CLAT to access IPv4
addresses, but the traffic that occurs over the CLAT interface is
tracked separately; it is not reflected at all in the stats of the
underlying interface, so prior to this change, IPv4 traffic on
applicable IPv6-only networks is not reflected in the network traffic
monitor, either.
While there is no exposed API to retrieve stacked interfaces, we can
still try to grab the stats for a CLAT interface (which always starts
with "v4-"), just in case it exists, and if so, add in those stats.
Test: Manual: While connected to an IPv6-only network, such as a
T-Mobile cellular data connection, attempt to load https://1.1.1.1
in a browser while the network traffic monitor is enabled. Reload
the page / choose different languages to cause traffic to occur,
and it should be reflected in the traffic monitor.
Issue: calyxos#792
Co-authored-by: Oliver Scott <olivercscott@gmail.com>
Change-Id: Ida768ebe73a47bb06da53aeb7b5c6882f0090e75
A new network traffic display unit option "automatic" offers
a compact display of the network traffic by using at maximum
three digits and an abbreviated unit string.
Comes in handy for situations with reduced space in the
status bar.
Change-Id: Ib4d969924ad5a345b03540070e49a0473f343ad3
This will let us use it without bothering to handle RuntimeException
from HealthInterface contructor.
Change-Id: I768c250d1e527b6fd8e49a40452b98404062cc18
A new setting NETWORK_TRAFFIC_POSITION decides, if the traffic display
is at the traditional center position or right or left.
Change-Id: I768259696be1186cb1dd4630c2b35540529a7f67
SSIDs can contain ampersands, e.g., "V6 Cafe & Gift Shop". The & and
possibly other special chars need to be escaped when writing
profiles.xml.
Change-Id: Iffef33de22c37d8cb4b5048b92c9ef9c77e18819
* Calling forceStopPackage with USER_CURRENT won't kill the app when
started e.g. via "Shelter" work profile
* Find the uid of the current foreground app and pass that one
instead of UserHandle.USER_CURRENT
* Note: UserHandle.USER_ALL would also kill the app, but all instances
of it - which we don't want
Test:
- Go to Settings->System->Buttons and enable "Kill foreground app"
as action for "Long edge swipe" - test it for PlayStore
- Install Shelter and setup your profile
- Open PlayStore from work profile
- Long swipe the edge:
- Before: Toast appears, app stays open
- After: Toast appears, app is actually closed
- Additionally: Open PlayStore from Work and Non-Work profile
- Long swipe edge for just work profile one and switch to own profile
instance: App is not killed (expected, we just killed work instance)
Change-Id: I82154a6c021527013269f7ee2d1c46fedc14bf7c
* Made unmodified instance variables final
* Made single use instance variables local
* Optimized imports
* Updated all deprecated code
Change-Id: Ifbf76031760c622e7efd667f82998adbb7d798f7
Because of some nested dependency breakage, we can no longer include
Android libraries in main SDK lib, therefore we are moving all
preference related code to a separate package that Settings/LineageParts
will depend on.
Change-Id: Iea379a580a08ea13f71e3503aa096ba0ed7e7cef
Making this change allows to determine
automatically the proper user ID depending on the
context used to create the resolver
Change-Id: I08021fa56856ef4792da780bca1c0e77526e72a6
There's no need to have our own settings for this when we can simply
override the existing AOSP ones.
Change-Id: I84e1f7286cd6b4ee68c62f17ad104c76031ee0ff
* This has been untouched since 2016 and it depends on LockClock
which has been dropped and was also untouched for years.
There is no good weather provider without API restrictions,
so just remove this dead code.
Change-Id: I6540006ce0d7339b7794b6ab207593afb161aa3d