Commit Graph

65946 Commits

Author SHA1 Message Date
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
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
Siyamed Sinir
54616bd01b Merge "Request re-layout after setText if layout width is 0" 2016-05-06 19:18:06 +00:00
Wale Ogunwale
e87b575046 Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev am: 5d6a218d9e am: d9125edb98
am: 94d93dd38f

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

Change-Id: Iaaf1dc4cd6f4008bf4bc571bb70365d431ea30ed
2016-05-06 18:54:56 +00:00
Wale Ogunwale
94d93dd38f Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev am: 5d6a218d9e
am: d9125edb98

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

Change-Id: I0b0130142296468e43fdb106d214f43a8fc500e5
2016-05-06 18:47:17 +00: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
Wale Ogunwale
3b030934f3 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: Ia5f98128501fcf648da94d6393f799d83ca89656
2016-05-06 18:42:07 +00:00
Phil Weaver
feb225dbd7 Merge "Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev am: b42afe9be0 am: 709fb89a9d" into nyc-mr1-dev-plus-aosp
am: 5f215a2a4d

* commit '5f215a2a4dcc85e885dd844c63da493c9a3e83c1':
  Make AccessibilityService#disableSelf atomic.

Change-Id: Iddf073e9131c97493a0193ce8d9f04a1a229452f
2016-05-06 18:37:06 +00:00
Phil Weaver
16cd21cc6d Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev am: b42afe9be0
am: 709fb89a9d

* commit '709fb89a9d1ebd2c17f06bee621ed9316e484878':
  Make AccessibilityService#disableSelf atomic.

Change-Id: I26c6568b6bfd3097d244b74139256a9e89fe4793
2016-05-06 18:31:59 +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
Phil Weaver
8f6e8c43cb Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev
am: b42afe9be0

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

Change-Id: I90fc019bb38c2b8c5b71357bce60c8df298bddcc
2016-05-06 18:26:21 +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
Chris Thornton
94869bfae6 Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev am: 0f6a7abb83 am: 6e3449b33f
am: 6f2bd8f029

* commit '6f2bd8f0296a2ba075394847f5e62083a641cdef':
  Fix NPE in KeyphraseEnrollmentInfo.toString()

Change-Id: If42bd0ca41d745136f986dcdd29560766a72af84
2016-05-06 18:20:14 +00:00
Chris Thornton
6f2bd8f029 Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev am: 0f6a7abb83
am: 6e3449b33f

* commit '6e3449b33fd081a1e920c8e66797e280e78de66b':
  Fix NPE in KeyphraseEnrollmentInfo.toString()

Change-Id: Ic891770dba103e5e847441b346a4606341203992
2016-05-06 18:15:35 +00:00
Chris Thornton
6e3449b33f Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev
am: 0f6a7abb83

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

Change-Id: Ieeb8c8eeac89a68ffcbcaf31b7f6d2b8c60dea7d
2016-05-06 18:10:28 +00: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
d89abcf16d Merge "Improve grammar in startService() documentation." am: e3a25ad692 am: cc9c83dbd4 am: 1a72cf2e4f
am: 3bc625a30a

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

Change-Id: Id179761ee138cecf7245788735dd3a3e063f9bc0
2016-05-06 17:51:43 +00:00