Commit graph

79856 commits

Author SHA1 Message Date
Yifan Hong
ba7fcc3bad Revert "servicemanager: hard failure for missing context"
This reverts commit b5a0f22ce1.

Reason for revert: break mixed builds

Fixes: 157555971
Bug: 152636392
Change-Id: I3972e36622da3da261263bc4cc8b1e248a99152b
2020-06-03 16:53:18 +00:00
Rhed Jao
01dc0c657a Sorts the vector of files by the mtimes
GetDumpFds should return a vector sorted with descending
order by the mtimes of dumps.

Bug: 149242559
Test: atest dumpstate_test
Test: adb bugreport && verify last anr dumped
Change-Id: I1ed9ceb35ec93b10660f2fb31785899d50bd285d
2020-06-03 19:48:25 +08:00
Rob Carr
5c316fd492 Merge "DO NOT MERGE: SurfaceFlinger: Don't wake for pending transactions." into rvc-dev am: c43da98656
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11659377

Change-Id: I4339f5d482cdd4be0c5d150d6bd6708016c8b70c
2020-06-02 20:37:55 +00:00
Robert Carr
5d3cf52a4d DO NOT MERGE: SurfaceFlinger: Don't wake for pending transactions. am: 7ec777d945
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11659377

Change-Id: If6b3b4cbf992b939bdc4bf8d683aa271e3600280
2020-06-02 20:37:53 +00:00
Rob Carr
c43da98656 Merge "DO NOT MERGE: SurfaceFlinger: Don't wake for pending transactions." into rvc-dev 2020-06-02 20:21:05 +00:00
Elliott Hughes
7be0e2def2 API level 30 cleanup.
Make sure that we have the __INTRODUCED_IN()s and -- more importantly --
the API levels recorded in the documentation.

Bug: https://github.com/android/ndk/issues/1271
Test: treehugger
Change-Id: I74752f19f165fd5c56b2dfd783298c2da1a926d6
2020-06-02 20:07:02 +00:00
TreeHugger Robot
34122992bf Merge "Stop requantizing complex derived sensors" into rvc-dev am: ab63fa0eb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11707400

Change-Id: Ie673d3e4bf811f7bdf90b2100bf670d5315f5572
2020-06-02 19:27:17 +00:00
TreeHugger Robot
ab63fa0eb5 Merge "Stop requantizing complex derived sensors" into rvc-dev 2020-06-02 19:09:51 +00:00
Anthony Stange
5dc55cac38 Stop requantizing complex derived sensors
Sensors that derive their output from physical sensors and effectively
apply an irreversible filter onto their data. Requantizing this
information has little benefit and can potentially increase floating
point inaccuracy due to the additional math.

Bug: 157986376
Test: presubmits
Change-Id: I4158739abb6b74d978abe75bd8e03ac32ad4e998
2020-06-02 13:56:35 -04:00
TreeHugger Robot
365ec5617a Merge "SF: Reconfirm all period changes, ignore HWC" into rvc-dev am: 19e96d089f
Original change: undetermined

Change-Id: I1f2564e2676d322f1d50d6299a294479b376956f
2020-06-02 17:33:51 +00:00
TreeHugger Robot
19e96d089f Merge "SF: Reconfirm all period changes, ignore HWC" into rvc-dev 2020-06-02 17:24:24 +00:00
TreeHugger Robot
4952dd4137 Merge "Fix logical error in UID idle/active handling" into rvc-dev am: c8f7d50cd0
Original change: undetermined

Change-Id: I899ebe4b0cfde400c3163e27cbd9d0a2b52aeb7d
2020-06-02 14:47:01 +00:00
TreeHugger Robot
c8f7d50cd0 Merge "Fix logical error in UID idle/active handling" into rvc-dev 2020-06-02 14:31:58 +00:00
TreeHugger Robot
2108289c37 Merge "SurfaceFlinger: record layer history for TX with eAnimation" into rvc-dev am: d9f4f88929
Original change: undetermined

Change-Id: If875bc8662102132d3284134c7f4b8a5074359b9
2020-06-02 03:35:07 +00:00
TreeHugger Robot
d9f4f88929 Merge "SurfaceFlinger: record layer history for TX with eAnimation" into rvc-dev 2020-06-02 03:20:45 +00:00
TreeHugger Robot
38c446365b Merge "Add layer flag to allow creating an effect layer without color fill" into rvc-dev am: 3c62656e42
Original change: undetermined

Change-Id: Ibc04d4e8a4221eecf53de803222bae4eb81ff95d
2020-06-01 23:55:49 +00:00
TreeHugger Robot
3c62656e42 Merge "Add layer flag to allow creating an effect layer without color fill" into rvc-dev 2020-06-01 23:41:12 +00:00
Arthur Ishiguro
3cc2c3593d Fix logical error in UID idle/active handling
There is a bug where the sensor is not properly deactivated
when ann app becomes idle. This CL fixes the issue, and also
avoids calling batch() if no active clients exist.

Bug: 157934995
Test: Flash, verify sensor is disabled when app goes idle
and re-enabled when app becomes active again

Change-Id: I403b02a20dc89c5ce0630de6ddfd6242bf38ec37
2020-06-01 16:23:40 -07:00
Lucas Dupin
e0e480c2d8 Merge "Do not accept blur transaction when disabled" into rvc-dev am: b31d3c81e9
Original change: undetermined

Change-Id: Id7e4e1cf741efa6cb88855ebb2ee1d866df8ee73
2020-06-01 21:48:09 +00:00
Lucas Dupin
b31d3c81e9 Merge "Do not accept blur transaction when disabled" into rvc-dev 2020-06-01 21:14:14 +00:00
Lucas Dupin
130e55ca93 Do not accept blur transaction when disabled
Bug: 155420902
Test: forrest
Change-Id: I5f0437f28c25465091cec4cb78e8f5c55bc94f0e
2020-06-01 21:14:00 +00:00
Steven Thomas
a233c7203b Merge "Clarify FRAME_RATE_COMPATIBILITY_* params" into rvc-dev am: 5234f933a4
Original change: undetermined

Change-Id: I040ea25b24c60bf477f38323d91a1e5f01eb56e9
2020-06-01 20:58:32 +00:00
Dan Stoza
027d365531 SF: Reconfirm all period changes, ignore HWC
This change includes two separate fixes to make waking up from idle more
robust when using a kernel idle timer:

  1) Always reconfirm the refresh rate when we resync to hardware vsync.
     This is because if the kernel idle timer is enabled, we may not
     immediately be in the refresh rate we expect to be.
  2) Ignore the refresh rate reported by the hardware vsync callbacks,
     since that refresh rate may not reflect the actual refresh rate
     when the kernel idle timer is in effect.

Bug: 154303580
Test: systrace
Test: libsurfaceflinger_unittest
Change-Id: I79c66faeaed262acd9c5925fe2202a9fb3f10b7b
2020-06-01 13:54:50 -07:00
Steven Thomas
5234f933a4 Merge "Clarify FRAME_RATE_COMPATIBILITY_* params" into rvc-dev 2020-06-01 20:44:30 +00:00
TreeHugger Robot
cc2a82e6c0 Merge "Add basic ANR test" into rvc-dev am: 0979ea52c1
Change-Id: I790b02e0012bdc4496de464176a745339a08eb5f
2020-06-01 20:14:11 +00:00
TreeHugger Robot
0979ea52c1 Merge "Add basic ANR test" into rvc-dev 2020-06-01 19:59:54 +00:00
Robert Carr
7ec777d945 DO NOT MERGE: SurfaceFlinger: Don't wake for pending transactions.
When we still have pending transactions (e.g. we are waiting on the
other side of a deferred transaction), we need to set the transaction
flags on SurfaceFlinger, so SurfaceFlinger will continue to call
doTransaction and give us a chance to process them. However when
we set the transaction flags, we trigger a wake up! This isn't
desirable, as the frame might have not come in. If the frame did come
in we will get to INVALIDATE, and from INVALIDATE observe the
transaction flags. This means we can set the transaction flags without
scheduling a wakeup and rely on the incoming frame to eventually wake
us up. I also considered triggering the transaction processing from
onFrameAvailable but at that point we are too late in the composition
cycle.

Bug: 157685525
Test: Existing tests pass
Change-Id: Ia54bc9f48a80906fc8f21c46debc72fabadd3e07
2020-06-01 18:44:05 +00:00
Ady Abraham
5def733be3 SurfaceFlinger: record layer history for TX with eAnimation
If a transaction is posted with ISurfaceComposer::eAnimation flag,
record it with layer history. Layers with eAnimation are considered
animating and will vote for peak refresh rate.

Bug: 157695685
Test: Play 24fps video in YouTube PIP mode with setFrameRate and rotate the device - no jank
Test: Chrome playing video - no refresh rate switching
Test: Hide/Show keyboard when inputting text
Test: Running Hay Day and observing refresh rate
Change-Id: If62e11b395c44d9e5fd40b74864fefd068953413
2020-06-01 11:20:23 -07:00
Siarhei Vishniakou
ffaa2b1630 Add basic ANR test
To reduce the delta of the upcoming ANR refactor, add a basic ANR test
here. This will also help highlight the difference in behaviour from the
current code to the new code.

To cause an ANR today, the socket needs to be blocked, which means that
we need to send ~ 50 events to the unresponsive window.

These workarounds will be removed when the ANRs are refactored.

Bug: 143459140
Test: adb shell -t /data/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*InputDispatcherSingleWindowAnr*" --gtest_repeat=1000
--gtest_break_on_failure

Change-Id: I0a1b28c2785d03d8870691641e0f7c6b1ca3b85e
Merged-In: I0a1b28c2785d03d8870691641e0f7c6b1ca3b85e
2020-06-01 09:56:09 -07:00
Orion Hodson
499ad88989 Merge "Add dependencies on jni_headers" am: ed38697b9f am: 560de1587b
Change-Id: Idf1fc1cab46e19b6a38350323c53fe7acd7bd91f
2020-06-01 09:58:43 +00:00
Orion Hodson
560de1587b Merge "Add dependencies on jni_headers" am: ed38697b9f
Change-Id: Iea2c5fb12ea7b1ad563f540349063fcda557fbc1
2020-06-01 09:39:13 +00:00
Orion Hodson
ed38697b9f Merge "Add dependencies on jni_headers" 2020-06-01 09:20:10 +00:00
Ady Abraham
34cea217d5 SurfaceFlinger: keep layer history for inactive layers am: 983e568b3c
Change-Id: I0a89efdbae8c48d5aca6149aee8d1876e9d7c550
2020-05-30 01:16:01 +00:00
Ady Abraham
983e568b3c SurfaceFlinger: keep layer history for inactive layers
The current implementation of layer history discards all the history
if a layer is considered inactive. This leads to an issue in the scenario
that a layer is posting infrequent updates so slow, that by the time we
get the next buffer, the layer is considered inactive, and we bump the
refresh rate to Max, instead of detecting that layer as infrequent.

As a fix, we keep around the layer history even if it is inactive.
To avoid cases where detect animations too late, we clear the history
on touch event.

Bug: 156654519
Test: add a new unit test that simulates the buffer pattern
of a Netflix playback

Change-Id: Ie076891806d74dde814fbbb3b1a73c38e0b2ae34
2020-05-29 16:22:50 -07:00
Treehugger Robot
fede9d59a8 [automerger skipped] Merge changes from topics "cursor_type_hotspot", "set_viewport_in_input_reader" am: 43beafe0b0 am: 036b105b6e -s ours
am skip reason: Change-Id Ie7a9546550b70c8834462b06de929472196fe713 with SHA-1 888a6a41ed is in history

Change-Id: Ief69a7d420179ad03b0ab8fff2a0182bae220990
2020-05-29 22:11:08 +00:00
Garfield Tan
b1286ecdff [automerger skipped] Add metadata for mouse cursor. am: b0412cfa69 am: 555e4f25a5 -s ours
am skip reason: Change-Id Ia7e0c952fcaefd14280322d9b2269f4dba38e8da with SHA-1 01a5613bda is in history

Change-Id: Ib5a9b9cdad619b994181a05037d8b80a22cd5bea
2020-05-29 22:11:05 +00:00
Treehugger Robot
036b105b6e Merge changes from topics "cursor_type_hotspot", "set_viewport_in_input_reader" am: 43beafe0b0
Change-Id: Ib3930377b494bf7bafce339165dff428a30563b6
2020-05-29 21:57:19 +00:00
Garfield Tan
555e4f25a5 Add metadata for mouse cursor. am: b0412cfa69
Change-Id: Ieca70489377e10149e73febe647a59f28adce418
2020-05-29 21:57:16 +00:00
Chun-Wei Wang
6280bc8830 Merge "Delete APK snapshots during restoration (3/n)" am: b87b05f286 am: 15439d0c07
Change-Id: I3fb43d4601294a87beebe7c38dab5b7a186fa5f9
2020-05-29 21:40:42 +00:00
Vishnu Nair
c43a23c149 Add layer flag to allow creating an effect layer without color fill
This change allows creating an effect layers without a color fill so
we can avoid an additional sf transactions when creating effect
layers.

Fixes: 157646690
Test: go/wm-smoke
Test: atest SurfaceFlinger_test
Change-Id: I3d8a4f4820d7b8fb05daab697c25cff8def612c1
2020-05-29 14:38:30 -07:00
Chun-Wei Wang
15439d0c07 Merge "Delete APK snapshots during restoration (3/n)" am: b87b05f286
Change-Id: I08d836616888dc5e7cb905ae3c42316e533a0bde
2020-05-29 21:26:20 +00:00
mhasank
f56bbb2bc0 arc: Implement smaller dumpstate output
Adds a -A commandline option to indicate a much smaller set of
dumpstate output safe for ARC++ bug reports.

Implements output of system logcat, event logs, networking, and dropbox
system server crash/system app crashes only.

Bug: 142684959
Bug: 136273873
Test: atest dumpstate_test

Change-Id: I192be7ed841cee0a8847e1057209ef2b164bab07
2020-05-29 13:16:18 -07:00
Treehugger Robot
43beafe0b0 Merge changes from topics "cursor_type_hotspot", "set_viewport_in_input_reader"
* changes:
  Let InputReader set mouse cursor's display.
  Add metadata for mouse cursor.
2020-05-29 19:23:45 +00:00
JW Wang
9b9b1aa062 Delete APK snapshots during restoration (3/n)
The snapshots are no longer needed after restore is done.

We do this in keeping with the fact that apk/apex code data is
deleted immediately after the rollback is committed.

See go/rollbackmanager-snapshot-deletion for more details.

Bug: 151805360
Test: N/A. Will be added in the next CL.

Merged-In: I5a7540aa08922c4b0c617c9cb37e1bec2ff23fc1
Change-Id: I5a7540aa08922c4b0c617c9cb37e1bec2ff23fc1
2020-05-29 16:18:17 +08:00
Chun-Wei Wang
b87b05f286 Merge "Delete APK snapshots during restoration (3/n)" 2020-05-29 08:01:48 +00:00
Ady Abraham
7826b077fc Merge changes from topic "sf_157096772" into rvc-dev am: b74fe1dc23
Change-Id: Idee6fb1dd148987fd37bfeff0dd0497646cf38ad
2020-05-29 03:59:00 +00:00
Ady Abraham
b74fe1dc23 Merge changes from topic "sf_157096772" into rvc-dev
* changes:
  SurfaceFlinger: clear LayerHistory on first touch
  Revert "SurfaceFlinger: more aggressive infrequent layer detection"
  Revert "SurfaceFlinger: tune MAX_FREQUENT_LAYER_PERIOD_NS for inactive layers"
  Revert "SurfaceFlinger: tune infrequent detection logic more"
2020-05-29 03:45:06 +00:00
TreeHugger Robot
74fc4aef8b Merge "Process focus events first" into rvc-dev am: 0b257105a2
Change-Id: I29926515404057126805eb7326615a9e5a907da0
2020-05-28 23:36:58 +00:00
TreeHugger Robot
0b257105a2 Merge "Process focus events first" into rvc-dev 2020-05-28 22:28:05 +00:00
Steven Thomas
710db09fe4 Clarify FRAME_RATE_COMPATIBILITY_* params
Bug: 155894036
Test: n/a
Change-Id: I23124fc3da0d870aa9a8b571cd7900aabf5a1326
2020-05-28 14:23:43 -07:00