Commit Graph

18454 Commits

Author SHA1 Message Date
Julia Reynolds
6304878212 Merge "Update conversation labels" into rvc-dev am: 28c3a34faa am: c9bf62b6fe am: c31eb3260f am: 8f0cbb4498
Change-Id: I4dfacbc5543b0cf096a49eee7f8a1c069ec4daf3
2020-05-21 20:11:16 +00:00
Julia Reynolds
c31eb3260f Merge "Update conversation labels" into rvc-dev am: 28c3a34faa am: c9bf62b6fe
Change-Id: I00b7afe871c74441cc823f4d2d7654fbc949dbb0
2020-05-21 19:34:33 +00:00
Julia Reynolds
28c3a34faa Merge "Update conversation labels" into rvc-dev 2020-05-21 18:53:24 +00:00
TreeHugger Robot
19e54012a0 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev am: 5d6cf38cd1 am: 3fb3ffeda8 am: 39bca2cdec am: 286ad43c7c
Change-Id: If314fd205ac3676a0b1270136ffa82c693bd3b0d
2020-05-21 17:12:24 +00:00
Hui Yu
00b64d7a71 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca am: 20710498ee am: 5b95c916c5 am: 62f3401654
Change-Id: I2c44a1ed2cb23a104985c535a8bbc29eee56fb24
2020-05-21 16:55:06 +00:00
Hui Yu
62f3401654 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca am: 20710498ee am: 5b95c916c5
Change-Id: Ibc31718f6e0626b6190560cd25f529c512c71339
2020-05-21 16:39:47 +00:00
TreeHugger Robot
3fb3ffeda8 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev am: 5d6cf38cd1
Change-Id: I6120224f6026d605121e00e38b18fe5fcd769d99
2020-05-21 16:27:31 +00:00
TreeHugger Robot
5d6cf38cd1 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev 2020-05-21 16:25:25 +00:00
Hui Yu
0c107e3d09 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca
Change-Id: Ic0af8fa5f1e9bcaa9b7eeb2aba990524024f013e
2020-05-21 16:04:04 +00:00
Hui Yu
600ce540ca Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev 2020-05-21 16:00:43 +00:00
Alex Johnston
dd19dc740b Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648 am: 0fc71e147b am: 620ae475a0 am: 284299915a
Change-Id: Icf42011d6260ce3c4d5afc45748a4ef679f86206
2020-05-21 11:15:15 +00:00
Alex Johnston
620ae475a0 Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648 am: 0fc71e147b
Change-Id: I5ea7463fbe6fec3144cb8aaf5f393c8646aed637
2020-05-21 10:39:29 +00:00
Alex Johnston
28ccaf1dfd Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648
Change-Id: Ifebf6a1e9320028b3a3ab1604a876621d35aee93
2020-05-21 10:26:57 +00:00
Alex Johnston
fa6cf17648 Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev 2020-05-21 10:08:51 +00:00
Hui Yu
3f5b1521f0 Check PendingStartActivityUids list before updateOomAdj is done.
While starting activity, WindowManager posts a runnable to DisplayThread to updateOomAdj.
The latency of the thread switch could cause client app failure when the app is checking
ActivityManagerService.isUidActive() before updateOomAdj is done.

Use PendingStartActivityUids to save uid after WindowManager start activity and before
updateOomAdj is done.

PendingStartActivityUids list is checked in
ActivityManagerService.isUidActive() and
AppOpsService.UidState.evalMode(). A uid in this list is treated same as
uid is active.

Bug: 157180494
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerCameraLaunchTest.java
Change-Id: If0685c3c2fad01e48f3fcf2228057041f4ec9b00
2020-05-20 23:04:34 -07:00
Julia Reynolds
8d34af82ac Update conversation labels
By adding a util method that prefers longlabel and
falls back to shortlabel.

Test: atest
Bug: 157140669
Change-Id: Ib7229b75b7a8ab87274e9aab1c7816129f04e505
2020-05-20 17:03:35 -04:00
Alex Johnston
67623cf556 setAutoTimeRequired disabled on managed profile
* A security exception should be thrown when
  setAutoTimeRequired is called on a managed profile
* Update javadoc

Bug: 156620695
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetAutoTimeRequired
Change-Id: Ifb53c218947f62aa446aa607d3f4eee354586395
2020-05-20 12:50:04 +01:00
Suprabh Shukla
2760e5ee53 Move AlarmManager to apex
Mechanical refactoring to move all except native code to the apex
directory. Accesses across the jar boundary will be cleaned up in
follow-ups.
Also, moved alarm manager code into its own package for better
organization.

Test: Buids, boots. Existing tests:
atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsAlarmManagerTestCases

Bug: 151976605
Change-Id: Ida46491c1f1dff02dce4c50d3fafd4efbf977766
2020-05-19 21:19:26 -07:00
Alex Kershaw
e6a81b38d6 Prevent DPCs from requesting INTERACT_ACROSS_PROFILES
Fixes: 156745686
Test: atest
com.android.cts.devicepolicy.CrossProfileAppsPermissionHostSideTest#testCanRequestInteractAcrossProfiles_profileOwner_returnsFalse
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose

Change-Id: Ia72573991ecccd9a9d01285ba55059e7f9ea14b0
2020-05-19 20:34:17 +01:00
TreeHugger Robot
4da2138bb9 Merge "Report resizeTask failure as boolean result" into rvc-dev am: 58657c7c10 am: c2478e86d3 am: 9a2f5f420a am: 2fb3a9944e
Change-Id: Iaf05ea95ca0234e13e2b90c754bf1ee96b2783aa
2020-05-19 02:16:30 +00:00
TreeHugger Robot
2fb3a9944e Merge "Report resizeTask failure as boolean result" into rvc-dev am: 58657c7c10 am: c2478e86d3 am: 9a2f5f420a
Change-Id: Ib238be7fc2b3de7f5b3b518649c4d00700379eed
2020-05-19 02:14:00 +00:00
TreeHugger Robot
2f42d9e246 Merge "Report resizeTask failure as boolean result" into rvc-dev am: 58657c7c10 am: c2478e86d3
Change-Id: I514f1e196432c81873e24db4b2db6e593b7bb6a2
2020-05-19 02:12:07 +00:00
TreeHugger Robot
542cec2365 Merge "Report resizeTask failure as boolean result" into rvc-dev am: 58657c7c10
Change-Id: I2d75dfed853f36bdae949b2f02f3e2e32a4dba8a
2020-05-19 01:57:40 +00:00
TreeHugger Robot
58657c7c10 Merge "Report resizeTask failure as boolean result" into rvc-dev 2020-05-19 01:39:54 +00:00
Collin Fijalkovich
a422c319f9 Merge changes from topic "dump-cacheinfo" into rvc-dev am: acb2bba925 am: 5f2f1b3feb am: c11d18e807 am: 8f3b7d8ca3
Change-Id: I70d6e5f4824f3aa0da8b93155933e9768af660ea
2020-05-18 21:40:36 +00:00
Collin Fijalkovich
5f2f1b3feb Merge changes from topic "dump-cacheinfo" into rvc-dev am: acb2bba925
Change-Id: I2eae20fcd0ff8c92f2392c59da05d29a9ece4204
2020-05-18 20:59:05 +00:00
Daniel Colascione
be2c17c588 Maintain global list of caches; purge on low memory am: 8c239da8d5
Change-Id: Ie6eb25b53de3be6fadf08cae1f882120ba06781a
2020-05-18 20:59:01 +00:00
Collin Fijalkovich
acb2bba925 Merge changes from topic "dump-cacheinfo" into rvc-dev
* changes:
  Add cache debugging information to bugreports.
  Maintain global list of caches; purge on low memory
2020-05-18 20:52:43 +00:00
Darryl Johnson
5b432e47a8 Merge "Make sure config change items are executed in the order dispatched." into rvc-dev am: 0d8822c94a am: 7944d2771e am: ebd472475c am: 2008286ce7
Change-Id: I8c4b19835d035f4324df2b05cabd4b4ae1f07878
2020-05-18 18:55:32 +00:00
Darryl Johnson
7944d2771e Merge "Make sure config change items are executed in the order dispatched." into rvc-dev am: 0d8822c94a
Change-Id: I463de8363aa447016a191e233495ed861844e57a
2020-05-18 17:28:17 +00:00
Darryl Johnson
0d8822c94a Merge "Make sure config change items are executed in the order dispatched." into rvc-dev 2020-05-18 17:26:14 +00:00
TreeHugger Robot
d4c64e219f Merge "Add setSchedPolicyCgroup to AM service" 2020-05-16 03:19:41 +00:00
Automerger Merge Worker
3066a3352b Merge "Merge "Handle apps that upgrade to full conversations" into rvc-dev am: 01ae9d5c22 am: 944cf071e9" into rvc-d1-dev-plus-aosp am: 66f580d37f am: 519008f089
Change-Id: I6d9744b0429224b179c170dad3dad056576d3d4c
2020-05-16 00:06:02 +00:00
TreeHugger Robot
944cf071e9 Merge "Handle apps that upgrade to full conversations" into rvc-dev am: 01ae9d5c22
Change-Id: Ic8b81e6d967bbdaf257318fe5115f12339716e8f
2020-05-15 23:39:06 +00:00
TreeHugger Robot
01ae9d5c22 Merge "Handle apps that upgrade to full conversations" into rvc-dev 2020-05-15 23:35:06 +00:00
TreeHugger Robot
62dd613bb5 Merge "Some improvements to process state dumpsys output." into rvc-dev am: 02ed46782e am: 805df51104 am: f14fb4fc93 am: 5f623756d8
Change-Id: I30e55425a47e45d25ed509bb2efc56ddff5b29db
2020-05-15 21:34:40 +00:00
TreeHugger Robot
5f623756d8 Merge "Some improvements to process state dumpsys output." into rvc-dev am: 02ed46782e am: 805df51104 am: f14fb4fc93
Change-Id: Ieba4572368526d4c44c15196b060ada2ed82a09c
2020-05-15 21:04:09 +00:00
TreeHugger Robot
bb95962723 Merge "Some improvements to process state dumpsys output." into rvc-dev am: 02ed46782e
Change-Id: I0b979b08628fbb511b18f37f5c605c3e89a44d10
2020-05-15 21:02:58 +00:00
TreeHugger Robot
02ed46782e Merge "Some improvements to process state dumpsys output." into rvc-dev 2020-05-15 20:55:13 +00:00
Darryl L Johnson
2b9720c694 Make sure config change items are executed in the order dispatched.
In the previous implementation a batch of process/activity config
changes would effectively be executed out of order. When the server
would dispatch changes in config in quick succession the config change
items would update the pending configs first through the preexecute()
calls and then apply the activity config before the process config
is applied even though the process config was dispatched before the activity
config change item. See b/148639784 for more detail.

Fixes: 148639784

Test: ActivityThreadTest#testHandleActivityConfigurationChanged_EnsureUpdatesProcessedInOrder
Test: ActivityThreadTest#testHandleActivityConfigurationChanged_SkipWhenNewerConfigurationPending

Change-Id: I3c926076ac8dba73eb0471c7bc91313df519cf92
2020-05-15 09:40:30 -07:00
Julia Reynolds
bc23c7e813 Handle apps that upgrade to full conversations
- Apps that have sent incomplete conversations only are allowed
into the conversation section, but not allowed to have full controls.
Users can also demote these apps entirely from the converstion space
- Once an app starts using complete notifications, it can no longer
be fully demoted out of the conversation space, it's only demoted on
a per conversation basis.
- If an app has sent full conversation notifications, and then sends
an incomplete one, the incomplete notification will not be shown in
the conversation space.

Test: atest
Bug: 155276427

Change-Id: Iba9b01c53949632b6db2834511165e3571387ac9
2020-05-15 12:17:13 -04:00
Winson Chung
39fbb5d7c1 Merge "Skip parceling destroyed buffer" into rvc-dev am: b159f28fce
Change-Id: I51bcc3b51a3f12b467881d77bcba997d1e134353
2020-05-15 15:55:23 +00:00
Winson Chung
5ca5134da0 Merge "Skip parceling destroyed buffer" into rvc-dev am: b159f28fce am: 4cf9c58ce3 am: 2c1f71acfd
Change-Id: Ie621abe0677f178723419c22604120f237969162
2020-05-15 15:52:38 +00:00
Daichi Hirono
fa23f600c6 Report resizeTask failure as boolean result
Previously ActivityTaskManagerService#resizeTask throws
IllegalArgumentException when the task windowing mode is not suitable for
resize. However caller cannot ensure the windowing mode before
acquiring window lock.

To descriminate windowing mode mismatch from programming errors
(e.g. Preconditions.check failures), the CL changes the way of reporting
windowing mode mismatch to returning boolean value.

Bug: 156196109
Test: None
Change-Id: I36f473899c4f6d7f5d5d25f081a57fe14ebbb1a8
2020-05-15 07:24:11 +00:00
Rick Yiu
d2b8105f03 Add setSchedPolicyCgroup to AM service
Add setSchedPolicyCgroup function to Activity Manager Service and aidl
of Activity Manager binder interface.

Bug: 139521784
Test: function works
Change-Id: I3e5796eefa1066f61dfcb1bd962ca6c548f8713a
2020-05-15 06:55:00 +00:00
Winson Chung
b159f28fce Merge "Skip parceling destroyed buffer" into rvc-dev 2020-05-14 17:32:08 +00:00
Winson Chung
5bd2a157c6 Skip parceling destroyed buffer
- Haven't been able to repro, but we shouldn't crash system server

Bug: 154382448
Test: Just adding a destroyed check
Change-Id: I412ab1703602723511a6bd3c598d34b6ade68db7
Merged-In: I412ab1703602723511a6bd3c598d34b6ade68db7
2020-05-14 16:05:07 +00:00
Dianne Hackborn
cb6db38143 Some improvements to process state dumpsys output.
The detailed dumpsys output of ProcessRecord had some formatting
issues.  Cleaned this up, also reorganized and improved some of
the other output.

And improved debugging output of capabilities -- have special
formatting to print the flags in a more human-readable way, and
added this to the process list summaries.

Looks like this:

    Proc #28: psvc   F/ /PER  LCM  t: 0 32602:com.google.android.providers.media.module/u0a236 (service)
        com.google.android.providers.media.module/com.android.providers.media.fuse.ExternalStorageServiceImpl<=Proc{31384:system/1000}
    Proc # 4: psvc   F/ /PER  LCM  t: 0 31614:com.android.bluetooth/1002 (service)
        com.android.bluetooth/.gatt.GattService<=Proc{31384:system/1000}
    Proc # 2: fg+50  F/A/TOP  LCM  t: 0 4029:com.google.android.apps.maps/u0a186 (fg-service-act)
    Proc # 0: vis    F/A/TOP  LCM  t: 0 32033:com.google.android.apps.nexuslauncher/u0a155 (service)
        com.google.android.apps.nexuslauncher/com.android.launcher3.notification.NotificationListener<=Proc{31384:system/1000}
    Proc # 8: vis    F/ /BTOP LCM  t: 0 32563:com.google.android.googlequicksearchbox:interactor/u0a151 (service)
        com.google.android.googlequicksearchbox/com.google.android.voiceinteraction.GsaVoiceInteractionService<=Proc{777:com.google.android.googlequicksearchbox:search/u0a151}
    Proc # 7: vis    F/ /BTOP LCM  t: 0 4406:com.google.android.tts/u0a204 (service)
        com.google.android.tts/.service.GoogleTTSService<=Proc{4029:com.google.android.apps.maps/u0a186}
    Proc # 6: vis    F/ /BTOP LCM  t: 0 777:com.google.android.googlequicksearchbox:search/u0a151 (service)
        com.google.android.googlequicksearchbox/com.google.android.apps.gsa.publicsearch.PublicSearchService<=Proc{4029:com.google.android.apps.maps/u0a186}
    Proc # 1: vis    F/ /BTOP LCM  t: 0 32254:com.google.android.gms.persistent/u0a152 (service)
        com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService<=Proc{4029:com.google.android.apps.maps/u0a186}
    Proc #47: vis    F/ /BFGS ---  t: 0 31954:com.google.android.ext.services/u0a70 (service)
        com.google.android.ext.services/android.ext.services.notification.Assistant<=Proc{31384:system/1000}
    Proc #16: vis    F/ /BFGS LCM  t: 0 32515:com.google.android.as/u0a112 (service)
        com.google.android.as/com.google.android.apps.miphone.aiai.captions.SystemCaptionsManagerService<=Proc{31384:system/1000}
    Proc #51: vis    F/ /IMPF ---  t: 0 2072:com.qualcomm.qcrilmsgtunnel/1001 (service)
        com.qualcomm.qcrilmsgtunnel/.QcrilMsgTunnelService<=Proc{31915:com.android.phone/1001}
    Proc #48: prcp   b/ /IMPB ---  t: 0 3783:com.google.android.inputmethod.latin/u0a182 (service)
        com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME<=Proc{31384:system/1000}

Bug: 156545187
Test: manually checked output
Change-Id: I99d8136b98b39e74d9f316da5954f85aec570c01
2020-05-13 17:34:35 -07:00
Collin Fijalkovich
ceefcec397 Add cache debugging information to bugreports.
Following the model for dumpsys gfxinfo, this patchset adds a
CacheBinder service that dumps cache state information from each
process.

Bug: 153661880
Test: adb shell dumpsys cacheinfo
Test: adb bugreport

Change-Id: Ie7cce70e56777a200e3e3e92ab895126b6f29032
2020-05-13 11:15:22 -07:00
Daniel Colascione
8c239da8d5 Maintain global list of caches; purge on low memory
Bug: 140788621
Test: m
Merged-In: I3ba88e0a6f6c0f26465903988e7432156bd5be20
Change-Id: I3ba88e0a6f6c0f26465903988e7432156bd5be20
(cherry picked from commit 22c2ddb201)
2020-05-13 11:15:14 -07:00