Commit Graph

16757 Commits

Author SHA1 Message Date
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
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
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
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