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
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
Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.
A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.
Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
Added not_metered capability to a mobile network if none
of its associated APN types are metered. Also used not_metered
capability to determine if a network should be accounted for
data usage or not instead of using network type, which is
always MOBILE after refactoring. Will add VT usage support
in next phase.
bug: 20888836
Change-Id: Id692cb856be9a47d0e918371112630128965b1bb
Callers with CONNECTIVITY_INTERNAL permission can read off the netId
that an application is assigned to by default.
Necessary for making connections as the default network for a client
app eg. when downloading stuff on its behalf.
Bug: 27074270
Change-Id: I8d35e8e99126875f55f3c545090326f3e9be43fb
...for monitoring content providers
- Improve media provider change reporting so that observers can
avoid spurious reports of the top-level content directory changing.
- Fix a bug where collected content changes while a job was running
were not being properly propagated to the next job.
Change-Id: I29e3c2960e6fec75b16ee3ee6588d47342bf8c75
Also:
- Fix cross profile pinning. Now ShortcutLauncher correctly keeps
track of target package user IDs.
- Add performance stats for package manager calls and show them on
dumpsys.
Bug 27548047
Change-Id: I2472980b2955b6c70947aaaa9b76f75d0616db6e
Also add some tests to the notification manager service
to make the refactor more palatable.
Bug: 27742532
Change-Id: I745915299aa2b92ab077e0c801d47864cb562325
Note:
DevicePolicyManagerService is changed to inject ContentObserver notifier
Test: all test cases in DevicePolicyManagerTest pass
BUG: 25710621
Change-Id: I347cec71769d0e9dd6a334d7d6339d5ce6a3fa6a
- Pinned shortcuts need to know not only which package
has pinned them, but also on which user's, due to work profile.
- Launcher can always launch shortcuts that it has pinned.
Bug 27548047
Change-Id: I23b4e7dfbb6ecc42099d31008bcfd61d44e2c7fb
- Do a cleanup when an app is gone.
- Record the app version and signatures.
- Also make saveToXml() capable of saving for backup.
Bug 27548047
Change-Id: I7eb2bbec7665b4d625630e7312c0f2a8b03c5ffa
Netd provides 2 bandwidth control rules to restrict which uids can use
metered networks:
- bw_penalty_box is a blacklist-based firewall chain used to determine
which uids do not have access to metered interfaces.
- bw_happy_box is whitelist-based firewall chain used to determine which
uids have access to metered interfaces.
Currently, both NetworkManagerService (NMS) and
NetworkPolicyManagerService (NPMS) uses just the bw_penalty_box rule,
which makes turning Data Saver mode on / off too slow (since NPMS needs
to build the bw_penalty_box on demand); this CL adds support for both
rules on NMS, although NPMS doesn't take advantage of it yet (it will be
refactored in a separate CL).
BUG: 27127112
BUG: 26685616
Change-Id: Ib954574f7c86269fc9b4cf8ce4ba72ba5878c23d
Added a simple unit test which checks the methods used to save and load the set
of taskids to file. The test creates a user, adds some task ids to the
set of taskids for that user, saves it and loads it to see whether the
set loaded is the same as the one that was saved.
Change-Id: If92be8abf9a7e3ef90630a3786867f0e1ba12f3e
Occasionally, ConnectivityServiceTest fails with "BUG: only one
idle handler allowed". I have not been able to reproduce this
consistently, but code inspection reveals an unsafe access to
mIdleHandler inside queueIdle. Wrap that in a synchronized block.
Change-Id: I27307e2e55fa8d937d7f043bd436894091c3c667
Each launcher can have its won set of pinned shortcuts.
- Shortcuts pinned by others should look like not pined to this
launcher. This affects how ShortcutQueryFLAG_GET_PINNED works,
as well as what ShortcutInfo.isPinned() returns.
- When pinning a shortcut, it should be a visible one to itself --
a non-dynamic shortcut that's pinned by another launcher but
not by the caller is not visible, so this launcher cannot pin it
either.
- Also clean up the dynamic shortcut adding.
Bug 27548047
Change-Id: Ia478a2ea19b7d35557ec6ea42384c79a84d6b8de