Commit Graph

14382 Commits

Author SHA1 Message Date
Alison Cichowlas
69f39989c2 Merge changes from topic "sharesheet-refactor"
* changes:
  Add URI shared by screenshot into extras.
  Re-patching in Sharesheet security model changes.
2018-11-12 15:19:11 +00:00
TreeHugger Robot
929cd0837a Merge "Add RoleManager into SystemServiceRegistry." 2018-11-10 17:07:26 +00:00
Svetoslav Ganov
d641d64ab4 Merge "Allow adopting a subset of shell permissions" 2018-11-10 01:10:31 +00:00
TreeHugger Robot
1045456b95 Merge "AM: Fix deadlock when calling AMS from ATMS/WM" 2018-11-10 01:09:26 +00:00
Hai Zhang
4ef21d0308 Add RoleManager into SystemServiceRegistry.
This change adds RoleManager into SystemServiceRegistry so that
Context.getSystemService() can work properly for RoleManager.

Bug: 110557011
Test: build
Change-Id: I81b7ed87e71f0deee090252f5bedf42eb79806aa
2018-11-09 14:43:51 -08:00
Alan Stokes
07317d001c Merge "DexLoadReporter needs to handle arbitrary class loaders." am: f2d5ace011 am: 1e29264790
am: 0a0559c0ce

Change-Id: I3a89a9da435cf557fd296066df7b9c5b316e87c2
2018-11-09 14:23:00 -08:00
Svet Ganov
5e86959d04 Allow adopting a subset of shell permissions
Add an API to allow adopting a subset of shell UID permissions.

Test: added - android.app.uiautomation.cts.UiAutomationTest#testAdoptSomeShellPermissions
      passed - atest atest android.app.uiautomation.cts.UiAutomationTest

bug:80415658

Change-Id: I5cd8beeed7e586b2ac4e0cb16686cef738641e23
2018-11-09 11:51:26 -08:00
John Reck
6ae76d0d8a Merge "Refactors and a potential public API for rendering" 2018-11-09 19:16:27 +00:00
Eugene Susla
72e8228fb8 Merge "Adjust default app op behavior based on feature state" 2018-11-09 17:44:46 +00:00
Vishnu Nair
006ee3fef6 AM: Fix deadlock when calling AMS from ATMS/WM
Instead of calling AMS synchronously, release the wm lock and pass it to AMS. Wait for AMS to
notify us when its done.

Fixes: 119265867, 119275681
Test: adb shell am start-activity -S -W com.google.android.apps.maps/com.google.android.maps.MapsActivity
Test: atest CtsSampleHostTestCases
Change-Id: Idc2895c14ccd92524e88ce3dda24b3d0e8dce2c1
2018-11-09 16:56:17 +00:00
Alison Cichowlas
3e34050a42 Re-patching in Sharesheet security model changes.
Previously reverted due to b/72554856, fix for that in topic.

Original commit message:

Security model for moving sharesheet to systemui

ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: Ia50e21e2f8c6b6d0ed7207625e3b5aef214396bb
2018-11-09 11:01:54 -05:00
Gus Prevas
a32264906d Adds an icon to noisy notifications.
Test: manually
Bug: 116622974
Change-Id: I657e81eed9c650f1613caffaea96e6445c2105ef
2018-11-09 10:35:27 -05:00
Alan Stokes
0a0559c0ce Merge "DexLoadReporter needs to handle arbitrary class loaders." am: f2d5ace011
am: 1e29264790

Change-Id: I41caab25c48d496722ac4d044908dd781df1705d
2018-11-09 03:20:40 -08:00
Kevin Chyn
a85b4a2d29 Merge "Return correct error when HW there is no biometric hardware" 2018-11-09 04:42:35 +00:00
Svet Ganov
5520368070 Adjust default app op behavior based on feature state
If the CallLog/SMS permission restriction is not enabled we keep
the old default app op state for the relevant ops and if the
feature is enabled we switch to the new default value.

Test: Manual

Change-Id: I93c0e059741f475ebdffce682e1d0d9149b41159
2018-11-08 18:04:49 -08:00
John Reck
8785ceb3b9 Refactors and a potential public API for rendering
Split out the View/ViewRootImpl bits from the
hardware rendering bits.

Create a potential public API surface for
hardware rendering

Bug: 112709971
Test: builds & boots

Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
2018-11-08 15:32:35 -08:00
Philip P. Moltmann
17f65afe3b Split permissions inherit state from their parents
The old hack to grant permissions on upgrade was removed. The new code
applies to
- platfrom upgrade
- initial package installation
- package update

Inheriting the grant state is the default behavior for split permissions.
Special cases will be added later.

Also make sure to revoke the permission once the app declares that it is
aware of the permission.

Test: atest CtsPermissionTestCases:SplitPermissionTest
Change-Id: Ie51971530607f0b585cf7a3e11b01b11a28e1de9
2018-11-08 09:32:01 -08:00
Evan Rosky
38e1cb73f5 Merge changes from topic "wm_move_disp_to_hier_2"
* changes:
  Move some display logic into hierarchy [2/2]
  Move some display logic into hierarchy [1/2]
2018-11-08 01:15:27 +00:00
Alan Stokes
b6c3a604b0 DexLoadReporter needs to handle arbitrary class loaders.
Also made sure we can handle null classpaths.

Test: atest -p services/core/java/com/android/server/pm/dex
Bug: 111336847
Change-Id: Idabf3fb9a09a0764e805679ac29cd8455e8dc267
2018-11-07 12:00:42 +00:00
TreeHugger Robot
661d7b8dba Merge "Support show KeyguardPresentation on all public displays." 2018-11-07 06:26:51 +00:00
Kevin Chyn
e739daf2e8 Return correct error when HW there is no biometric hardware
Devices that have no biometric hardware should still get the
BIOMETRIC_ERROR_HW_NOT_PRESENT error. Currently they get the
BIOMETRIC_ERROR_HW_UNAVAILABLE error which is slightly wrong.

Fixes: 119109074

Test: Builds
Change-Id: I32134a35fd2844bc6a4a64ded9695ae596496ef2
2018-11-06 20:08:42 -08:00
TreeHugger Robot
ea87b1fa7c Merge "Add AppOpsManager.opToDefaultMode() as system API." 2018-11-07 02:43:27 +00:00
Evan Rosky
e747c3e4e1 Move some display logic into hierarchy [2/2]
Move display update logic from WM into ATM hierarchy by letting
ActivityStack watch for relevant changes and calculate bounds
accordingly and removing configuration updates from WM side
outside of calls from the display-level controller (like how
the other levels work).

One of the main display-changes to account for is rotation. To
make this work without drastically modifying things was to leave
display freeze/startSeamless in WM but move the actual rotation
to ATM while handling SEND_NEW_CONFIGURATION. This prevents
changes to the wm-side hierarchy outside of ATMS's control.

To facilitate this extra communication between ATMS and WM,
this adds rotation into WindowConfiguration. This makes rotation
available to the hierarchy update for policies that care about it
(things like split). It will also replace TaskStack's mRotation
in an upcoming CL and should also let us remove the one-off
variable for landscape->seascape orientation changes (needs
some more research though).

Bug: 113900640
Test: go/wm-smoke + relevant am/wm servicestests
Change-Id: I12c79cc5eb94d48d846f1cf27765c9f9f6741435
2018-11-06 18:39:37 -08:00
Hai Zhang
c595f112db Add AppOpsManager.opToDefaultMode() as system API.
PermissionController needs to know the default mode of an app op and
adjust it in case a background permission is fixed to revoked while a
foreground permission is not for a pre-M app, because simply resetting
the app op to its default mode might break the fixed state of the
background permission.

This change also removes AppOpsManager.resetUidMode() since it was
introduced for the same use case in PermissionController but cannot
handle the above case cleanly.

Bug: 110557011
Test: build
Change-Id: I53b1b375381a46b7dbece3cddaac460352d0336d
2018-11-06 14:49:54 -08:00
Felipe Leme
7a53408d19 Initial implementation of IntelligenceService.onContentCaptureEvents()
It's only implementing the activity lifecycle events, but at least they're fed
end-to-end in the pipeline (from app to service implementation).

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: I2f46be1e6a6a21ad909e5fffea01bedaa28fb300
2018-11-06 13:02:48 -08:00
Felipe Leme
e348dc3486 Initial implementation of the IntelligenceService pipeline.
It's still full of TODOs, but at leats it now provides an end-to-end
workflow from the activity creation / destruction to the service implementation.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: Id5daf7b8b51e97c74d9b6ec00f953ddb02b48e46
2018-11-06 10:01:02 -08:00
Kevin Chyn
8d45688b6d Merge "Add placeholders for IrisManager/Service" 2018-11-06 06:29:22 +00:00
wilsonshih
e7903ea985 Support show KeyguardPresentation on all public displays.
Support show keyguard presentation on all public displays when Keyguard
is show.
Modify API ActivityTaskManager#setLockScreenShown, extends to multi-displayIds.

bug: 111955725
Test: Manual test with chromecast.
Test: atest SystemUITests
Test: atest ActivityManagerMultiDisplayTests
Test: atest ActivityManagerDisplayKeyguardTests
Change-Id: I9967e1b1adcb796593332b46853a10101e206013
2018-11-06 14:27:21 +08:00
Kevin Chyn
51676d293a Add placeholders for IrisManager/Service
With the system services in place, we can add SELinux policies

Bug: 116530289

Test: Builds
Change-Id: I0fd0dfbbbf258eb4a0ef9019247baaf323578959
2018-11-05 18:57:15 -08:00
Felipe Leme
05083b019f Merge "Initial APIs for Intelligence Service." 2018-11-05 21:48:54 +00:00
Beverly Tai
fe0efe6bd2 Merge "Only update zen rule name on locale change" 2018-11-05 18:58:39 +00:00
Felipe Leme
1dfa9a0195 Initial APIs for Intelligence Service.
A.K.A: "The thing's hollow — it goes on forever — and — oh my God! —
        it's full of TODOs!"

Bug: 117944706
Test: m update-api && m

Change-Id: I0774a0df4f4ea0810a8c5f72a1fbcd4eef5cd09b
2018-11-05 09:22:18 -08:00
Lifu Tang
05dfae98d6 Adds wrapper method to convert string ops to ints
Bug: 117677214
Test: compile and flash
Change-Id: I7de3d3829aa99473b415b40bbfe4078d5b5ed3b7
2018-11-03 00:32:38 -07:00
TreeHugger Robot
548107d94f Merge "Add reminder comment for updating CTS test" 2018-11-03 05:03:22 +00:00
Svetoslav Ganov
c7d89b4bc2 Merge "Revert "Adjust default app op behavior based on feature state"" 2018-11-03 05:01:47 +00:00
Svetoslav Ganov
0b9af26dba Revert "Adjust default app op behavior based on feature state"
This reverts commit 7d6dbb2b0b.

This change causes a subtle deadlock. Will upload a correct patch in a bit.

Change-Id: I8cb14000943338fb8c2c9049c2d85a4ce8cf6fcd
2018-11-03 04:50:48 +00:00
Svetoslav Ganov
79eba743ca Merge "Historical app op APIs - initial check in." 2018-11-03 04:49:45 +00:00
Vishnu Nair
6ec0815612 Merge "[DO NOT MERGE] AM: Use ActivityMetricsLogger to get app launch times" into pi-dev
am: a6fc25f6d3

Change-Id: I4bcc8c3a777d6537788b38cd27b2f670fbb9770b
2018-11-02 21:24:55 -07:00
Kevin Chyn
a60c07ac58 Add reminder comment for updating CTS test
Bug: 117346645

Test: Builds
Change-Id: I0193e11e57039b1a3e80c99acc491ea19c4ffeed
2018-11-02 19:58:01 -07:00
Beverly
49ba9a6019 Only update zen rule name on locale change
Test: atest ZenModeHelperTest
Change-Id: I9154c812f9955d145fe461b9e17faf9fe9ccf1c9
Fixes: 118789422
2018-11-02 16:53:29 -04:00
Vishnu Nair
cf23504955 [DO NOT MERGE] AM: Use ActivityMetricsLogger to get app launch times
- Make ActivityMetricsLogger the single source of truth for activity metrics and
use it to provide data for Tron, logcat, event logs and {@link android.app.WaitResult}
- Remove LaunchTimeTracker
- Remove workaround added for b/80084651
- Remove thisTime from WaitResult and logs
- Remove am_activity_fully_drawn_time EventLog Tag
- Update WaitResult parsing logic in AppLaunch
- Discard metrics if a launching activity is already visible.
- original bug: 67683350

Compatibility Changes:
- thisTime removed from logcat and eventlog. Only totalTime will be displayed.
- Change in activity visiblity during launch will invalidate totalTime. am start -w
  will only report WaitTime in this case.
- am_activity_fully_drawn_time is removed from event log.

Bug: 117235762
Test: atest  google/perf/app-startup/third-party-apps/cold-dropcache-stable-test -v
Test: manual tests
Test: check applaunch.txt matches test run

Change-Id: Ib033594b961be9227256eba2a519dd6c2e3db573
(cherry picked from commit 132ee83808)
(cherry picked from commit 017cddcbcb)
(cherry picked from commit f8accc5b30)
(cherry picked from commit af0ea31549)
2018-11-02 13:27:00 -07:00
Svet Ganov
ad0a49bc42 Historical app op APIs - initial check in.
This change adds new APIs for querying historical app ops
for a time period in the past. Since app ops are performed
quite often in some cases keeping track of every app op is
prohibitively inefficient. Therefore, we are exposing
aggregated counts for past ops.

Test: atest android.permission.cts.AppOpsTest

bug:111061782

Change-Id: I59bbf906d62cd6dcd751f2e8089242dcecd55a6c
2018-11-02 13:00:07 -07:00
David Brazdil
d68ee776be Merge "Remove non-SDK API toast" am: 13c2382d4f am: 6a35521032
am: c62139b488

Change-Id: Ie2a51568cf0630e0634548121b713f1778f1ff84
2018-11-02 06:30:04 -07:00
Beverly Tai
b9bfae6401 Merge "Use consolidated zen policy for dnd" 2018-11-02 13:21:06 +00:00
David Brazdil
c62139b488 Merge "Remove non-SDK API toast" am: 13c2382d4f
am: 6a35521032

Change-Id: Idd0496cf57b2b58a95a0377d969f7a0589f904a7
2018-11-02 06:17:10 -07:00
Kenny Root
8b0a22dbad Merge changes from topic "usb-adb-separation"
* changes:
  Update USB tests for ADB split
  Move AdbDebuggingManager to AdbService
  AdbService: move source of truth for enabled
  Add empty AdbHandler
  Add systemReady call for AdbService
  Add function to query ADB state
  Register USB as an ADB transport type
  Add ADB transport skeleton
  Add empty AdbManagerInternal for system server
  Add empty AdbService to SystemServer
  Move ADB debugging manager to core
  Rename to AdbDebuggingManager
  Move UsbDebuggingManager to new package
2018-11-02 00:43:05 +00:00
Eugene Susla
8394092808 Merge "Revert sms appops to their original defaults" 2018-11-01 22:32:55 +00:00
TreeHugger Robot
eb651edabf Merge "Add controller APIs for RoleManager." 2018-11-01 22:22:45 +00:00
Chris Craik
ce58754645 Merge "Add 'profileable' application manifest tag" 2018-11-01 21:28:58 +00:00
David Brazdil
c2a8de549b Remove non-SDK API toast
It served its purpose but it's time to remove it.

Test: m
Change-Id: Idc36cacae89e74f5ce01bcf51dce24cdedfda40f
2018-11-01 10:05:28 +00:00