11 Commits

Author SHA1 Message Date
Hai Zhang
6e84285bcd DO NOT MERGE Implement suggested changes in API review for permission mainline.
Test: build
Fixes: 150877494
Change-Id: Ieca5f7a46241032f6722bb379fc08206b9600ddc
2020-03-05 14:07:10 -08:00
Felipe Leme
339b7149af Improved user callbacks on SystemService:
* Renamed:

  onStartUser() -> onUserStarting()
  onStopUser() -> onUserStopping()
  onSwitchUser() -> onUserSwitching()
  onUnlockUser() -> onUserUnlocking()
  onCleanupUser() -> onUserStopped()
  isSupportedUser() -> isUserSupported()

* Added:

  onUserUnlocked()

Tested on automotive, which uses the callbacks to dump user metrics:

$ adb shell dumpsys car_service --user-metrics
adb shell dumpsys car_service --user-metrics
* User Metrics *
  no users starting
  no users stopping
Last 10 started users
  2020-02-21T19:44:47.101 - user=0 start=2020-02-21 19:44:45.357 unlocking=+885ms unlocked=+1s122ms
  2020-02-21T19:44:56.376 - user=10 start=2020-02-21 19:44:47.380 switch=+209ms unlocking=+8s262ms unlocked=+8s994ms
  2020-02-21T20:00:08.792 - user=11 start=2020-02-21 20:00:04.634 switch(from 10)=+351ms unlocking=+4s44ms unlocked=+4s156ms
Last 10 stopped users
  2020-02-21T20:00:48.323 - user=10 stop=2020-02-21 20:00:16.741 shutdown=+31s581ms

Test: m update-api
Test: atest BackupManagerServiceTest
Test: manual verification (see above)
Fixes: 150001654

Exempt-From-Owner-Approval: approved on master right before rvc split

Merged-In: I8774c57620030b9aa8e7ec039a6a758ad56db368
Change-Id: I8774c57620030b9aa8e7ec039a6a758ad56db368
(cherry picked from commit 58e7458ac7204992c5408eb2d6420d767afc4eb8)
2020-02-24 16:44:52 +00:00
Roshan Pius
ea33fb9ab8 SupplicantManager: Expose an API to start/stop supplicant daemon
Bug: 149923078
Test: Compiles
Change-Id: Ic7027f0d18abee2ea1c9e48700c706954d54773a
2020-02-20 14:03:17 -08:00
Anton Hansson
6a2973a075 Merge "Allow com.android.* classes in system_service stubs" 2020-02-20 10:41:03 +00:00
Hai Zhang
5ce0b1adcb Rename permission APIs.
According to lint warnings.

Bug: 136503238
Fixes: 149818284
Test: presubmit
Change-Id: I83e9ac9b65e307bb47d305003ce7adcd2b9c4049
2020-02-19 11:09:01 -08:00
Anton Hansson
f74130f525 Allow com.android.* classes in system_service stubs
The android.* rule is meant to be for the public SDK.

Bug: 147559833
Test: m checkapi
Change-Id: I8b36cf7a4ff569d0b960455de09ed40592dd5a9e
2020-02-19 18:29:12 +00:00
Anton Hansson
daa9d88444 Enable compat checking & lint for system_services api
These were previously turned off as there were no previous
releases to compare it to. Check in empty files as comparison.

Whitelist current lint problems for now (filed bugs to follow-up).

Bug: 149818061
Bug: 149818284
Bug: 147559833
Test: m checkapi
Change-Id: Ib4cbc84ac9a826f7b947c951c94f8f5578f4554d
2020-02-19 12:03:04 +00:00
Hai Zhang
47c1de2ff8 Move roles persistence into APEX.
Bug: 136503238
Test: presubmit
Change-Id: Id11842ad7653317d5f0ebf2df0f4c315d0018440
2020-01-17 19:05:57 -08:00
Hai Zhang
76f0defebf Move runtime permissions persistence into APEX.
Bug: 136503238
Test: presubmit
Change-Id: Id016d8c111ceadd27dc318c256b2f32ff0380f60
2020-01-17 19:05:48 -08:00
Makoto Onuki
bf03b1b0b3 Expose SystemService as @SystemApi for mainline modules
Test: build / treehugger (annotation change only)
Bug: 146145144
Change-Id: I41b4d56dce06034730e8b3e70c2ca3fab8cc3456
2020-01-15 11:16:19 -08:00
Jiyong Park
13c923d00a Add API signature files for the system server APIs
... so that they can be reviewed.

Bug: 140202860
Test: m
Change-Id: Iec8cdd30ad5e4979d56140a8c00a85af6476f67f
2019-12-24 00:22:36 +09:00