Commit Graph

16747 Commits

Author SHA1 Message Date
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
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
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
Etan Cohen
5b4cdd863e Merge "Wificond: transfer implementation to android.net.wifi" 2019-12-14 15:04:14 +00:00
Automerger Merge Worker
560eac460c Merge "remove API RoleManager.getFinancialSms" am: c0fa362e1b am: 679980cbca
Change-Id: I6f5db398a52a01b3fcc5b7a672d39f92dcd93479
2019-12-14 08:19:38 +00:00
Chen Xu
435d1c1a53 remove API RoleManager.getFinancialSms
getFinancialSms is not functional and not used today, thus
remove it to avoid future confusion

Bug: 138745655
Bug: 140908357
Test: atest android.telephony.cts.SmsManagerTest
Change-Id: Ib57d0fc189b6c894227894ee02b592f7ee46f22f
(cherry picked from commit d6b2673181)
Merged-in: Ib57d0fc189b6c894227894ee02b592f7ee46f22f
2019-12-13 20:48:41 -08:00
Robin Lee
75ba497beb Merge "Revert submission" 2019-12-14 03:06:25 +00:00
Hansong Zhang
b62b7b724d Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test

Reason for revert: Break tests
Bug: 146198238
Change-Id: I65060ca389bf3ae1f107552ca828bfc1e7baa7c1
2019-12-13 22:10:01 +00:00
Winson Chung
f2b41770d4 Remove a few hard coded references to SystemUI in fw/base/services
Bug: 143775123
Test: atest ScreenshotHelperTest
Test: atest AlarmManagerTest
Change-Id: I2fefe2968e23bc2d06aa52266c2eeeb90f4733ee
2019-12-13 13:59:31 -08:00
Makoto Onuki
b03866ee72 Merge "System APIs for telephony to expose/obtain binder services" 2019-12-13 20:02:36 +00:00
Etan Cohen
73450f2004 Wificond: transfer implementation to android.net.wifi
Move implementation of wificond to frameworks/base (android.net.wifi)
in prepration for making into a public API (which will be a wrapper
around the AIDL).

Bug: 140062898
Test: atest com.android.server.wifi
Test: atest android.net.wifi
Test: associates, soft AP client information received correctly
Change-Id: I3c5ede95d0421a1e00078e0316e9a2e751156f3e
2019-12-13 11:18:54 -08:00
yinxu
4631f7231f Expose the onCarrierPrivilegedAppsChanged as SystemApi
(cherry picked from commit 0016eefe11)

Bug: 145944877
Test: N/A
Merged-in: I0fd32f38587ae46d1d170bc8353d23bbc9928cd0
Change-Id: I0fd32f38587ae46d1d170bc8353d23bbc9928cd0
2019-12-13 11:01:43 -08:00
Ying Xu
3ddd328c9a Merge "Expose the onCarrierPrivilegedAppsChanged as SystemApi" 2019-12-13 18:58:13 +00:00
Carmen Agimof
79dc7ed61e Merge "Do not try to do a restore at install if the user is not ready for backup." 2019-12-13 16:41:21 +00:00
Mark Renouf
364568f6f7 Merge "Mark TaskEmbedder#setListener as public" 2019-12-13 15:59:07 +00:00
Eric Sandness
09df2739d7 Update Documentation For ACTION_ADMIN_POLICY_COMPLIANCE
Add additional detail about the scenarios in which this action may be
sent to the administrator.

Bug: 142797275
Test: Documentation change only
Change-Id: I49be7e4f2b28bbcce4cb373ad98d1ac7f3380db9
2019-12-13 14:20:57 +00:00
Galia Peycheva
a4aff1e1df Merge "Add minimal post processing API to framework" 2019-12-13 10:09:00 +00:00
Louis Chang
677921fc25 Merge ActivityDisplay and DisplayContent into one class (77/n)
Bug: 80414790
Test: Existing tests pass
Change-Id: I1924af0d353406ad950b9758e19384a579ad1426
2019-12-13 17:51:46 +08:00
Riddle Hsu
440f88b43a Add task snapshot for home task
The real home activity usually takes longer time than a
snapshot to complete drawing. Especially when unlocking
to home, the duration becomes more noticeable.

This CL enables snapshot of home task when turning screen
off. And because the snapshot is only used when entering
home from a sleeping state, the snapshot will be removed
once it is used.

Also provide a method for home activity to remove its
snapshot while the content of home activity has significant
change after taking the snapshot.

Bug: 140811348
Test: 1. Set an unlock method that doesn't need to show
         lockscreen when unlocking.
      2. Turn off screen while home is on top.
      3. Unlock device to enter home.
      4. Check the duration of trace "screenTurningOn".

Change-Id: Ic516cdcfd84ca4a85e19798537f9f5a85077392b
2019-12-13 16:59:52 +08:00
Songchun Fan
6cde9d9ada add DataLoaderManagerService to system server and register to system service
Test: boots
Change-Id: I9cba99327da012b6f6de898ad1c5cc7cf11d1d31
2019-12-13 00:07:17 +00:00
James.cf Lin
304a66a3f0 [RCS] Add IMS service into system service registry
Bug: 139260826
Test: Manual
Change-Id: Ie8625706bb9b18c3a9d1a55d17d3c1c045eb104e
2019-12-13 07:41:02 +08:00
Jeffrey Huang
cd5c5990d2 Merge "Rename IStatsManager to IStatsd" 2019-12-12 21:47:47 +00:00
Zimuzo Ezeozue
fe30cb6f17 Merge "Revert "Remove the rename() interceptor"" 2019-12-12 20:20:03 +00:00
TreeHugger Robot
6137064d41 Merge "Add admin consent cross-profile package APIs" 2019-12-12 19:53:16 +00:00
Carmen Agimof
4e55418864 Do not try to do a restore at install if the user is not ready for
backup.

Bug: 144155744

This solves a bug which makes staged installs hang. This is
happening because when installing, the PackageManager is waiting for a response to be sent back from
the BackupManagerService after it finishes restoring. In the case of staged installs which happen at boot,
isUserReadyForBackup is false, so the method does nothing and the
PackageManager keeps on waiting on a response.

Test: 1) atest RunBackupFrameworksServicesRoboTests and atest AutoRestoreHostSideTest
2) Manual:
   - Applied ag/9722795
   - run `atest com.android.tests.rollback.host.StagedRollbackTest#testStagedInstallHang`
   - The log file doesn't contain any "Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in handler on main thread (main)".

Change-Id: I294c309b0c7e5a9e12bdbd0c3fc4946767f91cee
2019-12-12 16:29:00 +00:00
Automerger Merge Worker
8dfaccfcaa Merge "Handle multiple phoneIds in time detection" am: 51c61e8bdb am: 1602545f28 am: 161d1764c8
Change-Id: I49c060f1369d382f82d91f729d8fd099d4a217d4
2019-12-12 12:47:51 +00:00
Zim
e59cb735f3 Revert "Remove the rename() interceptor"
This reverts I0f9ac456104759887c0410fe64acc32cab19b62b

And adds an additional check to only fallback handle the EXDEV
from paths on /storage

We are bringing back the interceptor because the implementation of
scoped storage in R uses a FUSE filesystem mounted on /sdcard with an
sdcardfs filesystem mounted on /sdcard/Android/<package> (for now,
just /sdcard/Android in Ic17a5751b5a94846ee565ff935644a078044ab06)

Test: atest
android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageRename
with FUSE enabled passes
Bug: 135341433
Change-Id: I7876bfe00890f24559576f260ba456afb07e9482
2019-12-12 12:40:51 +00:00
Automerger Merge Worker
161d1764c8 Merge "Handle multiple phoneIds in time detection" am: 51c61e8bdb am: 1602545f28
Change-Id: I75551184a50e7bfe9cebd9b649bfd71acf5ac0f7
2019-12-12 12:27:01 +00:00
Paul Chang
c415351d3d Add getBugreportWhitelistedPackages() in ActivityManagerService
- add getBugreportWhitelistedPackages() in ActivityManagerService to let Settings Bug report handler access SystemConfig.getBugreportWhitelistedPackages() because SystemConfig should generally only be accessed by the system_server process.

Bug: 143017534
Test: Build pass
Change-Id: I8c9fe7cad8ef489b2c95a3f1052ef239b9c2c0c8
2019-12-12 12:09:18 +00:00
Jeffrey Huang
161c075d99 Rename IStatsManager to IStatsd
Bug: 146075178
Test: CTS/GTS tests
Change-Id: I235944758b8cc24a0df85b54d7441e7e8d0a8bbc
2019-12-11 15:49:03 -08:00