Commit Graph

60129 Commits

Author SHA1 Message Date
Joe Onorato
9d7dda5a6e Merge "Fix a couple bad links in the javadoc for android.os.health." into nyc-dev am: 3b25fd081d am: bdff78d9ea
am: 64b2e26c4e

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

Change-Id: I4823359d436aab34b4f032b466b184dc34731146
2016-05-09 22:28:22 +00:00
Joe Onorato
64b2e26c4e Merge "Fix a couple bad links in the javadoc for android.os.health." into nyc-dev am: 3b25fd081d
am: bdff78d9ea

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

Change-Id: If90e8eb85bfd85e3f46c04de34f4d1f4db177673
2016-05-09 22:22:40 +00: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
Paul Crowley
ceb1d27132 Merge "Two phases to set the password for disk encryption" into nyc-dev am: 9aa6bb5a4a am: d365ddbd73
am: 5f0856afc3

* commit '5f0856afc3399e24bcdb3a862887bce5fab087f2':
  Two phases to set the password for disk encryption

Change-Id: I33698902b9eb6345ee8eef5deae043132d7eb80d
2016-05-09 22:05:25 +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
5f0856afc3 Merge "Two phases to set the password for disk encryption" into nyc-dev am: 9aa6bb5a4a
am: d365ddbd73

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

Change-Id: I11a856a217d8313925385e2b053afe2356a4646e
2016-05-09 21:55:25 +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
a1251bdd6a Merge changes I04301fbd,If6577602 into nyc-dev am: ac29617c6e am: 4240daca3a
am: adf2a6240d

* commit 'adf2a6240dd0a732ece6c8aa7733ad77ff838819':
  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: I489a00519a7484886f946c8d640dfa3fcb6bf3a7
2016-05-09 20:28:26 +00:00
Joe Onorato
adf2a6240d Merge changes I04301fbd,If6577602 into nyc-dev am: ac29617c6e
am: 4240daca3a

* commit '4240daca3afe78652d775bf5431beb9e10c531d3':
  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: I773937e0b0a5c1021e1c0716e06ec29f6f78a351
2016-05-09 20:22:40 +00: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
Joe Onorato
4240daca3a 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: I28bae3d984af6d19852fb63eda5fb21c1b6c98dd
2016-05-09 20:16:56 +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
Tyler Gunn
0e18a36111 Merge "Un-@hide multi-endpoint APIs." into nyc-mr1-dev am: b6029e3ba5
am: 824697c339

* commit '824697c33929648e4afec5db69dc85824b2888a4':
  Un-@hide multi-endpoint APIs.

Change-Id: Ib9b8c88fb7aa48031f247bf60deb3dc143ead81d
2016-05-09 18:23:02 +00:00
Tyler Gunn
824697c339 Merge "Un-@hide multi-endpoint APIs." into nyc-mr1-dev
am: b6029e3ba5

* commit 'b6029e3ba54a73bd95ef63caa337e00b8951e024':
  Un-@hide multi-endpoint APIs.

Change-Id: I9f8e5f933b12b523a81c40e8ff5ac4b8b972228f
2016-05-09 18:18:55 +00:00
Tyler Gunn
b6029e3ba5 Merge "Un-@hide multi-endpoint APIs." into nyc-mr1-dev 2016-05-09 18:12:45 +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
48fd9ed7d7 Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev am: d8c38b892b am: 3f9d17fbe1
am: 93b15870d5

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

Change-Id: Ic72675504ac72cd1b19ec8049fd56b3f54401b72
2016-05-09 14:22:20 +00:00
Alan Viverette
93b15870d5 Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev am: d8c38b892b
am: 3f9d17fbe1

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

Change-Id: I6834b9dfdde724dab3fe69a1467338f7c100ea99
2016-05-09 14:18:06 +00: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
784aa1498f 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: I20684e1e974e1d5f8f6987ca9eac17d3da470763
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
22d3b8586c Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev am: 638a6e8140 am: 87d20317bf
am: 9f144cb395

* commit '9f144cb3952c6367d113c8f77cc01394bd3751c0':
  Fixed connectivity state in some restricted network scenarios.

Change-Id: I1bc51c4a06dad9245ce0ed884707855b2c04edf1
2016-05-06 23:48:47 +00:00
Felipe Leme
9f144cb395 Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev am: 638a6e8140
am: 87d20317bf

* commit '87d20317bf26e87ef58798d3c5aafb81aa163788':
  Fixed connectivity state in some restricted network scenarios.

Change-Id: Ifeb332fbf00c554b78d0ad724b34e3a8ebfc9894
2016-05-06 23:43:55 +00:00
Felipe Leme
87d20317bf 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: I5d3fdbbff6d92be9657d3ed466462ca911d20881
2016-05-06 23:39:09 +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
Svetoslav Ganov
c5edb1f7cf Merge "Properly map runtime permissions to app ops" into nyc-dev am: ba83e90e18 am: 9c67138250
am: 01e9b7eb7e

* commit '01e9b7eb7ecaade7b1b9635548aba4bbdfb1f5f4':
  Properly map runtime permissions to app ops

Change-Id: I12c96c47e674062ae678e69c5d1a44ca3fcb8009
2016-05-06 23:29:50 +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
01e9b7eb7e Merge "Properly map runtime permissions to app ops" into nyc-dev am: ba83e90e18
am: 9c67138250

* commit '9c67138250bf7803b2af0687ff9bc24300e64d5b':
  Properly map runtime permissions to app ops

Change-Id: Ia2e95c77abd18890cd1fe26d37fd70d3fc36d748
2016-05-06 23:23:14 +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
9c67138250 Merge "Properly map runtime permissions to app ops" into nyc-dev
am: ba83e90e18

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

Change-Id: Ie4830b140c2589abecbe8e6f575ab939d9c988ce
2016-05-06 23:17:52 +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
850ce012e7 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev am: de66540fd3 am: 443c032e52
am: fd1ace40ec

* commit 'fd1ace40eccc468b5e5d33c29693bf66e1761d39':
  Refactored NetworkPolicyManagerService mUidRules.

Change-Id: I0b348dc47666d563d368d82aa9633dcfe56992a0
2016-05-06 22:03:18 +00:00
Felipe Leme
fd1ace40ec Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev am: de66540fd3
am: 443c032e52

* commit '443c032e52713f2a6eec6a82b6be5b3311d00e6e':
  Refactored NetworkPolicyManagerService mUidRules.

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

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

Change-Id: I50b6ca257b7995d6a50fe938f8d4c788f739001a
2016-05-06 21:53:58 +00:00
Felipe Leme
0da215640f Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev
am: de66540fd3

* commit 'de66540fd3f73937c3cfbe1d50e575aa69acc474':
  Refactored NetworkPolicyManagerService mUidRules.

Change-Id: I89af2823e8d791a487917daafe16be6764c231b2
2016-05-06 21:53:54 +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
Chris Tate
ad2b44c8c7 Merge "Move the \'pretend idle jobs can run now\' broadcast into AMS" into nyc-dev am: 0588954071
am: 2591ee2b0b

* commit '2591ee2b0be76f2f592716cd04f7c3629f13b591':
  Move the 'pretend idle jobs can run now' broadcast into AMS

Change-Id: Iaea15199390098250e7fdd171a9bb83ec1325887
2016-05-06 21:47:51 +00:00
Christopher Tate
110e2e8768 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: Ia97d382761fc8b9f2c11729cd027a2d8c6c9379b
2016-05-06 21:42:47 +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
39c9de11ba Merge "Merge "Fix divergent equals and hashCode behavior" into nyc-dev am: 2ff5780d90 am: 08f11bd631" into nyc-mr1-dev-plus-aosp
am: 947cfbda74

* commit '947cfbda74a70c601f8ed0991598e325d185dfa7':
  Fix divergent equals and hashCode behavior

Change-Id: Ia7bd09b91752f4c23cb052e6f066b7e2de0eca9c
2016-05-06 21:18:35 +00:00
Pavlin Radoslavov
7a0b867cd4 Merge "Fix divergent equals and hashCode behavior" into nyc-dev am: 2ff5780d90
am: 08f11bd631

* commit '08f11bd631cfaff7fa5f22782a579c2fdee5d692':
  Fix divergent equals and hashCode behavior

Change-Id: I350cb15ce8e09192289c68c88c6027aab5c0b89d
2016-05-06 21:13:27 +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
08f11bd631 Merge "Fix divergent equals and hashCode behavior" into nyc-dev
am: 2ff5780d90

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

Change-Id: I16809877a43fa3b3c70273de2a84a90e493d9caf
2016-05-06 21:08:14 +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