Commit Graph

18088 Commits

Author SHA1 Message Date
Julia Reynolds
1c6b59868a Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7 am: 8dc7491d51 am: 1075523e84
Change-Id: Id090a288435134f7fe8ab50ed58ee2b0d44419ed
2020-05-27 21:18:41 +00:00
Julia Reynolds
1e8ce29af7 Merge "Clarify conversation policy" into rvc-dev 2020-05-27 20:43:59 +00:00
Collin Fijalkovich
cf0702af73 Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782 am: 23e5f201c8 am: 959b44ba0b
Change-Id: Ie19567b510ec47ecc4fdec0ec4412beadbbc2502
2020-05-27 18:49:25 +00:00
Collin Fijalkovich
4edffac782 Merge "Add performance counters to cacheinfo dumps." into rvc-dev 2020-05-27 18:24:04 +00:00
Julia Reynolds
2fcfe23f79 Clarify conversation policy
Test: make
Fixes: 157482114
Change-Id: Icb6993a4c2c651465cadfa31c1d1915b7352994c
2020-05-27 12:47:10 -04:00
Louis Chang
84fd155147 Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b am: b29e0c2dc7 am: 731bdebe1c
Change-Id: Ib1789b838fa2e36a638a82e297d839a156d1e7d3
2020-05-27 04:49:41 +00:00
Louis Chang
e500c6773b Merge "Do not always report configuration change to activity" into rvc-dev 2020-05-27 04:17:14 +00:00
Collin Fijalkovich
88aa314afa Add performance counters to cacheinfo dumps.
Tracks the number of hits, misses, refreshes, and invalidations on a
per-cache basis, and makes that information available through dumpsys
cacheinfo.

Bug: 157175501
Test: adb shell dumpsys cacheinfo
Change-Id: Icabdd82acda2edc54d787d0a2d15a33ba18fd668
2020-05-26 18:47:42 -07:00
Neil Fuller
29867f046d Merge "Be more defensive around invalid tzids" am: f60c302dad am: 96c57398b4
Change-Id: If8695ee257155eaedc901aa797f1939eab0c721e
2020-05-26 10:54:50 +00:00
Neil Fuller
96c57398b4 Merge "Be more defensive around invalid tzids" am: f60c302dad
Change-Id: I08e1daaf9dd0a26017b18c984eb6d4093c46ed46
2020-05-26 10:36:28 +00:00
Neil Fuller
f60c302dad Merge "Be more defensive around invalid tzids" 2020-05-26 10:20:09 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Stanislav Zholnin
dc84372155 Merge "Remove UidAtomTests from presubmit due to failures." into rvc-dev am: c1846a1a65
Change-Id: Ic55f54c525d0aa21ed01ac9ea3fe9776ea47c663
2020-05-25 19:51:02 +00:00
Stanislav Zholnin
86b0b984cf Remove UidAtomTests from presubmit due to failures.
Test: manual

Bug: 155714228
Change-Id: I661c6503c387a00803bb949e3e8ca431045dd266
2020-05-25 19:01:34 +00:00
easoncylee
6043c366b5 Fix mis-configuration of TEST_MAPPING file. am: 3e213cffec
Change-Id: I59f141c2b95e29a69a4b0f19436349340e8417b2
2020-05-24 23:35:01 +00:00
easoncylee
3e213cffec Fix mis-configuration of TEST_MAPPING file.
UidAtomTests:testAppOps is a test class and test method of
CtsStatsdHostTestCases. To run this in Test Mapping, it should
specify CtsStatsdHostTestCases. as the name in TEST_MAPPING file,
and android.cts.statsd.atom.UidAtomTests as the options.

Bug: 155714228
Test: presubmit test.
Change-Id: I7df08ae811425020ebbeae6a8e9f1317065c00c9
2020-05-24 21:32:51 +00:00
Julia Reynolds
a4eebac4e4 Merge "Update conversation labels" into rvc-dev am: 28c3a34faa
Change-Id: I9b1715deb958d5bf72ee173e46575f4a2788af1a
2020-05-21 19:17:25 +00:00
Julia Reynolds
28c3a34faa Merge "Update conversation labels" into rvc-dev 2020-05-21 18:53:24 +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
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
Louis Chang
42b72736fa Do not always report configuration change to activity
Activity that does not handle any of the configuration changes was not
relaunched when only changing its size and without cross the size
threshold, see ActivityRecord#crossesSizeThreshold(), but the
new configuration would still be scheduled to the client.

In that case, Activity#onConfigurationChanged() was called when
ActivityConfigurationChangeItem executed, because it requested to
always report to the activity. This was wrong since the activity didn't
request to handle any of the configuration changes.

On the other hand, if configuration change sent from view root came
earlier than ActivityConfigurationChangeItem, the new configuration
change did not propagate to ResourcesManager.

Allow the new configuration changes propagate to ResourcesManager
and report to activity only if the activity has been declared to handle.

Bug: 155589510
Test: atest AppConfigurationTests
Change-Id: If7dd769098a9f06efafda0250bfce71c6c96fb49
2020-05-20 16:54:04 +08: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
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
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
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
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
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
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
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
TreeHugger Robot
d19f9c31d0 Merge "Allow some OpEntry#* methods for apps targeting R" into rvc-dev am: d775b6404f
Change-Id: I0e6b7a44ec2e73aa675e850fc43bce3f3e071940
2020-05-12 23:34:02 +00:00