Commit Graph

64532 Commits

Author SHA1 Message Date
Antonio Cansado
7598ac2aa7 Merge "Addressing API council comments on NetworkStatsManager." into nyc-dev
am: dc5f558640

* commit 'dc5f558640da8785fabc274167ec37a0fda30cd6':
  Addressing API council comments on NetworkStatsManager.

Change-Id: I952e69e7cfbd8cebcbac7c3b19ede300e26777e8
2016-05-10 21:05:17 +00:00
Phil Weaver
905c159749 Merge "Reduce cost of a11y services with magnification." into nyc-dev
am: cdaaaaad90

* commit 'cdaaaaad905396e4f0f2ebd9b37240095182d1d7':
  Reduce cost of a11y services with magnification.

Change-Id: Ib93769bbbce508d0eae77cd830d361e5e686de47
2016-05-10 20:25:31 +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
Phil Weaver
cdaaaaad90 Merge "Reduce cost of a11y services with magnification." into nyc-dev 2016-05-10 20:18:12 +00:00
Andreas Gampe
ddaeb30d5b Merge "Frameworks/base: Shorten system property" into nyc-dev
am: a8f51e3e46

* commit 'a8f51e3e46c705b0477bf20a8e417ab57e09afee':
  Frameworks/base: Shorten system property

Change-Id: I9e90c9ed260cd74f1585d5851c65a6c78f245daf
2016-05-10 20:02:44 +00:00
Andreas Gampe
a8f51e3e46 Merge "Frameworks/base: Shorten system property" into nyc-dev 2016-05-10 19:55:43 +00:00
Andreas Gampe
eff0639345 Frameworks/base: Shorten system property
Otherwise it's too long.

Bug: 26877591
Change-Id: I741186a9fbea6ee50df6cef58d528ec58662c772
2016-05-10 12:52:53 -07:00
Dimitry Ivanov
22c0dcc253 Merge "Simplify permitted-path construction" into nyc-dev
am: 6e2b3d158a

* commit '6e2b3d158a333b8754854314af0fc865a1f8bc5e':
  Simplify permitted-path construction

Change-Id: Ib3c67e6fd52ea847a194dfd3737c9cf2c75e17b7
2016-05-10 19:25:33 +00:00
Dimitry Ivanov
eb96b00382 Simplify permitted-path construction
The white list of permitted directories is applied for every
classloader namespace by libnativeloader. LoadedApk no longer
needs to do that.

Add mDataDir to permitted paths in the case if for any reason
it is outside of the whitelisted dirs.

Bug: http://b/28639227
Change-Id: I5b61ac64e281ecee3e3e9b1fe56cf04dc6ee7b25
2016-05-10 10:51:40 -07:00
Andreas Gampe
2f67d686eb Merge "Frameworks/base: Make profile buffer adjustable" into nyc-dev
am: a2723ca88c

* commit 'a2723ca88c630f62ac413e562fe335b5fc623f1c':
  Frameworks/base: Make profile buffer adjustable

Change-Id: Ica4a50834a2b1da2644e85d28ee1e7196c3feb2b
2016-05-10 04:30:22 +00:00
Andreas Gampe
a2723ca88c Merge "Frameworks/base: Make profile buffer adjustable" into nyc-dev 2016-05-10 04:15:13 +00:00
Andreas Gampe
0f03a01ca3 Frameworks/base: Make profile buffer adjustable
Add a debug system property to change the profile buffer size.

Bug: 26877591
Change-Id: Idd13f2bc6563fd88daadd1d6679f3243dab1a0ef
2016-05-09 21:05:12 -07:00
Phil Weaver
2fbdd48682 Reduce cost of a11y services with magnification.
Services that declare that they can control magnification,
but never actually make a change or register a listener
waste cycles as we compute magnification data they never use.

Avoid registering for magnification callbacks unless magnification
gestures are enabled, a service is listening for magnification
changes, or a service has changed magnification.

Bug: 28425922
Change-Id: I114a833669bd53b2cd757c94ea52b65a2f838a08
2016-05-09 16:21:29 -07:00
Joe Onorato
bdff78d9ea Merge "Fix a couple bad links in the javadoc for android.os.health." into nyc-dev
am: 3b25fd081d

* commit '3b25fd081d6af21b16ab4b96ead70766b3d78d06':
  Fix a couple bad links in the javadoc for android.os.health.

Change-Id: Iec6ad93e7445df5d642aba24867c264c435c53ba
2016-05-09 22:17:10 +00:00
TreeHugger Robot
3b25fd081d Merge "Fix a couple bad links in the javadoc for android.os.health." into nyc-dev 2016-05-09 22:03:05 +00:00
Paul Crowley
d365ddbd73 Merge "Two phases to set the password for disk encryption" into nyc-dev
am: 9aa6bb5a4a

* commit '9aa6bb5a4a8bd00a175e8a9c338b52bc24a162b4':
  Two phases to set the password for disk encryption

Change-Id: Ic8102ebd218f387236aa5ef013ccdf4bc8f58ce1
2016-05-09 21:50:20 +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
Joe Onorato
168638c594 Fix a couple bad links in the javadoc for android.os.health.
Bug: 28295754
Change-Id: I3b21e204bec626e4d1c6fb8f07580c2854e364eb
2016-05-09 13:32:32 -07:00
Joe Onorato
8b552ed03c Merge changes I04301fbd,If6577602 into nyc-dev
am: ac29617c6e

* commit 'ac29617c6e11085c9648d150a50c5daa15d65645':
  Flesh out the docs for the android.os.health package.
  Properly blame the correct uid for wakeup alarms that don't have a WorkSource.

Change-Id: If9d0461325336f6c5cb6faca34bac17c8ef6a35e
2016-05-09 20:17:06 +00: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
Joe Onorato
181cada18a Flesh out the docs for the android.os.health package.
Bug: 28295754
Change-Id: I04301fbdbfb0708172adb4fd4b4a3658d5ea14eb
2016-05-09 10:32:31 -07:00
Alan Viverette
3f9d17fbe1 Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev
am: d8c38b892b

* commit 'd8c38b892b86cc9cb94633b6f9d74126e2d53c60':
  Cancel animation and jump to current state if not animating picker

Change-Id: Icdc36f4f5133b16a1b15d7cf58d1e0ef21fe9b7e
2016-05-09 14:14:33 +00:00
Alan Viverette
d8c38b892b Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev 2016-05-09 14:06:29 +00:00
Felipe Leme
9a48ee1b3e Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev
am: 638a6e8140

* commit '638a6e8140a22a0ddb5d5dacb02173795073bd1a':
  Fixed connectivity state in some restricted network scenarios.

Change-Id: I0fd66b16c83680940f294ea8e117443ffd8a50cd
2016-05-06 23:38:59 +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
Svetoslav Ganov
d0e3d18b7f Merge "Properly map runtime permissions to app ops" into nyc-dev
am: ba83e90e18

* commit 'ba83e90e1825f3e40a16370babc83b8ac0645cf9':
  Properly map runtime permissions to app ops

Change-Id: Ied52aa9c152429092f3c9f3e93b79b5e58c27cac
2016-05-06 23:17:53 +00:00
Svetoslav Ganov
ba83e90e18 Merge "Properly map runtime permissions to app ops" into nyc-dev 2016-05-06 23:08:31 +00: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
Felipe Leme
443c032e52 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev
am: de66540fd3

* commit 'de66540fd3f73937c3cfbe1d50e575aa69acc474':
  Refactored NetworkPolicyManagerService mUidRules.

Change-Id: I25d2520eafcf8c45b80b94908a3b5bfa04315f76
2016-05-06 21:53:39 +00:00
Christopher Tate
2591ee2b0b Merge "Move the \'pretend idle jobs can run now\' broadcast into AMS" into nyc-dev
am: 0588954071

* commit '058895407140de0e513b82150c3acb6131e971a2':
  Move the 'pretend idle jobs can run now' broadcast into AMS

Change-Id: Id8bd50f0a5f6d46cf60dea690803081515cb21c3
2016-05-06 21:42:47 +00:00
TreeHugger Robot
de66540fd3 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev 2016-05-06 21:41:41 +00:00
Chris Tate
0588954071 Merge "Move the 'pretend idle jobs can run now' broadcast into AMS" into nyc-dev 2016-05-06 21:34:52 +00:00
Pavlin Radoslavov
3600d1f06f Merge "Fix divergent equals and hashCode behavior" into nyc-dev
am: 2ff5780d90

* commit '2ff5780d903bb052fd9349b742d4d754f049202c':
  Fix divergent equals and hashCode behavior

Change-Id: Iac35b033432a9441c3a72b8f7430f15238e1e8fb
2016-05-06 21:08:17 +00:00
Pavlin Radoslavov
2f463d4c8b Fix divergent equals and hashCode behavior
Calling Objects.hash with a byte[] will call the identity hashCode on
the byte[] and this doesn't agree with the use of Objects.deepEquals
in equals.
Bug caught by error prone.

Also, replaced usage of Objects.deepEquals(mServiceDataUuid, ...) with
Objects.equals(mServiceDataUuid, ...), because mServiceDataUuid
is an Object of type ParcelUuid.

Bug: 28585195
Change-Id: Id92734874339985fedafe1a28286a6a4dcd88d3b
2016-05-06 12:45:43 -07:00
Alan Viverette
32f7dab282 Cancel animation and jump to current state if not animating picker
Bug: 28629631
Change-Id: I0e1b3c2f2c774e027f2df8c9ab75c7a89bd2ddb7
2016-05-06 15:31:23 -04:00
Wale Ogunwale
d9125edb98 Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev
am: 5d6a218d9e

* commit '5d6a218d9e0d21367f6365d4de51532ca7e14dc9':
  Dismiss docked stack if an activity is shown on top of the lock screen

Change-Id: I4bf1ef48aef928e12d7dbb9faa6c4e0d489acadb
2016-05-06 18:42:09 +00:00
TreeHugger Robot
5d6a218d9e Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev 2016-05-06 18:30:23 +00:00
Phil Weaver
709fb89a9d Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev
am: b42afe9be0

* commit 'b42afe9be02b23c50c0479e93df2a853be7c369a':
  Make AccessibilityService#disableSelf atomic.

Change-Id: I0c401dfbe7080535595e1c4b6b2365f17fab6dd9
2016-05-06 18:26:22 +00:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Paul Crowley
17e5dce511 Two phases to set the password for disk encryption
In one phase, we make the new password work, and in the second we make
it the only one which works ("fixation"). This means that we can set
the password in Gatekeeper between these two phases, and a crash
doesn't break things. Unlocking a user automatically fixates the
presented credential.

Bug: 28154455
Change-Id: I18812f9ce753486ce4e33b4fe2cca392b006b39c
2016-05-06 11:10:23 -07:00
Chris Thornton
b6dba40c9e Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev
am: 0f6a7abb83

* commit '0f6a7abb83687e8f800e7754cf585edca725d83e':
  Fix NPE in KeyphraseEnrollmentInfo.toString()

Change-Id: Id6e61a0ef2d51317a749526d132a6c9fb96899fa
2016-05-06 18:10:23 +00:00
Phil Weaver
b42afe9be0 Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev 2016-05-06 18:08:29 +00:00
Chris Thornton
0f6a7abb83 Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev 2016-05-06 18:04:20 +00:00
Felipe Leme
46c4fc357c Refactored NetworkPolicyManagerService mUidRules.
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.

This change refactores the mUidRules to use bitmasks, in preparation for
another change that will fix the issue.

It also fixes a minor bug that was preventing removed packages to be
removed from the whitelist.

BUG: 28521946
Change-Id: I9f0e1509a6192cad403f740c1cd76a6b7dab7d26
2016-05-06 17:58:40 +00:00
Hans Boehm
1a72cf2e4f Merge "Improve grammar in startService() documentation." am: e3a25ad692
am: cc9c83dbd4

* commit 'cc9c83dbd4123cf4677cd351fd0b96d9d04ffbee':
  Improve grammar in startService() documentation.

Change-Id: I7a7296839c0b9ec89002dead994cc346e1969567
2016-05-06 17:41:18 +00:00
Hans Boehm
cc9c83dbd4 Merge "Improve grammar in startService() documentation."
am: e3a25ad692

* commit 'e3a25ad692cf88455222522542fe374a41024ccf':
  Improve grammar in startService() documentation.

Change-Id: Iaa95eb5d01d45b8352f1eeb0a7f1519b1958ddd4
2016-05-06 17:36:11 +00:00
Wale Ogunwale
9973294080 Dismiss docked stack if an activity is shown on top of the lock screen
It is risky/complicated to try to put the activity showing on-top of
the lock screen in the right fullscreen configuration with the current
architecture. So, we just dismiss for now.

Bug: 28195260
Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
2016-05-06 10:13:14 -07:00
Phil Weaver
19557de767 Make AccessibilityService#disableSelf atomic.
This API was using a oneway aidl call, which meant that the
service was disabled some time after the method returned. That
confused tests that were turning a service off during tearDown
and then turning it back on again in setUp.

Bug: 28621277

Change-Id: I75984df0613bdbb1bc876e2a15caf59106027337
2016-05-06 08:57:12 -07:00
Ricky Wai
de1e4a1048 Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev
am: 13532bdd2e

* commit '13532bdd2ea63c1b8a5a8d4f95346f3d1e7ecbb5':
  Fix enterprise contacts APIs naming and docs

Change-Id: I22bd5f8f3d71ae19a2fcac139531243f2546033e
2016-05-06 12:19:00 +00:00
Tony Mak
13532bdd2e Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev 2016-05-06 12:06:29 +00:00