Commit Graph

58871 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
3bc625a30a Merge "Improve grammar in startService() documentation." am: e3a25ad692 am: cc9c83dbd4
am: 1a72cf2e4f

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

Change-Id: Ifd50bd9f2b8c83e657bc6df419e70b30532649d0
2016-05-06 17:47:23 +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
Tony Mak
a31f37dc1c Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev am: 13532bdd2e
am: ecab71c9f7

* commit 'ecab71c9f77cb0386a1be1c78e73bedf2524a536':
  Fix enterprise contacts APIs naming and docs

Change-Id: Idad8e3ee643ba955951a58185f4a8640579db206
2016-05-06 12:23:58 +00: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
Ricky Wai
ecab71c9f7 Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev
am: 13532bdd2e

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

Change-Id: I2305b72e0e3a1d5625d9016ffefed16fd7493c3e
2016-05-06 12:18:58 +00:00
Tony Mak
13532bdd2e Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev 2016-05-06 12:06:29 +00:00
Svetoslav Ganov
eaca4c5022 Properly map runtime permissions to app ops
The code assumed mapping from a permission to an app op
is one to one but this is not always the case. For example,
READ_SMS is mapped to OP_READ_SMS and OP_READ_ICC_SMS which
resulted mapping the READ_SMS permission to the OP_READ_ICC_SMS
instead of OP_READ_SMS resulting in a failure to find the op
name given the permission.

This breaks the AppOpsManager.permissionToOp() API for READ_SMS
returning null instead of OPST_READ_SMS. The consequence of this
is that the apps that proxy permission protected operations may
let the operations for READ_SMS go through as they would get a
null app op, i.e. no app op while there is one and it can be
disabled for the caller.

bug:28620132

Change-Id: I92f8ef375ae2122b7266c50653ce73f3d90f4b28
2016-05-05 18:21:09 -07:00
Chris Thornton
d9729d1df8 Fix NPE in KeyphraseEnrollmentInfo.toString()
If there are no enrollment applications on the system, but someone still
makes a KeyphraseEnrollmentInfo and tries to print it, it would generate
a NPE on a map object. Instead of setting the map to null when we don't
find any enrollment applications, we can just set it to an empty map.

Bug:28622866
Change-Id: I023e6fd90effd3143c19817a0d6637a013bebc31
2016-05-05 17:20:44 -07:00
Adam Lesinski
77acaf86b3 Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev am: c1ff12eccd
am: 3297250b9c

* commit '3297250b9cc068715d36c039133db5bf0083b9cc':
  Fix issue where existing Activity Resources references would not update

Change-Id: I1f9dfebf5deb3d1a9cf49cc9042a02a90c3c7a68
2016-05-05 23:40:25 +00:00
Adam Lesinski
3297250b9c Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev
am: c1ff12eccd

* commit 'c1ff12eccd0e48ff7feab62387e60ae4010a3cc9':
  Fix issue where existing Activity Resources references would not update

Change-Id: I1b411b89dae0aa623d796ab2ab7dabb52a6e28c0
2016-05-05 23:35:31 +00:00
Adam Lesinski
001f8c57a8 Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev
am: c1ff12eccd

* commit 'c1ff12eccd0e48ff7feab62387e60ae4010a3cc9':
  Fix issue where existing Activity Resources references would not update

Change-Id: I91cecfc1b5942d7e1c069e739be72a23472f6d47
2016-05-05 23:35:28 +00:00
Adam Lesinski
c1ff12eccd Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev 2016-05-05 23:23:43 +00:00
Vladislav Kaznacheev
cae475563a Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev am: 7d2a0a0571
am: f1febf2700

* commit 'f1febf27006a98adc5de584e7703338b85208ed3':
  Add @TestApi to ActivityOptions.setLaunchStackId

Change-Id: I13c413b1f0520262c271a397751a1a055e464655
2016-05-05 23:21:04 +00:00
Vladislav Kaznacheev
f1febf2700 Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev
am: 7d2a0a0571

* commit '7d2a0a05715841b582cbaefa3fd0e0a542064556':
  Add @TestApi to ActivityOptions.setLaunchStackId

Change-Id: I7996b43fa80b5965feb69028be2526faa379a134
2016-05-05 23:16:07 +00:00
Vladislav Kaznacheev
46d24970ed Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev
am: 7d2a0a0571

* commit '7d2a0a05715841b582cbaefa3fd0e0a542064556':
  Add @TestApi to ActivityOptions.setLaunchStackId

Change-Id: I51b1329b14754fa9f765452769a4e311a69ae6bb
2016-05-05 23:16:04 +00:00
Adam Lesinski
8ce4e12c73 Fix issue where existing Activity Resources references would not update
When relaunching an Activity, the DecorView and ViewRootImpl is re-used,
along with the IBinder activity token. This means that when we create
new resources, we end up just updating the base Activity resources.

However, we would set the configuration to the new requested override
config and then proceed to update existing Resources references, which
would return immediately due to the equality check for configuration
updates.

This change pushes the setting of the new override config to the
updateResourcesForActivity method, which will properly update Resources
references that are held in the re-used DecorView.

Bug:27915587
Change-Id: I113007a40fa464b8a234b073dcf851e16fee0177
2016-05-05 23:08:09 +00:00
Vladislav Kaznacheev
7d2a0a0571 Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev 2016-05-05 23:04:49 +00:00
Christopher Tate
fb74b50b19 Correct docs about what is ignored in full-data backup am: c5be8f8a4b
am: 3f0db943c5

* commit '3f0db943c589738fc09e7bb45c10a319b41955fa':
  Correct docs about what is ignored in full-data backup

Change-Id: I00bb2ffdb52af988d9b7c231864b629fb2e27dbd
2016-05-05 22:36:42 +00:00