Commit Graph

17546 Commits

Author SHA1 Message Date
Yvonne Jiang
20cf3de04c Merge "Secondary Lockscreen API: improve documentation and rename onSurfaceReady method." into rvc-dev 2020-03-20 19:43:13 +00:00
TreeHugger Robot
25098aa147 Merge "Unrestrict updated buggy apps." into rvc-dev 2020-03-20 18:59:12 +00:00
Ryan Mitchell
b0544a733c Merge changes from topic "res_loader_dir" into rvc-dev
* changes:
  Allow using loaders on non-RM Resources instances
  Move AssetsProvider to native layer
  Add ResourcesProvider.loadFromDirectory
  Refactor tests for ApkAsset loading APIs
  Refactor ApkAsset loading APIs
  Fix bugprone-use-after-move warnings
  Fix bugprone-use-after-move warnings
2020-03-20 18:16:30 +00:00
Mady Mellor
5e2ddf0391 Merge "Bubbles API council feedback" into rvc-dev 2020-03-20 17:17:36 +00:00
Yvonne Jiang
8345da3a97 Secondary Lockscreen API: improve documentation and rename onSurfaceReady method.
- Documentation clarity and method rename per API review feedback.
- Specifying in documentation and implementation that the implementing service must be exported by the Profile Owner.

Bug: 150866056
Bug: 136085151
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: I58175bd6cf8936f5b1267625ca15b4f9c57f4144
2020-03-20 17:06:24 +00:00
TreeHugger Robot
7924f675e1 Merge "Address API Review for setProfileOwnerCanAccessDeviceIds" into rvc-dev 2020-03-20 15:35:09 +00:00
Eran Messeri
17429b5394 Address API Review for setProfileOwnerCanAccessDeviceIds
Per API council's suggestion, make setProfileOwnerCanAccessDeviceIds
throw only if the API level of the calling app is R and above, and
call markProfileOwnerOnOrganizationOwnedDevice if called from apps
targeting Q and below.

This code path is extremely unlikely to ever trigger because this method
was marked as SystemApi unintentionally, and could only be called during
the provisioning flow.

Test: Manual
Bug: 150957726
Change-Id: I4215c7dce642c9e3ff00183f43867802507911ca
2020-03-20 13:33:41 +00:00
Ryan Mitchell
39cacf2de7 Allow using loaders on non-RM Resources instances
Currently there is a limitation where ResourcesLoaders cannot be  used
on Resources object not created through ResourcesManager. This change
creates an update handler for Resources objects that are not registered
with ResourcesManager.

The handler changes the loaders on the asset manager owned by the
Resources instance.

Bug: 151666644
Test: atest ResourceLoaderValuesTest
Change-Id: I5a89f686386bdb088dc964014e7becc0c2b4770f
2020-03-19 18:33:55 -07:00
Ryan Mitchell
ef40d2e832 Refactor ApkAsset loading APIs
To add the partner requested ResourcesProvider#loadFromDir APIs, this
change adds format type integer that allows us to reduce the number of
ApkAssets loading overrides.

This change also adds hidden offset and length based ResourcesProvider
APIs that could not make R.

Bug: 142716192
Test: atest FrameworksResourceLoaderTests
Change-Id: I926fde257cae701901dcd4ca408024feae8c90a6
Merged-In: I926fde257cae701901dcd4ca408024feae8c90a6
2020-03-19 18:33:55 -07:00
Grace Jia
886efd654f Merge "Revert add isProfileForeground SystemApi in ActivityManager." into rvc-dev 2020-03-19 23:27:03 +00:00
Hall Liu
2227afaacb Merge "Rename NotificationChannel#setBlockableSystem" into rvc-dev 2020-03-19 21:06:53 +00:00
Winson Chiu
5051748f22 Merge "Convert InstantAppRequestInfo to getters and add @MainThread" into rvc-dev 2020-03-19 21:02:36 +00:00
Kweku Adams
917f8a45dc Unrestrict updated buggy apps.
If an app is put into the RESTRICTED bucket because the system thinks
it's buggy, we can bring it out of the bucket when the app is updated,
assuming that the bug is fixed in the new version. If there are other
reasons that the app is restricted, then we don't bring it out.

Bug: 149507105
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: Ib66fa5363ad763625e9a4aa93c8a44851e9259e8
2020-03-19 10:27:02 -07:00
Mady Mellor
aa9ce17fa2 Bubbles API council feedback
* un-deprecate getIntent/getIcon/setIntent/setIcon
* deprecate createIntentBubble & createShortcutBubble and make them
  constructor methods & deprecate existing constructor
* clarify when intent / icon / shortcut id will be null or not
* use NPE instead of illegal argument exception
* use illegal state exception when using setIcon/setIntent on a builder
  created with shortcut method

* updates usages of getBubbleIntent/getBubbleIcon to be getIntent/getIcon
* updates builder constructor usages as well

Fixes: 149911930
Test: treehugger
Change-Id: Ic85a475d463cb22cea7d7939fea4cf72465491b4
2020-03-19 10:21:34 -07:00
Steve Elliott
a7aededa7d Merge "Populate conversation notifs from shortcut info" into rvc-dev 2020-03-19 15:18:33 +00:00
Neil Fuller
278c70832b Merge "Add command line support for testing tz detection" into rvc-dev 2020-03-19 11:17:15 +00:00
Winson Chung
c2a7be7e3c Merge "Update some policy around multi-window windowing mode" into rvc-dev 2020-03-19 03:40:35 +00:00
Remi NGUYEN VAN
54a6565668 Merge changes from topic "netstack_api_review" into rvc-dev
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-19 01:21:29 +00:00
Alex Kershaw
78ce4ab540 Merge "Clarify setPackagesSuspended javadoc" into rvc-dev 2020-03-18 22:21:57 +00:00
Anthony Stange
2f89fa5737 Merge "Revert "Unrestrict updated buggy apps."" into rvc-dev 2020-03-18 21:36:21 +00:00
Jing Ji
6ef8f5e1ab Merge "Add support to provide app its own ANR stack trace" into rvc-dev 2020-03-18 21:30:44 +00:00
Anthony Stange
6801cc3494 Revert "Unrestrict updated buggy apps."
This reverts commit 75e1da7beb.

Reason for revert: Caused build breakage - b/10429173

Change-Id: I617c44aa846c1cb561cd065c953574599c593a1b
2020-03-18 21:27:43 +00:00
Eugene Susla
fea313038b Merge "Expose OPSTR_AUTO_REVOKE_MANAGED_BY_INSTALLER as @SystemApi" into rvc-dev 2020-03-18 19:56:09 +00:00
Amit Mahajan
0ed16d7b4b Merge changes from topic "Remove telephony protection level" into rvc-dev
* changes:
  Remove telephony protection level.
  Revert "Allowed telephony to bind network service"
  Revert "add telephony role to some permissions needed by telephony module"
2020-03-18 19:22:36 +00:00
Winson Chung
8a16890698 Update some policy around multi-window windowing mode
- Allow SysUI to start task in always-on-top mode to ensure
  visibility and to allow SysUI to control the visibility using
  the WCT setHidden call.
- Expose unregisterTaskOrganizer call for SysUI
- Skip dispatching status/nav bar insets for always on top mw
  tasks. Since they are effectively floating, it doesn't make
  sense for us to send bar insets
- Fix issue with preferred windowing mode being referenced too
  early (before computeLaunchParams), and apply the windowing
  mode to the root task when it is brought forward

Bug: 151392361
Test: atest WmTests:ActivityOptionsTest
Test: atest InsetsStateControllerTest
Change-Id: Ia3d8a369c902928e8de51a6b7479b10848ebe44a
2020-03-18 11:44:34 -07:00
Rubin Xu
243c57f079 Merge "Replace COMMON_CRITERIA_MODE setting with getter API" into rvc-dev 2020-03-18 18:42:28 +00:00
Rubin Xu
763285e574 Merge "Do not crash if attempt to launch app from locked profile" into rvc-dev 2020-03-18 18:36:06 +00:00
Kweku Adams
87962f9d0a Merge "Unrestrict updated buggy apps." into rvc-dev 2020-03-18 18:01:04 +00:00
Jing Ji
56006fd5bc Add support to provide app its own ANR stack trace
...If it was killed due to ANR.

Also add support to set a cookie which could be
included into the app kill reason.

Bug: 148413462
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I79d9955d8f5c5f42074f0e1567119b41fc486d50
2020-03-18 10:30:43 -07:00
Steve Elliott
46bb2a10a2 Populate conversation notifs from shortcut info
Fixes: 151330577
Test: manual
Change-Id: Ib7b7037155fc1891935fcbe89ced9f1639378ba0
2020-03-18 13:23:51 -04:00
Alex Kershaw
d7fae7fede Clarify setPackagesSuspended javadoc
Clarify that some packages cannot be suspended.

Fixes: 144411650
Test: Javadoc change only; not applicable
Change-Id: Ia89ad60c5445b3bf2a355eb49ea645f4962a1212
2020-03-18 13:23:40 +00:00
Rubin Xu
6c113b6d07 Do not crash if attempt to launch app from locked profile
Handle the case of a locked profile with unified challenge as a
first-class state: attempts to open work apps in this state will
result in a confirm credential operation, instead of letting the
app launch directly which will result in crashes.

Test: atest ActivityStartInterceptorTest
Test: 1. Turn off a work profile with unified challenge.
      2. Manually turn on profile (without unlocking), run
      adb shell  am broadcast -a com.android.server.pm.DISABLE_QUIET_MODE_AFTER_UNLOCK \
          --ei android.intent.extra.USER_ID 10
      3. Attempt to launch a work app.
Bug: 72178550
Bug: 138560482
Change-Id: I85f796fe3edeb3c1d6c0dd6d2143d2f44ac22ea7
2020-03-18 12:20:55 +00:00
Remi NGUYEN VAN
53f0193fca Remove NETWORK_STACK_SERVICE constant
Instead, have a dedicated method in android.net.NetworkStack allowing to
fetch the stable AIDL token for the service.

This avoids returning IBinder from getSystemService, as getSystemService
should generally return manager classes.

Test: atest FrameworksNetTests NetworkStackTests
Fixes: 151243982
Change-Id: I58a6e1f27aff052050197d1901f43a98d7aa1167
2020-03-18 18:29:30 +09:00
Andrii Kulian
10e5f36550 Merge "Don't override activity display adjustments with app config" into rvc-dev 2020-03-18 06:08:18 +00:00
Junyu Lai
3a6a98f5bb Merge changes from topics "am-ad04c8ad832c4674be35bfc5fe4280dd-rvc-dev", "sp21-api-review-feedback", "sp25-networkstats-rename" into rvc-dev
* changes:
  [SP25] Rename functions that add Entry conditionally
  [SP24] Rename functions that add Entry unconditionally
  [SP23] Address misc API review comment about NetworkStats
  [SP21] Address comments for API council review about aosp/1172143
  [SP20] Check signature permission when accessing network stats provider
2020-03-17 23:11:34 +00:00
Shuo Qian
0d4f4e464e Merge "Hide several System APIs" into rvc-dev 2020-03-17 23:09:31 +00:00
Beverly Tai
552d491f63 Merge "Give mConsolidatedPolicy a default value" into rvc-dev 2020-03-17 21:19:25 +00:00
Winson Chung
042f6dae6e Merge "Update comment for deprecated method" into rvc-dev 2020-03-17 21:01:17 +00:00
Kweku Adams
75e1da7beb Unrestrict updated buggy apps.
If an app is put into the RESTRICTED bucket because the system thinks
it's buggy, we can bring it out of the bucket when the app is updated,
assuming that the bug is fixed in the new version. If there are other
reasons that the app is restricted, then we don't bring it out.

Bug: 149507105
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: Ie4538dde3b367d32f4260e8301afa0556b845b2a
2020-03-17 12:58:34 -07:00
Xianyuan Jia
18ee16a6d5 Merge "Revert "Enabled Content Capture in Service"" into rvc-dev 2020-03-17 18:55:46 +00:00
Xianyuan Jia
d3f9626e04 Revert "Enabled Content Capture in Service"
This reverts commit 988f7e0cd4.

Reason for revert: Droidcop: Potential culprit for Bug b/151715362 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 151715362
Change-Id: I882d6f1a4c43f5331aa1e205a858d20f18ecf72d
2020-03-17 18:39:46 +00:00
junyulai
ea8f185b52 [SP21] Address comments for API council review about aosp/1172143
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest
Test: atest TetheringTests NetworkStackTests
Test: m doc-comment-check-docs
Fix: 148552904

Change-Id: I141393f229e772d2eb9f7c156849e379bd71b845
Merged-In: I141393f229e772d2eb9f7c156849e379bd71b845
(cherry picked from aosp/1253717)
2020-03-17 14:57:59 +00:00
Automerger Merge Worker
af8d85fa0c [SP20] Check signature permission when accessing network stats provider
Currently, registerNetworkStatsProvider requires the
UPDATE_DEVICE_STATS permission. This is a privileged permission
so it can be granted to preinstalled apps. Thus, apps like
GmsCore, or preinstalled apps will be able to update network stats.

This change checks for a new permission that would only allow
signature apps to declare that. Also check
MAINLINE_NETWORK_STACK permission to allow NetworkStack process
to use it.

Test: adb shell dumpsys netstats
Test: atest FrameworksNetTests
Bug: 149652079

Change-Id: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b
(cherry picked from commit e9e8d8f9ff)
2020-03-17 14:53:33 +00:00
Beverly
430b71a149 Give mConsolidatedPolicy a default value
- To align mConsolidatedPolicy with mConfig
- Update documentation for NotificationManager#getConsolidatedPolicy

Test: atest SystemUITests
Fixes: 151077630
Change-Id: I9a769ac6907c7cf19e00ca9134183e10f9f864f5
2020-03-17 10:35:46 -04:00
Pavel Grafov
6e4ef9b5eb Merge "Make work profile maximum time off at least 3 days." into rvc-dev 2020-03-17 11:24:48 +00:00
Lucas Lin
19f09b234a Merge "Add some comments in isAlwaysOnVpnLockdownEnabled" into rvc-dev 2020-03-17 04:42:52 +00:00
Shuo Qian
1e154a345c Hide several System APIs
Test: Treehugger
Bug: 151241308
Change-Id: Ie611320f4651b83e0ced6f5c8fede34a8a0a41c1
2020-03-17 04:41:21 +00:00
Kweku Adams
e78f4abb70 Merge "Convert system forced reasons to flags." into rvc-dev 2020-03-17 04:28:24 +00:00
Automerger Merge Worker
a3630a528f Add some comments in isAlwaysOnVpnLockdownEnabled
Bug: 141621373
Test: Build pass.

Change-Id: Ie063d9ad35fd703ad376e993345e7158c6082b87
Merged-In: Ib9df71192937164ff95ce564195d5d68508ec69d
2020-03-17 02:43:49 +00:00
Hongwei Wang
ca111769ac Merge "Get PiP bounds from layout dimensions if applicable" into rvc-dev 2020-03-16 20:59:09 +00:00