Commit Graph

7132 Commits

Author SHA1 Message Date
TreeHugger Robot
2f6c5fe32f Merge changes from topic "broadcast_multiple_perm"
* changes:
  AndroidKeyStoreProvider: Add @throws documentation
  RemoteException: Add @throws documentation
  Context: Rename Context.sendBroadcastMultiplePermissions
2019-11-21 06:28:10 +00:00
Daniel Colascione
f9128861ec Merge changes from topic "property-handle" am: 54543bb423 am: 1077797c14
am: d5e5232632

Change-Id: I23a5fe95b271a50d60546231a9facf59440bb2dd
2019-11-20 21:02:31 -08:00
Daniel Colascione
d5e5232632 Merge changes from topic "property-handle" am: 54543bb423
am: 1077797c14

Change-Id: I7e47fe571f2be140a76437c30b44e74619840d32
2019-11-20 20:55:19 -08:00
Daniel Colascione
1077797c14 Merge changes from topic "property-handle"
am: 54543bb423

Change-Id: Id1ebdeca53c8705ce3cfab8db2e25cfebaa7f8a3
2019-11-20 20:47:44 -08:00
Daniel Colascione
54543bb423 Merge changes from topic "property-handle"
* changes:
  Add new SystemProperties.Handle interface
  Reimplement android.os.SystemProperties in terms of libc facilities
2019-11-21 04:38:03 +00:00
Roshan Pius
866e9111c5 RemoteException: Add @throws documentation
Bug: 144792553
Test: Compiles
Change-Id: I5a7464c2fe786b8398c5abdf43f62479de62b133
2019-11-20 14:47:51 -08:00
TreeHugger Robot
d29bd9b524 Merge "More precise argument name in isGuestUser" 2019-11-20 22:17:36 +00:00
Charles Munger
1b6300cdf2 Merge "Deprecate implicit Handler constructors" am: 560c3ebe1e am: 080ddd5dfd
am: 952dd95b46

Change-Id: Ia2de7c065ec5b8941087cd5c02eb9589f72c27b8
2019-11-19 19:56:42 -08:00
Bookatz
07758e3970 More precise argument name in isGuestUser
The 'int id' refers to a userId.

Test: treehugger
Change-Id: I9f5aad8acdc82e078227c5b39ffb108084531dec
2019-11-19 17:16:08 -08:00
Charles Munger
952dd95b46 Merge "Deprecate implicit Handler constructors" am: 560c3ebe1e
am: 080ddd5dfd

Change-Id: I26b31ede3abd2e2f2eb9747139861179d7e8e669
2019-11-19 16:19:58 -08:00
Charles Munger
080ddd5dfd Merge "Deprecate implicit Handler constructors"
am: 560c3ebe1e

Change-Id: I254f85c07743883c7d350a47750dad0745c47d52
2019-11-19 16:04:15 -08:00
Treehugger Robot
560c3ebe1e Merge "Deprecate implicit Handler constructors" 2019-11-19 23:28:12 +00:00
Hall Liu
ae63546d19 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
am: dab3711435

Change-Id: Ib75482a87545f7743f0049c8e51c354d2294c2af
2019-11-19 15:12:28 -08:00
Daniel Colascione
6e2cff7fa1 Add new SystemProperties.Handle interface
This new interface allows Java code to look up property values without
paying for the name->prop_info mapping and, in the case of looking up
scalars, without doing any allocation.

Bug: 140788621
Test: added tests
Test: atest FrameworksCoreSystemPropertiesTests
Change-Id: I46d12f62499e9e124fe9add588376d724b364d5d
2019-11-19 13:28:56 -08:00
Daniel Colascione
5e8ba5f05a Reimplement android.os.SystemProperties in terms of libc facilities
A subsequent CL will implement a new prop_info based properties API on
top of this CL.

Test: boots
Test: atest FrameworksCoreSystemPropertiesTests
Bug: 140788621
Change-Id: Id8dd02fff7b1c0815a27ab1dfdde1700447a414c
2019-11-19 13:27:53 -08:00
Hall Liu
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00
Artur Satayev
785d3a03b9 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Hall Liu
1d7a53da98 Merge changes from topic "mainline4"
* changes:
  Add new API for Telecom to send phone state
  Minor style correction to avoid merge conflict
  non-mainline telephony related AIDL refactor/decoupling
2019-11-18 22:31:27 +00:00
TreeHugger Robot
82865f85c1 Merge "Pipe featureId from app to noteOp for WallpaperMgr" 2019-11-18 19:01:35 +00:00
Jayachandran C
82e53b725a Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 337df70e17 am: 0a86ee3b3e
am: 78f84d5abe

Change-Id: I24e2c0c353f9e74a65c2e3d24a43338022b3efc4
2019-11-15 22:25:23 -08:00
Jayachandran C
78f84d5abe Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 337df70e17
am: 0a86ee3b3e

Change-Id: I2b1be68cd2eea8a4795a882933ed91dbf6ed83ee
2019-11-15 22:11:01 -08:00
Philip P. Moltmann
41ff0f6724 Pipe featureId from app to noteOp for WallpaperMgr
Test: atest CtsAppOpsTestCases(now includes canary test for this flow)
Bug: 136595429
Change-Id: I5f309646286cc4f3e080b87f482199fface67370
2019-11-15 20:09:13 -08:00
Jayachandran C
0a86ee3b3e Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 337df70e17

Change-Id: Iba519e0e11af591d93f9bca5e09aab6191240b39
2019-11-15 19:11:44 -08:00
Chen Xu
8eb62f9485 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
Merged-In: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-11-15 18:02:40 -08:00
Treehugger Robot
337df70e17 Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" 2019-11-16 01:36:08 +00:00
Jayachandran C
16dce22bf5 Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL changes to use getSystemService(TelephonyManager.class)

Bug: 140768340
Test: Build
Change-Id: I1fcf2c17456f126584df359547f64c07c168aa65
2019-11-15 15:46:43 -08:00
Adam Bookatz
b9a57da94c Merge "Introduce user types" 2019-11-15 19:15:37 +00:00
TreeHugger Robot
28c7e9c2ea Merge "Pipe through featureId from caller to permission checks in telephony code" 2019-11-15 18:18:02 +00:00
Charles Munger
80b1c4dcc8 Deprecate implicit Handler constructors
These have been the cause of bugs in the past, such as b/10150258,
because it's not always obvious or guaranteed that a calling thread will
always have a looper, or that it's actually the looper you want.
Specifying the looper explicitly, even if it's just Looper.myLooper(),
makes the code clearer. Since callback APIs generally should have
Executor variants added, it might be nice to also deprecate the
constructors or options that rely on the calling thread's looper, but
since I don't have an inventory of all those I'm starting with this.

Bug: 144042891
Test: No behavior changes
Change-Id: I0e7ba80d6b89a866ea715c790dd602ef728bf5bd
2019-11-15 10:17:54 -08:00
Robert Horvath
993e82eec7 Merge "Add setting to go to sleep after long user inactivity" 2019-11-15 15:05:15 +00:00
Howard Chen
018bd0278c Merge "Use the new gsid interface" am: c68c069db7 am: a0dc5e8e10
am: e3cf98d86c

Change-Id: I4b9387fdc227fae480c15da3512ce1354d243a6a
2019-11-15 04:20:27 -08:00
Howard Chen
e3cf98d86c Merge "Use the new gsid interface" am: c68c069db7
am: a0dc5e8e10

Change-Id: I1629d237b7dbd4c816b8a7f762722d7e20241e92
2019-11-15 04:12:08 -08:00
Howard Chen
a0dc5e8e10 Merge "Use the new gsid interface"
am: c68c069db7

Change-Id: I7d8d96c8de5089360302deef783cf617a94a7abc
2019-11-15 04:04:57 -08:00
Howard Chen
c68c069db7 Merge "Use the new gsid interface" 2019-11-15 11:05:16 +00:00
Jayachandran Chinnakkannu
aa720b6880 Merge "Remove usage of hidden API subscriptionManager.isSubscriptionVisible" am: 11202f37c3 am: d1002509c2
am: 3c843e062f

Change-Id: I3a5985f8c5fc04f65e12d2b6e85a5b770532d8fc
2019-11-15 00:20:52 -08:00
Jayachandran Chinnakkannu
3c843e062f Merge "Remove usage of hidden API subscriptionManager.isSubscriptionVisible" am: 11202f37c3
am: d1002509c2

Change-Id: I3f4d6d11ab56dcd4fc771a9db8da57ad3733d889
2019-11-15 00:12:45 -08:00
Jayachandran Chinnakkannu
d1002509c2 Merge "Remove usage of hidden API subscriptionManager.isSubscriptionVisible"
am: 11202f37c3

Change-Id: Ia2203ecdbc161fdcdbb7a250d8fb540ff1e57972
2019-11-15 00:05:11 -08:00
Jayachandran C
d17a4f3cf9 Remove usage of hidden API subscriptionManager.isSubscriptionVisible
This CL uses getGroupUuid() and isOpportunistic() instead to figure
out whether the subscription is visible or not

Bug: 140768340
Test: Manual
Change-Id: Id7215eabe4e6c47a057b747fdbb3027857f2f12c
2019-11-14 16:29:59 -08:00
Philip P. Moltmann
33692f734f Pipe through featureId from caller to permission checks in telephony
code

A featureId is only used by runtime permissions.

Test: atest FrameworksTelephonyTests CtsAppOpsTestCases
Bug: 136595429
Change-Id: I7ef41e8961e48d40e5685c4a521e83cb20953e48
2019-11-14 13:40:55 -08:00
Kevin Lau Fang
9b96d06072 Merge "Revert submission" 2019-11-14 20:31:09 +00:00
Kevin Lau Fang
01e16a5234 Revert submission
Reason for revert: This causes a boot issue on Taimen (b/144480969). It wasn't caught by TreeHugger due to Taimen tests being disabled due to a different lab outage (b/144350336).

Change-Id: Idc18b3531fda53257b85b81a869c00592eee83ce
2019-11-14 20:07:11 +00:00
Roshan Pius
97191d8c50 Merge "RemoteException: Mark rethrow* APIs public" 2019-11-14 18:37:26 +00:00
Makoto Onuki
f9b46001da Merge "Change FileDescriptor to PFD, per API guidelines." 2019-11-14 18:11:30 +00:00
Bookatz
029832a951 Introduce user types
Introduces the notion of 'user types' to UserManager.
Previously, users only had properties, set by UserInfo flags. We now
solidify some of these as formal user types. Each user must be of
precisely one user type. The configuration of each type is defined
in a UserTypeDetails object.

Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and
'normal' - that were set via UserInfo flags are now controlled via
UserType. Previous UserInfo flag methods for categorizing these are
still supported as long as no user of of more than one type.

If a user was (e.g.) previously both Guest and Demo, it is now
invalid and will be prevented from upgrading. This should not be a
problem in AOSP, where these 'types' were assumed mutually exclusive.

UserTypeDetails is sufficiently general to support future non-managed
profiles. To this end, the logic for specifying badges and their
colors/labels is contained by UserTypeDetails, and therefore
UserManager is responsible for delivering the corresponding badge
information.

Bug: 142151520

Test: added new test class UserManagerServiceUserTypeTest
Test: added additional tests in UserManagerServiceUserInfoTest
Test: added additional tests in UserManagerTest
Test: added additional tests in UserManagerServiceCreateProfileTest
Test: created UserTests to run the various pm.User*Test's

Test: atest \
  com.android.server.pm.UserTests \
  UserLifecycleTests \
  ManagedUserContentResolverTest \
  CtsDevicePolicyManagerTestCases \
  CtsMultiUserHostTestCases \
  com.android.server.devicepolicy.DevicePolicyManagerTest \
  com.android.server.am.UserControllerTest \
  CreateManagedProfileTaskTest

Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest
   using adb shell getprop persist.sys.max_profiles # for 5 and -1

Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
2019-11-14 10:00:50 -08:00
Roshan Pius
148e86e5a5 RemoteException: Mark rethrow* APIs public
Bug: 144435970
Test: Compiles
Change-Id: I361f5d27529c938fff42fdbabb63f7b87527a270
2019-11-14 16:53:43 +00:00
TreeHugger Robot
3950314b01 Merge "Java API for pulled atoms" 2019-11-13 23:20:27 +00:00
Dianne Hackborn
da0e5cef21 Merge "Rework platform version to hide codenames." 2019-11-13 23:16:03 +00:00
Makoto Onuki
b84721844b Change FileDescriptor to PFD, per API guidelines.
handleShellCommand() would be a system API, so we should use PFD instead,
per the API guidelines.

Bug: 142751512
Test: "adb shell cmd jobschduler help" -> show help
Test: "$ cmd jobscheduler run abc 123" -> shows "Package not found: abc / user 0"
Test: "adb shell cmd activity help" -> show help
Change-Id: I64b1e4c540db836cc4a46fed24a038b7077ecb63
2019-11-13 14:59:46 -08:00
Tej Singh
5918429fa2 Java API for pulled atoms
This creates a java API for registering pullers. Will implement the
statsd side in a follow up CL.

Test: builds, boots
Change-Id: Ib6735984297ce3148839a6370a3c15b2a585baf5
2019-11-13 13:22:27 -08:00