Commit Graph

2720 Commits

Author SHA1 Message Date
Neil Fuller
db4cfca7c6 Merge "Re-enable some test cases" am: 8feaad7249 am: a76d88d26d am: 450c3bc1cd
am: ea0e2bd457

Change-Id: I6f3eaa28a59dd11037c8d1eec9b9621a23bf220a
2017-07-19 10:07:25 +00:00
Neil Fuller
ea0e2bd457 Merge "Re-enable some test cases" am: 8feaad7249 am: a76d88d26d
am: 450c3bc1cd

Change-Id: I89a31203310c0ea130b9a4f70656a2f81f372c34
2017-07-19 10:01:47 +00:00
Neil Fuller
a76d88d26d Merge "Re-enable some test cases"
am: 8feaad7249

Change-Id: I1b86866748afa6d6014abcbf59116a7abf67b54e
2017-07-19 09:51:17 +00:00
Calin Juravle
9cc0a8f2dd Merge "Record dex files users in the dex-usage list" 2017-07-18 23:20:33 +00:00
Calin Juravle
535a4753e3 Record dex files users in the dex-usage list
Add the users of the dex files in the package-dex-usage.list. This will
provide more data on why a package is marked as shared and not optimized
using profiles.

Test: runtest -x .../DexManagerTests.java
      users of the dex files are recorded in package-dex-usage.list

Bug: 63778376
Change-Id: I329bc929b17fa0afe1531f3e6879f6160157a787
2017-07-18 13:51:38 -07:00
Jeff Sharkey
7e909308d2 Merge "Unify permissions under UPDATE_DEVICE_STATS." 2017-07-18 16:17:02 +00:00
Neil Fuller
29ff71baa4 Re-enable some test cases
Re-enable some test cases now the case they test has been
renabled (by commit 3d7a4143d5).

Tested with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Bug: 31008728
Test: See above
Change-Id: Ia26c4355e41d5b1010594a06bb8c4e8cef8528f7
2017-07-18 10:30:53 +01:00
Jeff Sharkey
9f09e6a73d Unify permissions under UPDATE_DEVICE_STATS.
The UPDATE_DEVICE_STATS permission has become the de-facto mechanism
that platform components use to shift blame for resource usage, so
it's confusing to also have a separate MODIFY_NETWORK_ACCOUNTING
permission.  So this change replaces MODIFY_NETWORK_ACCOUNTING with
UPDATE_DEVICE_STATS.

Bug: 62483389
Test: builds, boots
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I872759f02327b6d531ec2338bd876890aded60ad
2017-07-17 16:10:55 -06:00
TreeHugger Robot
45ea6c85b6 Merge "Send less ranking reconsiderations and updates" 2017-07-17 21:21:19 +00:00
Julia Reynolds
eb3dca71b5 Send less ranking reconsiderations and updates
- NotificationIntrusivenessExtractor does not need to reconsider
ranking for non intrusive notifications
- All adjustments (by group helper and the assistant) have been moved to
extractors so we can selectively send ranking updates instead of always
sending them.

Fixes: 62827235
Test: runtest systemui-notification
Change-Id: I2ea746c3883049abac0752788a3f4c2fa50c8064
2017-07-17 16:55:24 +00:00
Andrew Scull
971f2948fb Credential FRP: remove GateKeeper
From O-DR, all new credentials will be synthetic password based. A
GateKeeper credential could be enrolled but that would require
`adb shell cmd lock_settings sp 0`.

Credential FRP won't be released before O-DR so there is no need to
handle GateKeeper credentials. The protocol constants have been updated
because they are not yet in use.

Bug: 36814845
Test: runtest frameworks-services -p com.android.server.locksettings
Change-Id: Id0def06bb56fef47f3151f4f5cd0db738b35979f
2017-07-17 13:36:18 +00:00
TreeHugger Robot
42b4446b0e Merge "Iterate NetworkPolicy towards SubscriptionPlan." 2017-07-15 19:57:08 +00:00
Jeff Sharkey
53313d7e81 Iterate NetworkPolicy towards SubscriptionPlan.
Add new SubscriptionPlan API to describe the various types of carrier
data plans.  Internally the OS will only use the first plan for
driving policy, but it will blindly plumb through the details for
Settings to display any secondary plans.

As part of getting Settings ready to roll towards SubscriptionPlan,
reduce references to NetworkPolicy internal fields.  All usage cycle
details are now obtained from an Iterator which converts to
SubscriptionPlan under the hood.

Replace all data usage cycle calculation with new SubscriptionPlan
implementation, and retrofit large suite of existing tests to
exercise and verify the new logic.

Offer a debugging property that can be used to return "fake" plan
examples for testing.

Bug: 63391323
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I889c653980eeb7887abdfa4f5b6986f35855ee6d
2017-07-14 16:18:40 -06:00
TreeHugger Robot
88783f22fe Merge "Move duplicated union of HashSets logic into helper class" 2017-07-14 16:56:05 +00:00
TreeHugger Robot
cb2bb89878 Merge "Move logic for backup journal into its own class" 2017-07-14 16:02:26 +00:00
Robert Berry
c89535567b Move duplicated union of HashSets logic into helper class
Bug: 36850431
Test: adb shell am instrument -w -e package com.android.server.backup com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I83a95919d7b85131cc7ad73575d7a89c7f2d78f9
2017-07-14 14:10:51 +00:00
Julia Reynolds
1cd8e1e3bf Merge "Fix system crash" into oc-dr1-dev am: 5a0958ed0b
am: e58e833819

Change-Id: I601238f6ced41633f5674d68a741fbdaeb3bb4a0
2017-07-14 13:55:30 +00:00
Robert Berry
9699fe319e Pull backup password logic out of BackupManagerService
This makes it easier to follow what's going on. Also makes it easy for us to
add unit tests for this component.

Bug: 36850431
Test: adb shell am instrument -w -e package com.android.server.backup com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ifb85f1573bcfb7da26febed35d49454614b5d975
2017-07-14 14:51:16 +01:00
Julia Reynolds
e58e833819 Merge "Fix system crash" into oc-dr1-dev
am: 5a0958ed0b

Change-Id: Icd087a48c50670bc5a59c34a13ecb3df5d5529e2
2017-07-14 13:49:13 +00:00
Robert Berry
c31a839fd3 Move logic for backup journal into its own class
Refactor to further simplify BackupManagerService, which currently has too
many responsibilities. Also adds unit tests.

Bug: 36850431
Test: adb shell am instrument -w -e package com.android.server.backup com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Id433d7604c22c8b6f0d524a9bf9e83053facc0ca
2017-07-14 14:45:22 +01:00
Julia Reynolds
8166d8b2c3 Merge "Fix nomanservice notificationrecord leak" into oc-dr1-dev am: bcc35f5ae6
am: 886d8b1c00

Change-Id: I232b0239d0af7d211cb91496a1b35646864a4032
2017-07-13 19:23:26 +00:00
Julia Reynolds
886d8b1c00 Merge "Fix nomanservice notificationrecord leak" into oc-dr1-dev
am: bcc35f5ae6

Change-Id: Ifb65c3b9aba091a30f6b895bd2c5f585802cf150
2017-07-13 19:15:54 +00:00
Julia Reynolds
0f17000fb3 Fix system crash
Change-Id: I47d6d79682bfe907544f9282c26e350576618ce2
Fixes: 63474899
Test: runtest systemui-notification
2017-07-13 11:35:46 -04:00
Julia Reynolds
080361ee31 Fix nomanservice notificationrecord leak
Test: runtest systemui-notification
Change-Id: Ic5761b917edd000bf73b3291b0ca95bbb0b9bedb
Fixes: 63585648
2017-07-13 11:23:12 -04:00
Pavel Grafov
14433db1b2 Merge "Add DPMS test as presubmit test." 2017-07-13 10:55:11 +00:00
Andrii Kulian
917a641101 Merge "Position app with short aspect ratio opposite of nav bar" into oc-dr1-dev am: a40af83c32
am: 8d99ed44f2

Change-Id: I28cee4719647f5c1746e62fe8c73ebdc99be6c65
2017-07-13 03:47:30 +00:00
Andrii Kulian
8d99ed44f2 Merge "Position app with short aspect ratio opposite of nav bar" into oc-dr1-dev
am: a40af83c32

Change-Id: I08967a79847a0d42a0a5c67d2bb178d2717eae33
2017-07-13 03:41:34 +00:00
Andrii Kulian
3a1619d68e Position app with short aspect ratio opposite of nav bar
When an application doesn't support tall aspect ratio of the
screen where it's displayed, it should be positioned on the
opposite side from navigation bar. It's supposed to create
an effect of extended black nav bar.

Bug: 62893418
Test: go/wm-smoke
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarBottom
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarLeft
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarRight
Change-Id: I2cd3d236ee8d0cc263fee4c0a436d78c755eb9b7
2017-07-12 14:04:35 -07:00
TreeHugger Robot
449c4dc538 Merge "Fix LSS unit tests and make behaviour consistent under synthetic password" 2017-07-11 17:00:54 +00:00
Christine Franks
d019d4c315 Merge "Support demo mode and demo users" into oc-dr1-dev am: 2f87ca1637
am: b128d9cd77

Change-Id: I317aa17cefa918483aeec0cc58df89dd18f59472
2017-07-11 14:53:59 +00:00
Christine Franks
b128d9cd77 Merge "Support demo mode and demo users" into oc-dr1-dev
am: 2f87ca1637

Change-Id: I429ce9d2c273c9b093e2f9fe789d126a0b95f198
2017-07-11 14:47:35 +00:00
Rubin Xu
16c823ebf3 Fix LSS unit tests and make behaviour consistent under synthetic password
1. Fix LSS unit tests: new credential initialization steps when synthetic
   password is used.
2. Fix LSS behaviour under SP: If credential matches but type doesn't, treat
   this as failure.
3. Fix LSS behaviour under SP: when changing credential, if old credential is
   provided but is incorrect, fail instead of performing an untrusted enroll.

Bug: 63064202
Test: runtest frameworks-services -p com.android.server.locksettings
Change-Id: I762d3f4cc8fa5e4270b851721e0208c7a0f0152a
2017-07-11 15:30:44 +01:00
Dianne Hackborn
6de68dfa4e Merge "Fix issue #34471029: Don't allow audio use from background apps." 2017-07-11 10:03:24 +00:00
Christine Franks
361b825c0d Support demo mode and demo users
Bug: 62712426
Test: run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageEphemeralUser
and
run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest# \
testCreateAndManageEphemeralUserFailsWithoutSplitSystemUser
and
runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest \
frameworks-services
Change-Id: I77a71a994fe0f4f1f8c5df7c4ccf493aafa8fefe
2017-07-10 17:49:42 -07:00
TreeHugger Robot
e9b6896607 Merge "Rate limit notification sounds/vibrations" 2017-07-10 18:44:50 +00:00
Julia Reynolds
ed7b5c64e0 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev am: c65071d625
am: 8d4cd22ffb

Change-Id: I60ddda50a6d5a6a3028361435a340d6191f6c729
2017-07-10 17:14:57 +00:00
Julia Reynolds
8d4cd22ffb Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev
am: c65071d625

Change-Id: I85e7117a88be1a629a953f1c721faba508d6d424
2017-07-10 17:06:23 +00:00
Julia Reynolds
c65071d625 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev 2017-07-10 16:55:01 +00:00
Julia Reynolds
3ff26d2739 Rate limit notification sounds/vibrations
1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I42c2342c7ccb86f5912d729c7c2a0074f3000ad2
2017-07-10 12:46:53 -04:00
Dianne Hackborn
3e99f654fb Fix issue #34471029: Don't allow audio use from background apps.
This is becoming a common pattern (keeping track of which processes
are cached and not allowing them to do stuff in that state), so I
am turning this in to a general mechanism for monitoring this state
through the activity manager's IUidObserver.  Now we can just have
AudoService implement its own IUidObserver to get this state and
update which uids it is blocking.

This required making some changes to uid change reports so that
the integer is now a bit mask instead of an enumerations, but that
is what it was already turning in to anyway.  (This gets rid of
the crazy GONE_IDLE constant that we'd needed to add before because
it wasn't a bit mask).

Eventually the power manager should be changed to be told about
these changes to cached state instead of listening to every proc
state change, but we'll do that later, it is more disruption than
I want to take for now.  However, while working on this, I noticed
that the power manager had regressed in the cached uids it would
actually block, because the activity manager was no longer telling
it about all uids that are idle.  (I think this happened when I had
to change the default idle state of UidRecord to true.)  So I am
adding a bit of new code to keep track of what idle state we last
reported to observers, to make sure we tell it about newly created
uids that are idle but have never actually become active.

Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services

Change-Id: I7bfd46bacadd4cab2a69f40e6e52afb4e67b456a
2017-07-10 17:24:20 +01:00
Julia Reynolds
685525ed0a Merge "Rate limit notification sounds/vibrations" into oc-dr1-dev
am: 00d83ea50f

Change-Id: I9228a7b79f4c8f438fceb462128d16eddda2b563
2017-07-10 16:02:37 +00:00
TreeHugger Robot
00d83ea50f Merge "Rate limit notification sounds/vibrations" into oc-dr1-dev 2017-07-10 15:57:32 +00:00
TreeHugger Robot
330ca71a95 Merge "Allow setup apps to colorize notifications." 2017-07-10 15:01:07 +00:00
Bryce Lee
76f4782227 Merge "Add app bounds to Configuration#compareTo." into oc-dr1-dev am: 649053810f
am: 31bf99946c

Change-Id: I502d823cb4f9089a1c460d8a810381fef7333b2d
2017-07-10 14:37:56 +00:00
Bryce Lee
31bf99946c Merge "Add app bounds to Configuration#compareTo." into oc-dr1-dev
am: 649053810f

Change-Id: Ifc8c8e2df9296072f1c5746cff0bc005755b60a8
2017-07-10 14:30:25 +00:00
Bryce Lee
649053810f Merge "Add app bounds to Configuration#compareTo." into oc-dr1-dev 2017-07-10 14:21:37 +00:00
Julia Reynolds
6ad0aecf99 Limit the number of notis an app can enqueue
In addition to the number they can post. Also decrease
the number of posts per second to 5, but allow finished
progress notifications through.

Fixes: 63173849
Fixes: 63167456
Test: runtests systemui-notification & simultaneously
downloading 5 files.
Change-Id: I0c8ea35b3d9d38b000ea5fe383515e1d5a26bac7
2017-07-10 09:42:24 -04:00
Julia Reynolds
5f8e0b881e Rate limit notification sounds/vibrations
1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I2046ae17b9e89ac0a83e182b91422fd242bc7557
2017-07-10 09:37:54 -04:00
Julia Reynolds
4db5955557 Allow setup apps to colorize notifications.
Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
2017-07-10 09:17:39 -04:00
Julia Reynolds
6b734d0478 Merge "Allow setup apps to colorize notifications." into oc-dr1-dev
am: e4101089bb

Change-Id: I14f8f499ac62ed47d40ca9b2a7bff0c79120dcd7
2017-07-07 19:31:57 +00:00