2373 Commits

Author SHA1 Message Date
TreeHugger Robot
67ced6c08f Merge "Fix cancel when the same notification is enqueued twice." into oc-dev 2017-05-02 20:02:19 +00:00
Jeremy Joslin
a9f933e53a Revert permission check on setActiveScorer.
Reverted to the pre-O behavior of allowing the call if the caller
has the SCORE_NETWORKS permission.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 37722313
Change-Id: I54a99dde364d6a5c88d35072922020542c6ae003
2017-05-02 12:23:05 -07:00
Jeremy Joslin
7aa0b0d94e Allow the active scorer to be set to NULL.
Setting the scorer to NULL will disable scoring/recommendations.

Test: runtest frameworks-services -c com.android.server.NetworkScorerAppManagerTest
Bug: 37722313
Change-Id: I8bdc43aa80cc2d6668ffa24389a8e4e9aaf95bd6
2017-05-02 12:19:52 -07:00
Geoffrey Pitsch
27684159c6 Fix cancel when the same notification is enqueued twice.
Change-Id: I6563c70ac441ff1c1951d5220c2e6a7c5f210d49
Fixes: 37706685
Test: runtest systemui-notification
2017-05-02 13:28:51 -04:00
TreeHugger Robot
8183328af7 Merge "Do not unsnooze canceled notifications." into oc-dev 2017-05-01 22:23:48 +00:00
TreeHugger Robot
f323e3a543 Merge "Move the last user save from onCleanupUser to onStopUser" into oc-dev 2017-05-01 19:31:19 +00:00
Makoto Onuki
01ce92b8ac Move the last user save from onCleanupUser to onStopUser
Bug: 37780857

Test: manual test with work profile

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Change-Id: I8b053c6a55df374a89ab85d76b9d36abf639f649
2017-05-01 17:14:00 +00:00
Salvador Martinez
4d09adcef1 Merge "Added dialog to notify user of thermal shutdown" into oc-dev 2017-05-01 16:45:30 +00:00
Julia Reynolds
a8b766fb73 Do not unsnooze canceled notifications.
Test: runtest systemui-notification
Change-Id: I3edef5822aa74359bf3a34f54f59d4021696365d
2017-05-01 11:04:23 -04:00
TreeHugger Robot
0152fd3686 Merge "Fixing test due to null PiP default bounds." into oc-dev 2017-04-29 22:37:01 +00:00
TreeHugger Robot
5bb8294f92 Merge "Add managed profile whitelist to control NotificationListenerServices" into oc-dev 2017-04-29 19:49:35 +00:00
TreeHugger Robot
060f0f0341 Merge "A11y changes for API council" into oc-dev 2017-04-29 15:54:27 +00:00
TreeHugger Robot
ef1648c2cd Merge "Don't try to create user for task snapshot tests" into oc-dev 2017-04-29 07:03:54 +00:00
Winson Chung
9c84441057 Fixing test due to null PiP default bounds.
- Also moving the default bounds call into the pinned stack window
  controller

Bug: 37682538
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests\#testReplacingTaskInPinnedStack

Change-Id: Id6608d484617ec1a596e608aab649a082b4b1e95
2017-04-28 17:32:43 -07:00
TreeHugger Robot
83d139bd1b Merge "Use List instead of array in network logging API." into oc-dev 2017-04-28 23:00:02 +00:00
Wale Ogunwale
e163126d2e Don't try to create user for task snapshot tests
Seems user creation can fail in test harness some times.
Also, I am not sure there is a need to create a user in this
case when we can just use the user id of the current process.

Also removed SettingBackupTest from @Presubmit since it is still
failing.

Bug: 37684646
Bug: 37682538
Test: SettingsBackupTest
Test: TaskSnapshotPersisterLoaderTest
Change-Id: I523bb576217f7782027741916f9ea14fc6d7fb50
2017-04-28 15:13:54 -07:00
Phil Weaver
be2922ff34 A11y changes for API council
Bug: 37749679
Bug: 37747749
Bug: 37737948
Bug: 37718183
Bug: 37720667
Bug: 37724600
Bug: 37708057

Test: Updating unit and cts tests, which still pass.
Change-Id: If28bdf985c4314e8e84dcd6510f406dd4e80dd38
2017-04-28 14:58:35 -07:00
Dianne Hackborn
1be5354aba Fix issue #37324532: API Review: android.content.pm.InstrumentationInfo
targetProcess -> targetProcesses

Test: bit CtsAppTestCases:InstrumentationTest

Change-Id: I859985c689cc588c585cd0ec6e0a20411493a7c0
2017-04-28 13:38:34 -07:00
Pavel Grafov
f09a16628d Use List instead of array in network logging API.
Bug: 37625453
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Test: ts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testNetworkLoggingWithSingleUser
Change-Id: Icba7e3178202e0e650689d98c4010a9b40c6a53c
2017-04-28 19:31:00 +01:00
Pavel Grafov
90357d62e9 Merge "Introduce DISALLOW_BLUETOOTH_SHARING." into oc-dev 2017-04-28 14:16:04 +00:00
TreeHugger Robot
cfbe105e4b Merge "Rename FingerprintGestureCallback.onGesture" into oc-dev 2017-04-28 03:42:01 +00:00
Julia Reynolds
a78cdffd80 Change snoozing behavior for notifications in groups
- Snoozing a summary notification will snooze its current
children in addition to itself
- Posting a non-snoozed notification to a summary will
unsnooze the summary
- snoozing the only child of a group will also snooze the group
summary

Test: runtest systemui-notification
Change-Id: I5edba1461a59131c6c202f02e6f89404d22bb404
Fixes: 35934956
2017-04-27 16:47:36 -04:00
Bryce Lee
d08c064976 Merge "Don't call adjustFocusedActivityStackLocked on finished activity." into oc-dev 2017-04-27 20:41:36 +00:00
Pavel Grafov
a6ea92097c Use InetAddress instead of String in network events.
This is a conservative change that converts strings to
InetAddress on the fly just before givint it to the client.

Also renamed getIpAddressesCount to getTotalResolvedAddressCount
to make it 1) harder to misuse it as getInetAddresses().length
2) more descriptive.

Bug: 37625453
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testNetworkLoggingWithSingleUser
Change-Id: I2a31dddd6874f1a629895e4dff105cf41984a775
2017-04-27 18:53:11 +01:00
Pavel Grafov
4f4f6f83c2 Introduce DISALLOW_BLUETOOTH_SHARING.
When this restriction is enforced Bluetooth sharing option should not be
present when the user tries to share something. Previously this was handled
by explicitly disabling bluetooth sharing activity during managed
provisioning, now this code is to be removed (see topic CLs) and the same
behavior should be achieved by setting this restriction for profile owners
by default.

In Bluetooth:
1) Don't check restrictions on boot, it is invoked anyway through the
  listener during boot.
2) Ignore when the restriction is "changed" from true to true - i think
  it was the initial intent in that condition.
3) Disable the component for a particular user and not always the
  system user. This is something that has to be fixed in O I think since
  currently in secondary user the bluetooth itself gets disabled but the
  sharing thing still shows up.

In DPMS:
1) Now ActiveAdmin for PO also contains a set of restrictions applied by
  default.
2) Now all ActiveAdmins for POs are loaded quite early. That shouldn't
  have huge impact though.

Bug: 36249732
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testBluetoothSharingRestriction
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
Change-Id: I78c4ffbd503c4a10138e8c0862a9f206f24c5631
Merged-in: I78c4ffbd503c4a10138e8c0862a9f206f24c5631
(cherry picked from commit 7f4ad75218bdd3f1bdf9022a146147eae032cc0c)
2017-04-27 18:06:07 +01:00
Salvador Martinez
a6f7b25c3d Added dialog to notify user of thermal shutdown
tldr; Have the phone check when it reboots if it last shut
down due to heat. If so, we should show the user an
notification and dialog giving them more details.

- Added hidden api to allow apps to query system_server
for the reason the phone last rebooted
- Added notification that is shown when the phone is
booted if the last shutdown was due to excessive
heat.
- Added dialog to provide more details about the
shutdown if the notification is tapped.
- Added tests to verify that file is read and
as expected.
- Updated code for high temperature warning that
is shown while the phone is running to avoid
mixups in the future.

Test: FrameworksServiceTests
Bug: 30994946
Change-Id: Ic25f42539911c89ba7f1834e206f7931d65c2865
2017-04-27 09:52:45 -07:00
Esteban Talavera
9c6458dd58 Add managed profile whitelist to control NotificationListenerServices
Only let notification listeners installed in the primary profile
see work profile notification if allowed by policy

Bug: 36657192
Test: runtest systemui-notification
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest    frameworks-services
Change-Id: If719151644380e9162180a24d12f798e42867c0a
(cherry picked from commit 7e4cbadc6a561be62bf3b5e4c949bbb863018cc7)
2017-04-27 13:35:48 +00:00
TreeHugger Robot
424dd39e25 Merge "setAffiliationIds and getAffiliationIds uses set instead of list" into oc-dev 2017-04-27 09:41:18 +00:00
TreeHugger Robot
f84467e19f Merge "Api updates" into oc-dev 2017-04-27 04:51:46 +00:00
Tony Mak
3165743c50 setAffiliationIds and getAffiliationIds uses set instead of list
Didn't use @remove because java doesn't support two methods differs from
the return type only.

Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_unaffiliatedUser
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: cts-tradefed run cts-dev --module DevicePolicyManager  --test com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest

Change-Id: Ic7c7221ef5e680a6765f028c2ab73d4c2f908c58
Fix: 37622682
2017-04-26 22:42:19 +00:00
Phil Weaver
d7e1fb89d9 Rename FingerprintGestureCallback.onGesture
Renaming to onGestureDetected.

Deprecating onGesture. It needs to be removed for release.
Leaving it in to avoid breaking TalkBack, which is using it.

Bug: 37708057
Test: Accessibility unit and CTS tests still pass.
Change-Id: Icd66889216fc978ad6d27aa83a8c8d13869daad3
2017-04-26 15:20:24 -07:00
Bryce Lee
3345c4ea96 Don't call adjustFocusedActivityStackLocked on finished activity.
When an activity is finished, adjustFocusedActivityStackLocked is
already called on the associated record and the task association is
lost. Calling it again is redundant and leads to a crash as we
assume the task is still associated with the activity.

Change-Id: Ie7cc9ad8b1542d7415b7409e539c88d3b4ec8dcd
Fixes: 37329424
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests#testStopActivityWhenActivityDestroyed
2017-04-26 12:45:11 -07:00
Julia Reynolds
567947d75d Merge "Update app level fields when misc channel is updated" into oc-dev 2017-04-26 17:43:32 +00:00
Wale Ogunwale
0f8764485b Merge "Reduce use of static variables in window manager unit tests" into oc-dev 2017-04-26 12:35:12 +00:00
Wale Ogunwale
11cc516a92 Reduce use of static variables in window manager unit tests
This was causing test cross-contamination since different test might
expect different states from the variables.

Bug: 37682538
Test: tons of it!
Change-Id: Ie8a1ea400695b6346d7dfa3369b5c44bb467a33d
2017-04-25 20:33:30 -07:00
Julia Reynolds
bad4297600 Api updates
- Better documentation on DEFAULT_CHANNEL_ID
- Renaming getChannel/setChannel/getTimeout/setTimeout
- Add documentation to getShortcutId
- @hide parcel constructors

Test: make, make cts
Bug: 37672218

Change-Id: I695b2620c51638a84930e9d1c5fbfd6d85699b55
2017-04-25 17:00:05 -04:00
TreeHugger Robot
21fb35048f Merge "Revert "Revert "Integrate new looper apis into testables""" into oc-dev 2017-04-25 20:27:23 +00:00
Julia Reynolds
fa04e143d8 Update app level fields when misc channel is updated
So user settings aren't lost when the app migrates
to using channels

Test: runtest systemui-notification
Change-Id: I5774997ea33a892fa45f614bb3dd8de7e681f58c
Fixes: 37603697
2017-04-25 15:50:56 -04:00
Julia Reynolds
9685128edf Merge "Allow some notifications in a group to be muted" into oc-dev 2017-04-25 19:25:05 +00:00
TreeHugger Robot
bad4573bd4 Merge changes from topic 'experio-scoring' into oc-dev
* changes:
  Remove Settings.CURATE_SAVED_OPEN_NETWORKS
  Remove request recommendation from AIDL files.
  Remove the recommendation request impl and test code.
  Deprecate the recommendation request code.
2017-04-25 18:51:51 +00:00
Jason Monk
745d0a8b77 Revert "Revert "Integrate new looper apis into testables""
This reverts commit fd8f615953631863c94d7080441f8dd4a0a74f56.
+ some minor adjustments.

Test: runtest systemui
Change-Id: Ie4349fcfb2aadbbd8826506faa8a6fb1ecd5b589
2017-04-25 13:49:58 -04:00
Julia Reynolds
a79c37170e Allow some notifications in a group to be muted
Test: cts, runtest systemui-notification
Change-Id: I98b971c496c52f69e039a3a3101f71ac567b538a
2017-04-25 13:41:37 -04:00
Dmitry Dementyev
b6a7dc033c Update PACKAGE_REMOVED broadcast.
1) Include KEY_ACCOUNT_NAME and KEY_ACCOUNT_TYPE.
2) Only send the broadcast to packages which were able to see the
account.

Test: manual, APCT.
Bug:37280078

(cherry picked from commit cbbc99f76224cedb6d680c3cd7f0afc9cc912202)

Change-Id: I3c323e545628199903313096f93654687fa8f22b
2017-04-24 23:57:30 +00:00
Julia Reynolds
10e7275965 Merge "Don't allow devs to create blocked channels" into oc-dev 2017-04-24 21:17:16 +00:00
Julia Reynolds
d8c0ac42de Don't allow devs to create blocked channels
Test: runtest systemui-notification
Change-Id: I11942e4268acc70ffcbcda08eed4e13e64f4b12f
Fixes: 37559814
2017-04-23 13:18:15 -04:00
Julia Reynolds
ca80d1632e Don't consider uri empty a valid sound
Test: runtest systemui-notification
Change-Id: Ia838237e04eb11bd79e3ad5990bbb52c7ab853ee
Fixes: 36848349
2017-04-23 17:13:28 +00:00
Sudheer Shanka
9ebd87de8e Merge "Fix flaky tests in ConnOnActivityStartTest." into oc-dev 2017-04-22 00:34:40 +00:00
TreeHugger Robot
faf37babb0 Merge "Let unlocked profile verifyCredential under unified lock" into oc-dev 2017-04-21 22:27:47 +00:00
Jeff Sharkey
4b32f7c676 Merge "Fix code accounting bugs, track external app data." into oc-dev 2017-04-21 20:01:43 +00:00
Julia Reynolds
fea6f7b799 Remove long standing debug code
Because it stops real errors from bubbling up to the calling app.

Test: make, post notifications
Change-Id: I0e59c61b0a60302a5fd023b7ad909e84b97e5df5
Fixes: 37494547
2017-04-21 09:38:39 -04:00