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
We should hide the notification asap before setting
managed profile lock, to reduce the time that user is unlocked
while the notification is still showing.
Bug: 28689675
Change-Id: I289302302e3079726998adefebe2e8b113b2e52a
Problem was introduced in ag/960365. We need to properly set the
temp variable to the current task bounds before trying to use it.
Bug: 26962445
Change-Id: I3cded03582e1379e16fa48f69da6ceadb92d8d4b
We were thrwing undocumented runtime exception when
one gets the permission flags - now we just return
default result of the package is gone.
bug:28657926
Change-Id: I42554a86b9304ff83fe9385f3eea930b8ebf0c63
In preparation for using MetricsLogger.histogram / count. The main
purpose of this change is to remove the (now bogus) action IDs
associated with this logging.
bug: 28528058
bug: 28544474
Change-Id: Id79de2d34c3f937a327ac21d44e55c18047bce85
Preserved surface might be used for format change as well as surface
size change outside a drag resizing. We currently remove the preserved
surface in prepareSurfaceLocked() after the window is shown, but
sometimes app gets stopped before any animation pass is run.
bug: 28546172
Change-Id: I7f883f4b5c6da4dce70f94173b368a912056d062
- For a package that has been enabled as a VrListenerService
and been preinstalled on the device's system image, enable
NotificationListenerServices by default for that package as
well.
- Use appops function instead of packagemanager for runtime
permissions.
Bug: 28614768
Change-Id: If88d47b666656a6e9567118626c1d9fa00280ec4
Recently the uninstall logic was changed to require a parsed APK to
succeed, but we need uninstall to succeed when the APK lives on an
ejected storage device.
To fix that case, create a fake parsed package with just enough
information for the delete to proceed.
Fix package movement bug that sent an invalid user ID to installd;
we need to explicitly ask for each user.
Bug: 28658206
Change-Id: Icf417661f07688c7523f0d082528adec2ac70cc6
- Previously, the call was made to showRecents() which took a single
boolean to determine alt-tab state, and after the refactoring, it
no longer made the same call.
Bug: 28663474
Change-Id: I75fb793e56c9a094a4372d7157dbd0dd7ecdbda7
If the app is waiting for an opening animation with a dummy placeholder,
we need to skip the surface placement (in addition to the animateLocked).
Also, when animating is changing from exiting to entering, the mAnimating
flag needs to be cleared until the new animation starts. This prevents the
surface placement to place it wrong before the new animaition starts.
bug: 28599295
bug: 27742244
Change-Id: I26f0ead80ee9993a6c766ae8686ab11d1729519c
Allow removal of replaced window if it isn't running an exit animation
and wasn't set to run an exit animation.
Bug: 28411852
Change-Id: I916d7c9461691bc58367d012113fefe9c6485127
At least on android TV emulator system image, the Netd
service could be null when the setDnsConfigurationForNetwork
is invoked.
bug: 28553503
Change-Id: If059495c8573ede287c4e9d8f343318d519fca7f
There was a hole in the getAuthToken logic that allowed notifications
resulting from getAuthToken requests using notifyOnAuthFailure=true to
launch arbitrary activites on the device. This is because the
getAuthToken session overrode onResult (unlike addAccount, updateCreds,
or confirmCreds).
Bug: 13787929
Change-Id: Ife1d48835f48416c2f0690f1413a076b69215190
We don't screenshot the IME in multi-window mode because the frame
of the IME might not overlap with that of the app. E.g. IME target
app at the top in split-screen mode and the IME at the bottom
overlapping with the bottom app.
Bug: 28446505
Change-Id: Iae4f7eafa582779a4cf2aba3d83c4d9f76a4ccca
WindowState.mInsetFrame is used to represent a temp. offset of a task
due to something like docked stack resizing or IME currently on screen.
In the case of pop-up windows (or any child window that wants to layout
in the parent frame) we were incorrectly setting the containing frame
because we were checking to see if the mInsetFrame wasn't empty. This
check isn't needed for child windows that want to layout in parent frame
because the parent frame will already have the mInsetFrame applied to
its frame which will automatically trickle down to the display and content
frame it forwards to its child windows to use.
Bug: 28389714
Change-Id: If89d40845a5a14aa60abcdedef2385b1fe7bfee3
We didn't dispatch the change, but still set the field. This lead to
issues where SysUI disagreed on the minimized state. To fix this, we
only check for state changes if the docked stack is visible, but then
dispatch the change always.
Bug: 28445644
Change-Id: Ie460135049c78e11c97f3160994ca4069bf82e6c
Fixes: 28432088
Ensure a transparent region on a saved surface is reset for future use,
since the surface should be like-new if used again.
This prevents an issue where the region - used to signal a portion of
content doesn't need to be composited - is persisted when a saved
surface is reused. The client assumes it's new and in default
state (composite everything), but the window is clipped when composited.
Change-Id: Icf2ec94c735679d715aded58de7eab12e9c43367
NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).
Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.
Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.
Another scenario that is not properly handled is when a UID whitelisted
for Data Saver is brought back to foreground: although the proper
firewall rules are set, CS is not notified, and the apps state would be
DISCONNECTED / BLOCKED.
This CL introduces many changes that fix this issue:
- Fixed updateRuleForRestrictBackgroundLocked() to invoke
onUidRulesChanged() when the Battery Saver status changed.
- Fixed updateRuleForRestrictBackgroundLocked() to invoke
onUidRulesChanged() when an app whitelisted for Data Saver is brought
back to the foreground.
- Added a new API (onRestrictPowerChanged() and getRestrictPower())
to notify external services about Battery Saver mode changes.
- Fixed CS logic to properly handle the Battery Saver changes.
Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; they can be verified running:
cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
BUG: 28521946
Change-Id: I8eaccd39968eb4b8c6b34f462fbc541e5daf55f1