Commit Graph

16774 Commits

Author SHA1 Message Date
Winson Chung
afbe32079a Merge "Clean up remote animation definitions when activity is destroyed" 2019-12-20 17:52:36 +00:00
Lucas Dupin
5465b18518 Merge "Enable WCG support for ImageWallpaper" 2019-12-20 17:28:49 +00:00
Mark Chien
ebc76bc2e9 Merge "[Tether13] Move TetheringManager into framework" 2019-12-20 05:04:08 +00:00
Etan Cohen
195a4f72c6 Merge "[WIFICOND] Formalize the wificond AIDL interface" 2019-12-20 03:58:10 +00:00
TreeHugger Robot
741a368bb0 Merge "Move ImsManager registery to TelephonyFrameworkInitializer" 2019-12-20 03:54:42 +00:00
Philip P. Moltmann
baa2cea8c3 Merge changes from topic "RefactorAppOpAccessCounters"
* changes:
  Encapusale running app-ops in an object
  Refactor app-op access/reject counters
2019-12-20 03:04:55 +00:00
markchien
ae8aa646dc [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
Jayachandran C
e80ab40f70 Move ImsManager registery to TelephonyFrameworkInitializer
Bug: 140768340
Test: Build
Change-Id: I299fea193a157ce4c4b073a4b804739c7e4ba400
2019-12-19 16:13:46 -08:00
Philip P. Moltmann
6c6403e395 Encapusale running app-ops in an object
... instead of having some counters.

Also:
- No need to store token/clientId in system server
- startOP/finishOp does not require a featureId, null is ok.

Fixes: 144997947
Change-Id: Ic955cb2686f3d53b957d816397e978a80cf4d29b
2019-12-19 15:14:57 -08:00
Winson Chung
10fc25dadd Clean up remote animation definitions when activity is destroyed
- Remove the remote animation definition when the associated process dies
- Also expose method to unregister any registered animation defs

Bug: 139137636
Test: Kill launcher, ensure the remote animation ref is removed
Change-Id: Ia38d037397703221c17c8258ec1a245055d5896d
2019-12-19 15:01:50 -08:00
TreeHugger Robot
f8a45ea20d Merge "Add R scoped storage app-ops" 2019-12-19 22:56:54 +00:00
Etan Cohen
5abc6d980d [WIFICOND] Formalize the wificond AIDL interface
The wificond daemon provides an interface for the framework to interact
with the operating system when managing Wi-Fi. Since wificond is outside
the mainline module, the AIDL interface has to be formalized as an API
surface.

Bug: 140062898
Test: atest android.net.wifi
Test: atest com.android.server.wifi.aware
Test: (CTS) atest android.net.wifi.cts
Test: scan, association, SoftAP operations manually tested, kill wificond
Change-Id: Iee0fef6a454fdd84b1d0c59516d4746ddc2a4ce5
2019-12-19 11:57:04 -08:00
Joshua Mccloskey
0cf243eafd Merge "Add builder method to check DevicePolicyManager" 2019-12-19 18:21:44 +00:00
TreeHugger Robot
f0862553d7 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 08:04:35 +00:00
TreeHugger Robot
87bb84da38 Merge "Add query functionalities to query all of crates" 2019-12-19 07:16:37 +00:00
Philip P. Moltmann
49bd9e1e3e Refactor app-op access/reject counters
The last system was too confusing and caused bugs. The new system is
easier to understand.

This still uses the key which is the combination of uidState and
op-flags. I.e. now we collect access + rejection events for the
cross-product of
- package (parameter to noteOp)
- featureId (parameter to noteOp)
- op (parameter to noteOp)
- uidState of the package the noteOp was called
- opFlags (based on which app called the noteOp and how trusted this app
was)

uidState + opFlags are usually combined into the "key" variable.

This also unifies the APIs in Op*Entry to be the same of each data-field
of an op-entry.

Note: This temporarily breaks
com.android.server.appop.AppOpsActiveWatcherTest#testIsRunning as active
ops are not yet reported. This needs to be fixed by a follow up change.

Bug: 144997947
Test: atest --test-mapping services/core/java/com/android/server/appop/
Change-Id: I9844f9886b1c032d01de51bbb46267e3244b6da6
2019-12-18 18:03:46 -08:00
joshmccloskey
15c0a441c9 Add builder method to check DevicePolicyManager
This is a hidden method and BiometricService will enforce
that 3rd party applications cannot use it.

Fixes: 142966163
Test: Verified disabling fingerprint will not allow
the user to unlock work apps with fingerprint. (But can use fingeprint
within apps.)
Test: Verified disabling face and/or iris on a fingerprint device will
continue to
allow the user to unlock work apps with fingerprint.
Test: Verified disabling face on a face authentication device
will not allow the user to unlock work apps with face authentication.
(But can use face
authentication within apps.)
Test: Verified disabling fingerprint and/or iris on a face
authentication device will continue to allow the user to unlock work
apps with face authentication.

Change-Id: I21ae00d0993d78a641cb8c5d8af2dd02be0b4a21
2019-12-18 16:12:36 -08:00
TreeHugger Robot
bce6abd2b7 Merge "Fix TaskDescription's copy method" 2019-12-18 22:26:49 +00:00
Mark Renouf
3095609f4e Merge "Expose snapshotTask for use in WindowManager" 2019-12-18 21:34:52 +00:00
Mehdi Alizadeh
c5e29907c4 Fix TaskDescription's copy method
copyFromPreserveHiddenFields should only copy hidden fields if the field
is set in the other TaskDescription.

Bug: 144348683
Test: atest FrameworksCoreTests:ActivityManagerTest

Change-Id: I8475e82b7aeb0b7fc6a8cc0de88b926a847c7ac2
2019-12-18 11:47:37 -08:00
Mark Renouf
98ba8e6905 Expose snapshotTask for use in WindowManager
Exposes snapshotTask which will immediately take a task snapshot
instead of checking the cache. Also adds an overload which allows
specifying scaleRatio and pixelFormat

Change-Id: I0ee3d90ae0ff508e10a8b24bd47d593f28ab1ea8
2019-12-18 14:05:41 -05:00
Philip P. Moltmann
b43dfe3007 Add R scoped storage app-ops
Test: Booted
Bug: 136219229
Change-Id: I52abec0b7ae08b8bc3e22f875c92cfa8f275ece5
2019-12-18 10:49:33 -08:00
Jeffrey Huang
18e52123ce Merge "Create statsmanager service" 2019-12-18 18:20:25 +00:00
Artur Satayev
c895b1b450 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
2019-12-18 16:37:37 +00:00
Felka Chang
71e3efed54 Add query functionalities to query all of crates
Once the application called Context.getCrateDir(), the crates root
directory is also created. The application can mkdir directory under the
crates root. Each child directory in crates root is one crate.

Each crate information is descibed by CrateInfo. CrateInfo contains
the following information.
* Label:
    It is used to display text to the users.
    Default is the folder name.
* Expiration:
    When the system needs more space. The system will clean the files
    in the crates according to the expired or not.
    Default is 0.

Test: atest \
    CtsOsTestCases:android.os.storage.cts.CrateInfoTest \
    CtsOsTestCases:android.os.storage.cts.StorageCrateTest \
    CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest

Bug: 141660526

Change-Id: Icdc8123c481ef7c5b4fd68ffcfd334ffbfc9d655
2019-12-18 23:04:15 +08:00
Daulet Zhanguzin
a703487df6 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I69e57498b89b2822eed09bb2688a3638c8903a7c
2019-12-18 14:04:40 +00:00
TreeHugger Robot
5c47ee6c1a Merge "add IncrementalManagerService to system server" 2019-12-18 04:18:30 +00:00
Felka Chang
0384736c1d Merge "Add the root of crates by Context.getCrateDir" 2019-12-18 03:44:30 +00:00
Jeff Sharkey
04b4ba1e15 Shuffling to prepare for MediaProvider APEX.
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX.  This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:

-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().

Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
2019-12-18 01:35:46 +00:00
Jeffrey Huang
8c1ae5aef8 Create statsmanager service
Bug: 146074170
Test: Manual
Change-Id: Ia96f2df24e660fe3293fb2e873e9050a55398cee
2019-12-17 16:54:11 -08:00
Songchun Fan
43f18ea45a add IncrementalManagerService to system server
Test: boots
Change-Id: Ib704e986535ca422e82784b985ff7ef1acc68277
2019-12-17 20:58:48 +00:00
TreeHugger Robot
7623a52a36 Merge "Update user restriction APIs to be called on parent instance" 2019-12-17 18:19:08 +00:00
TreeHugger Robot
5f97823473 Merge "Expose request data to InstantAppResolverService" 2019-12-17 17:16:27 +00:00
Ahan Wu
287d8283f4 Enable WCG support for ImageWallpaper
Check if the system wallpaper is wcg and request a wcg surface if yes.
Also take multiple display case into account.

Bug: 136338733
Bug: 74008618
Test: Manually
Change-Id: I830dca97be61401453dffb892a7beb8afc0a32f4
2019-12-17 16:28:14 +08:00
Winson Chung
5de9140f92 Merge "Remove a few hard coded references to SystemUI in fw/base/services" 2019-12-17 05:41:48 +00:00
Paul Chang
1ed7550c15 Merge "Add getBugreportWhitelistedPackages() in ActivityManagerService" 2019-12-17 03:20:16 +00:00
Automerger Merge Worker
960a8cf90a Merge "[RCS] Add IMS service into system service registry" am: 6a1d13f58e am: a962a65575 am: fb829df378
Change-Id: Ic52862b93399069b4792df8fe924ff152bef2326
2019-12-17 00:24:19 +00:00
Automerger Merge Worker
fb829df378 Merge "[RCS] Add IMS service into system service registry" am: 6a1d13f58e am: a962a65575
Change-Id: I61549d3d4da7ffdf5f2d497e52cd7a2fdd0f2c05
2019-12-17 00:10:51 +00:00
James Lin
6a1d13f58e Merge "[RCS] Add IMS service into system service registry" 2019-12-16 23:28:44 +00:00
Automerger Merge Worker
053c87de7d Merge "Expose the onCarrierPrivilegedAppsChanged as SystemApi" am: 58ea8819f5 am: c825f758e5
Change-Id: I5758fa60f50c72fcf7b51e564e39cf5f9c821d23
2019-12-16 19:02:24 +00:00
Treehugger Robot
58ea8819f5 Merge "Expose the onCarrierPrivilegedAppsChanged as SystemApi" 2019-12-16 18:40:50 +00:00
Alex Johnston
5141938490 Update user restriction APIs to be called on parent instance
In the new COPE mode, some user restrictions should be applied globally
when called by the Work Profile PO.

Previously, the APIs addUserRestriction, clearUserRestriction and
getUserRestrictions did not support explicitly querying the parent
profile. This CL allows the WP DPC to now call these methods,
allowing the WP DPC to apply some restrictions globally.

This CL also introduces the enforcingUserId parameter to
setDevicePolicyUserRestriction. This new paramter is used as the
key of mDevicePolicyGlobalUserRestrictions and
mDevicePolicyLocalUserRestrictions.

Bug: 138709470
Test: Manual testing with testdpc
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.UserRestrictionsTest
      atest com.android.server.pm.UserRestrictionsUtilsTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionsSetOnParentAreNotPersisted
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport

Change-Id: Idfafd100bfcb250998a8628aba4cc378f1fc2c84
2019-12-16 16:39:37 +00:00
Alex Johnston
d0343a257b Merge "Add new APIs setAutoTimeZone and getAutoTimeZone" 2019-12-16 15:47:15 +00:00
Alex Johnston
a44d7296a1 Add new APIs setAutoTimeZone and getAutoTimeZone
* Added new API methods setAutoTimeZone and getAutoTimeZone.
* DPCs are recommended to combine these new APIs together with the DISALLOW_CONFIG_DATE_TIME
  restriction to prevent the user from changing auto time zone settings.
* The new methods can also be called by the WP PO (COPE mode).

Bug: 138709470
Test: Manual testing with testdpc and the set auto time zone toggle
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testSetAutoTimeZone
      atest com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled

Change-Id: I841d31f76a848e9679d2d9087426e1d5bb7efd1d
2019-12-16 14:57:50 +00:00
Tiger Huang
3a70dd663e Merge "Window Manager Flag Migration (7/n)" 2019-12-16 14:52:28 +00:00
TreeHugger Robot
b6314a1a1c Merge "Update Documentation For ACTION_ADMIN_POLICY_COMPLIANCE" 2019-12-16 10:52:29 +00:00
Tiger Huang
4a7835ffb6 Window Manager Flag Migration (7/n)
Introduce new APIs in Window/WindowManager.LayoutParams for developers
to decide which types of insets at which side a window should avoid:

    setFitWindowInsetsTypes(@InsetsType int types)
    setFitWindowInsetsSides(@InsetsSide int sides)
    setFitIgnoreVisibility(boolean ignore)

The existing logic in DisplayPolicy.layoutWindowLw uses combinations of
window types, window flags, and system UI flags to decide what frames a
window should have, which is very complex, difficult to maintain, and
should be replaced with the new APIs.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests
            TaskSnapshotSurfaceTest
Change-Id: I06ddc9d0d2887ba4ded7bb8adbf9c9c0da4bf7b4
2019-12-16 17:08:21 +08:00
TreeHugger Robot
83a8a3bcfd Merge "Add task snapshot for home task" 2019-12-16 08:42:31 +00:00
TreeHugger Robot
97a17d5658 Merge "Merge ActivityDisplay and DisplayContent into one class (77/n)" 2019-12-16 02:12:42 +00:00
Felka Chang
0d824d4161 Add the root of crates by Context.getCrateDir
Context.getCrateDir() creates and returns the File for the
root of the crates for the application context. Any child directories
under the crates root in Context.getDataFile() is called
the crate directory.

For example:
  /data/user/0/com.exmaple.app/crates/IAmCratedFolder/decentFiles
  /data/user/0/com.exmaple.app/crates/IAmCratedFolder/decentDirs

Context.getCrateDir return the crate dir
  --> /data/user/0/com.exmaple.app/crates/IAmCratedFolder

The crate dir
  --> IAmCratedFolder
The decent directories or files are not crated folders
  --> decentFiles, decentDirs

Test: atest CtsOsTestCases:android.os.storage.cts.StorageCrateTest
Bug: 141660526
Change-Id: If3ec1e121fb8f72bab5571d6190378e3ae208832
2019-12-16 09:52:12 +08:00