A malformed RA could cause the Ra constructor in ApfFilter to
enter an infinite loop while holding the class lock. This blocks
IpManager until reboot and drains the battery.
Bug: 29586253
Change-Id: Idaa46b3bc50371db076630881883807c2fa21674
currently with one data point the estimator is biased high. If we don't
have any data we want to be biased low to allow the first interaction
to be an isolated burst.
Also add metrics for enqueue rate to make it easier to debug this
code in the future (currently we only have metrics after the
rate limiter).
Bug: 29379789
Change-Id: I7b1d379290a55f120d039fd29d1bc0abbc6d4932
A package can be uninstalled for the system user but still be installed
on the device. Currently, we do not use such a package as WebView
implementation which means we fall back to using the fallback WebView
package.
However, if the fallback package is not valid (because it needs to be
updated first) loading WebView will fail.
With this change we fetch allow the fetching of information from
packages that are uninstalled for the system user so that we can still
load WebView when the only valid WebView provider is uninstalled for the
system user.
Also listen to package additions/changes/removals for all users -
otherwise we won't notice when a package becomes replaced if it was
already uninstalled for the system user.
Bug: 29321185
Change-Id: Ia23c4493844877aea1b4eab7e666fd37540c4f97
IPv4 broadcast packets can be very common (e.g. every 2s) so they
need to be dropped in the general case. They also may be critical
for certain discovery protocols, so allow them through with APF
when the WiFi multicast lock is held.
Bug: 26238573
Change-Id: I03e09a2b9c779da5da775e78b95e9e0339720eaf
When app tries to post its first notification,
value of now is equal to that of mLastEventTime.
And hence getRate return a very large number.
Bug: 28902358
Change-Id: If5b5b3c46e2bb80a9b40988ba7f7d777e40cc8e7
For now this just drops all non-ICMPv6 packets to ff00::/8 when
mMulticastFilter is true. Multicast ICMPv6 is already mostly
dealt with by other filters - the L2 multicast filter, the RA
filter, the multicast NA filter, and ND offload.
Bug: 28393601
Change-Id: Ia7b0d4f00fac6710093befe6a726b46677a5f20b
This is distinct from and in addition to the limit on the number of
distinct notifications. This includes many updates to a single
notification.
Bug: 28693065
Change-Id: I5ec0911716cace91d3ad85435a5c6123b290b3a2
By changing some member refs into arguments and having one of the
functions create the UID range instead of adding to mVpnUsers.
This will be useful for other layers of UID filtering like having
UIDs explicitly blocked from the VPN.
Deleted one broken line of code that cleared the status intent when
a restricted profile is removed. Other than that, this commit shouldn't
change any behaviour. If it does, that's a bug.
Bug: 26694104
Change-Id: Ieb656835d3282a8ba63cc3f12a80bfae166bcf44
Callbacks
- DataUsageCallback renamed to UsageCallback
- DataUsagePolicy removed; passing in params directly to register method
- making it an abstract class
- passing in (networkType, subscriberId) that reached its threshold
- renaming onLimitReached to onThresholdReached to match existing naming
- only monitor single network,subscriberId
- no monitoring of specific uids; using device or user wide instead
Tags
- only owner uid can read its tags
- exposing only TAG_NONE to match service side
BUG: 27530098
Change-Id: I2b2664da71806868a1e937d2bf4d1f234637509b
- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
Because the reset must happen before any other apps have a chance to
publish shortcuts, the logic is not straightforward.
- Added an internal API to reset the throttling upon inline-reply
from a notification.
- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.
Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content. Outer code should use forAllPackages() / forAllLaunchers().
Bug 27923857
Change-Id: I002511193d1d33718163bb1dabe77610bde58198
Added testRemovedAccountSync, which removes account when the user is locked,
and verifies that syncDeCeAccountsLocked works as expected.
Added testPreNDatabaseMigration to test that pre-N database with existing
data is properly upgraded and migrated.
Bug: 26279712
Change-Id: I3846c626f616b1c4830965c9f0cb27fa32ce6f54
Before this CL when we tried to change WebView provider through the Dev
setting and failed we would then have the setting point to the provider
used before the change. With this CL we instead let the setting point to
the intended target but also switch to the package which the
WebViewUpdateService see as most fit (rather than just reverting back to
the original choice).
Add unit tests to verify we kill processes depending on WebView
packages when switching WebView provider.
Add unit tests to ensure we can recover from trying to change provider
when there are no providers available.
Bug: 27673076
Bug: 27635535
Change-Id: Ie7bb6afdf8acf4344cfb363947929c0b492775fb
To ensure that we don't permanently change WebView implementation if the
current package is temporarily uninstalled (e.g. when being replaced) we
don't update our persistent setting unless the user explicitly changes
WebView implementation (and on boot!).
Unfortunately this will means that the Dev Setting for changing WebView
implementation will work in a slightly less intuitive way. The
persistent setting is now persistent across uninstalls and installs.
I.e. the Dev Setting shows the current WebView implementation though
that could differ to the value chosen by the user since the package
chosen by the user could be uninstalled or disabled. In this case
installing/enabling that package would again make the Dev Setting point
to it.
However, as a compromise, we do change the setting at boot so that if
the currently chosen package is not valid we will change the setting so
that it points to the package we currently use instead.
Also ensure we only use WebView packages that are available-by-default
if no WebView packages are enabled.
Add unit test to ensure that if a user-chosen provider is uninstalled we
switch back to using that provider when it is installed again.
Add unit test to ensure we switch user-chosen provider at boot if the
chosen one is uninstalled.
Bug: 27673076
Change-Id: Icd27ae302798ebf695b9ef4bd4d5fd47fe4be02c
- "delete" -> "remove"
- add/deleteDynamicShortcut() now takes a list.
- Throttling default settings is now 2 calls / hour.
- Add categories to ShortcutInfo.
- getIconResourceId() is now public
Bug 27923857
Bug 27548047
Change-Id: I8457b30e4b2f7c63ab2988648b37178fd16ea45b
The logic in the WebViewUpdateService is now more complex and there
are lots of edge cases that should be tested to make sure we don't
regress anything.
Also refrain from running fallback logic on boot if fallback logic not
enabled (bug found through a failing test, yeeah buddy!).
Catch uncaught MissingWebViewException (very timing-dependent!) and add
test for this.
Add tests for:
Some package setups (single package, non-default vs. default packages,
valid vs. invalid packages).
Ensure correct error codes used
Switching provider through settings-method
Switching provider through adding more prioritized provider
Switching provider in the middle of already running webview preparation
Ensure fallback logic is run when enabled and not run when disabled (at
boot, packageStateChanged, and when adding a new user).
Bug: 27635535
Change-Id: I275ecb0f6129f71258da0fa053e7f7b36a675886
Transport may use the redirect to make additional determination about network
state.
Bug: 25203607
Change-Id: I07d8918f13fdcbe0b6fd757536bfc1850a2a244f
It was broken for quite a while. Introduced the following changes:
- Use mockito to mock AppOpsManager and UserManager
- Use MockContext directly and override what is necessary.
RenamingDelegatingContext doesn't work with absolute file names for
database paths, which is the case for system server DBs.
Bug: 26279712
Change-Id: I9f2a3892f9bd7a882d78f0bb7beb8669f7dc8c6f