Commit Graph

16733 Commits

Author SHA1 Message Date
Paul Crowley
f829c1463b Merge "Revert "Two phases to set the password for disk encryption"" into nyc-dev 2016-05-10 21:07:59 +00:00
Antonio Cansado
dc5f558640 Merge "Addressing API council comments on NetworkStatsManager." into nyc-dev 2016-05-10 20:58:33 +00:00
Paul Crowley
a1eb750e75 Revert "Two phases to set the password for disk encryption"
This reverts commit 17e5dce511.

Bug: 28694324
Change-Id: I6d89bc26cb429b195c9bcf640666c495617257b7
2016-05-10 20:36:56 +00:00
Amith Yamasani
0df1ca8ab3 Merge "Fix the issue that App crash on startForeground" into nyc-dev 2016-05-10 20:31:47 +00:00
Antonio Cansado
6965c1869a Addressing API council comments on NetworkStatsManager.
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
2016-05-10 13:24:16 -07:00
Paul Crowley
fcc38e6c35 Merge "Hide notification before tie managed profile lock" into nyc-dev 2016-05-10 20:12:41 +00:00
TreeHugger Robot
4b8ab89eca Merge "Don't even try adjusting when dock is minimized" into nyc-dev 2016-05-10 19:47:41 +00:00
Ricky Wai
8481258303 Hide notification before tie managed profile lock
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
2016-05-10 20:11:59 +01:00
Svetoslav Ganov
01da140ace Merge "Don't throw runtime exceptions for permission flags" into nyc-dev 2016-05-10 18:52:17 +00:00
Jorim Jaggi
1ae68bfd59 Don't even try adjusting when dock is minimized
Bug: 28652219
Change-Id: I61fa515ec945e1da6b9e7a53766abea2fb1e606e
2016-05-10 18:25:45 +00:00
Narayan Kamath
6795f0ba19 Merge "Use MetricsLogger.histogram for optimizing app statistics." into nyc-dev 2016-05-10 17:56:22 +00:00
Chong Zhang
0a872f0b12 Merge "Make sure preserved surface is removed when it's no longer needed" into nyc-dev 2016-05-10 17:53:27 +00:00
TreeHugger Robot
8eb290150c Merge "Fixed logic error when calculating window touch exclude region." into nyc-dev 2016-05-10 17:52:29 +00:00
Wale Ogunwale
e4dd964531 Fixed logic error when calculating window touch exclude region.
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
2016-05-10 08:39:01 -07:00
Svetoslav Ganov
7e01af4243 Don't throw runtime exceptions for permission flags
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
2016-05-10 15:34:36 +00:00
Ruben Brunk
aaabcce6d4 Merge "Set notification listener defaults for system VrListeners." into nyc-dev 2016-05-10 14:54:46 +00:00
Narayan Kamath
966210b721 Use MetricsLogger.histogram for optimizing app statistics.
bug: 28528058
bug: 28544474
Change-Id: Icbe26e9699eade08725e38914f07d7584e77b608
2016-05-10 15:53:29 +01:00
Narayan Kamath
3496fdbd2f Patrially revert 4ec026930b.
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
2016-05-10 14:26:46 +01:00
TreeHugger Robot
9b40edab61 Merge "Revert "Enable profile merging for post-OTA package verification"" into nyc-dev 2016-05-10 12:09:26 +00:00
Narayan Kamath
88eea9e580 Add a command to print package dexopt status.
Can be invoked like so :

$adb shell dumpsys package dexopt
$adb shell dumpsys package dexopt <packageName>

bug: 27494108
Change-Id: Ie91f744aeac772e0e22abc9c805df9290a4e2418
2016-05-10 08:51:56 +00:00
TreeHugger Robot
c26aabadc3 Merge "Remove replaced window if we aren't animating its exit." into nyc-dev 2016-05-10 03:31:33 +00:00
Chong Zhang
eb66557eeb Make sure preserved surface is removed when it's no longer needed
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
2016-05-09 19:26:52 -07:00
TreeHugger Robot
21bbc5a775 Merge "Fixed bug with pop-up window placement at the bottom in split-screen" into nyc-dev 2016-05-10 00:44:41 +00:00
Carlos Valdivia
c118e62076 Merge "[Security] Prevent malicious notifications from AMS." into nyc-dev 2016-05-10 00:25:47 +00:00
TreeHugger Robot
b3b7763d5d Merge "Fix package cleanup when parsed APK missing." into nyc-dev 2016-05-10 00:19:39 +00:00
Ruben Brunk
8820f943e0 Set notification listener defaults for system VrListeners.
- 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
2016-05-09 16:31:43 -07:00
Jeff Sharkey
aab8cbfa23 Fix package cleanup when parsed APK missing.
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
2016-05-09 16:51:11 -06:00
Winson Chung
e981777f0e Merge "Fixing regression in call to showRecents()." into nyc-dev 2016-05-09 21:36:57 +00:00
Paul Crowley
9aa6bb5a4a Merge "Two phases to set the password for disk encryption" into nyc-dev 2016-05-09 21:35:34 +00:00
Chong Zhang
a806e8ab12 Merge "Fix a flicker when opening app again quickly while it's exiting" into nyc-dev 2016-05-09 21:16:49 +00:00
Winson
14db362511 Fixing regression in call to showRecents().
- 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
2016-05-09 13:34:07 -07:00
TreeHugger Robot
ac29617c6e Merge changes I04301fbd,If6577602 into nyc-dev
* changes:
  Flesh out the docs for the android.os.health package.
  Properly blame the correct uid for wakeup alarms that don't have a WorkSource.
2016-05-09 20:05:13 +00:00
Chong Zhang
e22006d936 Fix a flicker when opening app again quickly while it's exiting
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
2016-05-09 11:25:45 -07:00
TreeHugger Robot
de5a7afc79 Merge "Don't include IME in app screenshot while in multi-window mode" into nyc-dev 2016-05-09 18:22:29 +00:00
Wale Ogunwale
d0a166a37d Remove replaced window if we aren't animating its exit.
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
2016-05-09 11:18:18 -07:00
Joe Onorato
78bcdf91ed Properly blame the correct uid for wakeup alarms that don't have a WorkSource.
It was setting the uid to -1, but BatteryStats should be tracking the actual uid.

Bug: 28637246
Change-Id: If6577602e3fe59a95b5cece4fc99e704ba43c03e
2016-05-09 10:32:30 -07:00
Calin Juravle
8412cf4daa Revert "Enable profile merging for post-OTA package verification"
This reverts commit 5da9dad2dd.

Bug: 28612421

Change-Id: Idbbb24241362a70b697ae2d648ea47996f5239c6
2016-05-09 17:56:18 +01:00
Richard Uhler
12f2984dbf Merge "Remove inconsistent 'cmd package compile' documentation." into nyc-dev 2016-05-09 15:48:47 +00:00
Bo Hu
d521a6d146 Merge "Ensure Netd Service is alive" into nyc-dev 2016-05-09 01:32:17 +00:00
bohu
07cc3bb040 Ensure Netd Service is alive
At least on android TV emulator system image, the Netd
service could be null when the setDnsConfigurationForNetwork
is invoked.

bug: 28553503
Change-Id: If059495c8573ede287c4e9d8f343318d519fca7f
2016-05-08 07:56:59 -07:00
Carlos Valdivia
06329e5fb2 [Security] Prevent malicious notifications from AMS.
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
2016-05-07 21:46:15 -07:00
Wale Ogunwale
a5434dd987 Don't include IME in app screenshot while in multi-window mode
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
2016-05-07 16:40:45 -07:00
Wale Ogunwale
7cd4b01af3 Fixed bug with pop-up window placement at the bottom in split-screen
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
2016-05-07 12:41:22 -07:00
TreeHugger Robot
dce92891df Merge "Fix minimized state messup" into nyc-dev 2016-05-06 23:58:28 +00:00
TreeHugger Robot
52b952a296 Merge "Reset transparent region when saving a surface" into nyc-dev 2016-05-06 23:42:34 +00:00
TreeHugger Robot
638a6e8140 Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev 2016-05-06 23:25:30 +00:00
Jorim Jaggi
817a52441f Fix minimized state messup
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
2016-05-06 15:45:00 -07:00
Andrii Kulian
a5aa3ecbe3 Merge "Fix onStop not called when activity is under translucent" into nyc-dev 2016-05-06 22:44:19 +00:00
Chris Craik
3131bdec70 Reset transparent region when saving a surface
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
2016-05-06 15:11:27 -07:00
Felipe Leme
d31a97fd83 Fixed connectivity state in some restricted network scenarios.
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
2016-05-06 14:53:50 -07:00