Commit Graph

15818 Commits

Author SHA1 Message Date
Kai Shi
a2dce61157 Merge "Revert "Revert "Add the LCE system API""" into sc-dev 2021-03-16 20:43:50 +00:00
Kai Shi
5d530fab23 Revert "Revert "Add the LCE system API""
This reverts commit 8d60c5ceb4.

Reason for revert: <this CL doesn't break error prone build. Will redo the CTS one which does break the build>

Change-Id: I5899acf02006a164e31f9b82aeaa7974dd6d2869
Bug: 182869926
2021-03-16 20:38:38 +00:00
Mark Renouf
ce4e40ac0f Merge "Splits up internal binder api for scroll capture" into sc-dev 2021-03-16 18:21:37 +00:00
Zimuzo Ezeozue
e080255297 Merge "Fix FileSystemProvider open for external USB files" into sc-dev 2021-03-16 16:13:51 +00:00
TreeHugger Robot
3f31bd0578 Merge "Revert "Add the LCE system API"" into sc-dev 2021-03-16 12:58:14 +00:00
Martijn Coenen
8d60c5ceb4 Revert "Add the LCE system API"
Revert "Add CTS test for onLinkCapacityEstimateChanged"

Revert "[Telephony] Notify onLinkCapacityEstimateChanged"

Revert "Remove the system API of getCarrierBandwidth()"

Revert submission 13662828-LceApi

Reason for revert: b/182869926, breaks errorprone
Reverted Changes:
I1998c7e49:Add CTS test for onLinkCapacityEstimateChanged
Id69fa8b7a:Integrate New LCE Api
I0cc020ba3:Remove the system API of getCarrierBandwidth()
Id613dc152:Add the LCE system API
If7cede0f4:[Telephony] Notify onLinkCapacityEstimateChanged

Change-Id: I30813c321509ac44fa0119b0ce905fd28b0f139c
2021-03-16 09:45:23 +00:00
Kai Shi
a6c9e47218 Merge "Add the LCE system API" into sc-dev 2021-03-16 05:39:07 +00:00
Mark Renouf
400a505d4d Splits up internal binder api for scroll capture
Splits the connection callback out from the session
callbacks.

Use ListenableFuture at the ScrollCaptureClient layer
to safely chain together futures, provide a better
exception handling/reporting path, and allow for
cancellation of background tasks.

Bug: 180671218
Test: atest ScrollCaptureClientTest ScrollCaptureConnectionTest
Test: atest ScrollCaptureFrameworkSmokeTest
Change-Id: Ibc8536d12a5554f62b3d7e1f4f717d3589ec45e0
2021-03-16 02:07:53 +00:00
George Mount
b1d4c812ff Merge "Make internal recycler view use stretch edge effect" into sc-dev 2021-03-15 23:00:22 +00:00
Kai Shi
df3e93af96 Add the LCE system API
Add the link capacity estimate system API.
Remove the system API of getCarrierBandwidth() and CarrierBandwidth as
they are replaced by the new LCE system API in PhoneStateListener.

Bug: 180434672
Bug: 176814680
Test: manual test of the new LCE system API in LinkBandwidthEstimator
Test: atest -c PhoneStateListenerTest
Change-Id: Id613dc152e524045a89295e5dd03171b22377e16
2021-03-15 15:00:01 -07:00
Teddy Katz
3d4d489fa3 Allow configuring home button longpress duration with a flag
(cherry picked from commit 9e64d0934a)

Bug: 182169548
Test: tried various flag values locally on a Pixel 3 + atest SystemUITests
Merged-In: I738d86e5ef3069a03de41fa6a5bc7cdd58e3bc88
Change-Id: I738d86e5ef3069a03de41fa6a5bc7cdd58e3bc88
2021-03-15 19:41:06 +00:00
Jeff DeCew
3530bccf2b Merge changes I6e96864c,I6bc865d5,I15ca6994 into sc-dev
* changes:
  Hide app name from collapsed CallStyle.
  CallStyle now supports contextual actions (e.g. smart replies)
  Fix the layout issue with the expand button of the CallStyle
2021-03-15 13:18:03 +00:00
TreeHugger Robot
776bd5c5bc Merge "Follow up of IInputConnectionWrapper" into sc-dev 2021-03-15 06:00:57 +00:00
Ming-Shin Lu
c04d9963a6 Follow up of IInputConnectionWrapper
Remove unnecessary methods that incidentally added by CL[1]

[1]:  Ice1ea23dcb2351b56ef03b507d8aec8f8fb7b30a

Bug: 167948374
Bug: 163450598
Bug: 181724627
Test: atest CtsInputMethodTestCases
Change-Id: I230e78aada7b171fa2723bc5a32da991896b4ddd
2021-03-15 12:04:44 +08:00
Kohsuke Yatoh
6b22120e8f InputMethodInfo attr to suppress spell checker.
If InputMethodService declares suppressesSpellChecker="true", the system
SpellCheckerService will be disabled.

With TextView, when IMSs are switched while the user is editing,
SuggestionSpans that were previously added will not be removed even if
the next IMS declares suppressesSpellChecker="true".
This is because we don't know if the SuggestionSpans were from Spell
Checker, App, or IMS.

Bug: 153473490
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Ia22b8758111087818beea8c07b1c173f1a94b8e4
2021-03-13 10:07:54 -08:00
TreeHugger Robot
11a7f13364 Merge "Revert "Avoid IME restart for configChanges"" into sc-dev 2021-03-13 16:05:30 +00:00
Yohei Yukawa
1e7d125662 Revert "Avoid IME restart for configChanges"
Revert "Add cts for InputMethodService configChanges"

Revert submission 13727407-167948419

Reason for revert:
Possible root cause of Bug 182604598.

Reverted Changes:
Ib94fddadb:Avoid IME restart for configChanges
Ieca327b2e:Add cts for InputMethodService configChanges

Bug: 167948419
Bug: 182604598
Test: presubmit
Change-Id: I3accc55ac65d0e2ec30c3f6023680fda27ad3e97
2021-03-13 01:08:48 +00:00
James O'Leary
c7b3b1b5bd Merge "Fix crash when quantizing" into sc-dev 2021-03-12 21:15:26 +00:00
TreeHugger Robot
ff51356f0d Merge "Utilize measured cpu batteryconsumption in CpuPowerCalculator" into sc-dev 2021-03-12 20:51:44 +00:00
SongFerng Wang
3e9d0bedf6 Merge "The phone didn't reload the allowed Network Type" into sc-dev 2021-03-12 18:49:49 +00:00
James O'Leary
14c6e6fcf5 Fix crash when quantizing
Incoming pixels are negative numbers. Performing this operation
ensures we receive an accurate alpha value, without it, all pixels have negative alphas.

Fixes: 182523380
Test: Add logs, see that alphas _before_ this patch are logged
as negative numbers, causing all pixels to be marked as transparent and ignored in quantization. Add patch, see logs
indicate valid alphas.

Change-Id: Ice7b7db245de9dd089cffc490b2e24780f9c025b
2021-03-12 13:30:22 -05:00
Kholoud Mohamed
18f5dc3caa Merge "Exposed some testAPIs in BatteryStatsManager" into sc-dev 2021-03-12 16:08:34 +00:00
Andrei-Valentin Onea
cbad1af95e Merge changes Idd7d86f9,I73569744 am: 420476e0cd am: 086acc1ba8 am: 3fb101a052
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532338

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iab663363b5f3156531bd8f8f0a876582bc843b7d
2021-03-12 15:19:20 +00:00
Andrei-Valentin Onea
3fb101a052 Merge changes Idd7d86f9,I73569744 am: 420476e0cd am: 086acc1ba8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532338

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idec178eb39c014c9817db666fd3d5b5a39be52ba
2021-03-12 14:38:40 +00:00
TreeHugger Robot
ac33aa4735 Merge "Merge ControlledInputConnectionWrapper into parent class" into sc-dev 2021-03-12 14:29:02 +00:00
Andrei-Valentin Onea
420476e0cd Merge changes Idd7d86f9,I73569744
* changes:
  Do not enable changes newer than the current sdk
  Add support for loading a static overrides file located in /product.
2021-03-12 13:28:50 +00:00
Ming-Shin Lu
af47729a15 Merge ControlledInputConnectionWrapper into parent class
Since ControlledInputConnectionWrapper is the only derived class
of IInputConnectionWrapper hence it doesn't have a reason keep them
separate.

Bug: 167948374
Bug: 163450598
Test: atest CtsInputMethodTestCases
Change-Id: Ice1ea23dcb2351b56ef03b507d8aec8f8fb7b30a
2021-03-12 20:12:50 +08:00
kholoud mohamed
ceac8bbb50 Exposed some testAPIs in BatteryStatsManager
Added the following testsAPIs to replace the usage
of adb shell commands in tests:
* setChargerAcOnline
* setBatteryLevel
* unplugBattery
* resetBattery
* suspendBatteryInput

Test: atest MixedDeviceOwnerTest#testInstallUpdate using the adb
commands and the new testAPIs
Bug: 182260585

Change-Id: I48c2ad37f6240f4d7a3c437416fdcc0beeed6bd1
2021-03-12 09:58:32 +00:00
shawnlin
2fe3ffa3c8 Attach navigation bar to app during quick switching (2/N)
- Create a new method in StatusBar to enable/disable nav bar luma
  sampling.
- Modify the IRcentsAnimationController.detachNavigationBarFromApp() API
  to notify the server side whether we should run the fade-in animation
  or not.
- Don't let fixed rotation animation control the navigation when it's
  controlled by recents animation and vice versa.
- Don't attach nav bar when it's in split screen mode and in landscape.
- Translate the nav bar surface to match the secondary app's bounds in
  split screen mode in portrait.

Bug: 139273001
Test: atest RecentsAnimationControllerTest CommandQueueTest
Change-Id: I06dc2dd0655bc8a2e6ad03808576e55294a322e8
2021-03-12 12:10:26 +08:00
TreeHugger Robot
98dfc2a69c Merge "Implement passing the model data to the trusted process" into sc-dev 2021-03-12 02:32:22 +00:00
Treehugger Robot
6bb68aa10b Merge "Added mount to OWNERS for RecyclerView and ViewPager" am: 2273adedcd am: 62aa26cacb am: 4f3026147a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629662

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8a4a77fb4188fd44bbad910d0889521b56b64f5d
2021-03-12 00:51:32 +00:00
Treehugger Robot
4f3026147a Merge "Added mount to OWNERS for RecyclerView and ViewPager" am: 2273adedcd am: 62aa26cacb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629662

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id7b9ca5d814aa27e295c46b755af35743de5d434
2021-03-12 00:25:20 +00:00
TreeHugger Robot
cdebbc764a Merge "Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2 am: 4df29fd76a" into sc-dev 2021-03-12 00:17:58 +00:00
Lucas Dupin
0166d05722 Merge changes I561ba44b,Icaebd98e,Ic0bd4afc,Ia0f98434 into sc-dev
* changes:
  Move Wu check for max colors earlier.
  Ignore transparent pixels during WSMeans
  Fix create colors in Wu quantizer
  Fix initializing clusters with random randoms
2021-03-11 23:15:44 +00:00
TreeHugger Robot
42746017d3 Merge "Add "cmd window trace save-for-bugreport"" into sc-dev 2021-03-11 22:18:16 +00:00
George Mount
029208ebdd Added mount to OWNERS for RecyclerView and ViewPager
As requested, mount was added to OWNERS for RecyclerView
and ViewPager as changes are occasionally needed by UI
toolkit team.

Test: None
Change-Id: Ie3d49d0d5ddf092d2dd0680c6a067b2fe6b81f94
2021-03-11 21:27:55 +00:00
Jeff DeCew
4018c5075a Hide app name from collapsed CallStyle.
Also some small fixes:
* Bind the title in the CallStyle builder.
* Remove an unnecessary findViewById.
* Rename a method overload for clarity.

Bug: 179178086
Test: manual inspection
Change-Id: I6e96864c17718b9729b108e4db82534aad33675f
2021-03-11 14:53:07 -05:00
TreeHugger Robot
a6907d35ea Merge "End the trace section in FrameTracker#cancel if it has begun" into sc-dev 2021-03-11 19:48:59 +00:00
James O'Leary
7ef64c0787 Move Wu check for max colors earlier.
This has no impact. However, after going through the quantizers line by
line for other bug fixes, after getting a break from looking at them
in-depth for a couple weeks, it was much more readable/felt safer to
adjust mMaxColors at the top.

Bug: 182333325
Test: Verify output remains constant,
atest CtsAppTestCases:android.app.cts.WallpaperColorsTest#fromDrawableTest
passes.

Change-Id: I561ba44bca392634a956992fd946f3310aa1c8ee
2021-03-11 13:43:22 -05:00
James O'Leary
9b9276849b Ignore transparent pixels during WSMeans
The WSMeans quantizer uses starting clusters from a Wu quantizer as
starting points for an optimized Kmeans algorithm.

The first thing the quantizer does is assign pixels from the image being
quantized to those starting clusters. Either due to the image source or
downscaling, transparent pixels may be in the pixels. Filter those out:
they create misleading results, such as there being two colors in the
image, semi-transparent black and green, in a wallpaper that is solid
green by all accounts.

Fixes: 182333325
Test: atest CtsAppTestCases:android.app.cts.WallpaperColorsTest#fromDrawableTest
passes locally on sunfish. link: http://ab/I26300007868608112

Change-Id: Icaebd98eeba27d3dc59a698282dd3be03fce1bf9
2021-03-11 13:43:20 -05:00
James O'Leary
fbbb5dd5ca Fix create colors in Wu quantizer
This line is suspiciously complicated compared to other 3 ints -> int
representing color functions. This patch ensures the colors produced
have an explicitly opaque alpha channel (transparent pixels are filtered
out earlier in the quantization process), and ensures we're not
unnecessarily masking the red/green/blue channels.

Test: Add log dump to output hex for all colors created, immediately
after the Wu quantization finishes, thus isolating it from the larger
quantization process. Test a variety of wallpapers, make sure hex codes
make sense, verify that the fix holds by converting
Bug: 182333325

Change-Id: Ic0bd4afcd095845e00eb6d10d05aab336266d6c3
2021-03-11 12:30:23 -05:00
James O'Leary
2a75b45bff Fix initializing clusters with random randoms
During the quantization process, an instance of a Quantizer is created.
When quantization is run, the Quantizer may need to create starting
points that are random. To keep results stable, meaning multiple runs of
a quantizer output the same results, those starting points must
be created using a Random with the same starting seed. Without
specifying a starting seed, or if an instance of Random is reused across
runs, the random starting points will vary across quantizer runs.

With this patch, the Random used to create starting points is no longer
used across multiple runs (i.e. it isn't a static variable anymore).
Additionally, a starting seed is specified.

Test: Add log dumps after the quantization process. Verify that results
from Kmeans remain consistent as long as the input is consistent.
Bug: 182333325

Change-Id: Ia0f984349b7885ae1b44536aaa1b286a28e50587
2021-03-11 12:30:12 -05:00
Marcin Oczeretko
de541b0e4a Merge "Rename LatencyTracker config flags to follow the convention" into sc-dev 2021-03-11 12:59:46 +00:00
Rafal Slawik
3798c06eaa Merge "Track surfaceflinger CPU usage" into sc-dev 2021-03-11 11:25:32 +00:00
Ahan Wu
517a46d989 End the trace section in FrameTracker#cancel if it has begun
We didn't end the trace section in FrameTracker#cancel if the end
vsync id equals to the begin vsync id which is not an invalid value.
This cl fixes above problem.

Bug: 181683700
Test: atest FrameworksCoreTests:InteractionJankMonitorTest
FrameworksCoreTests: FrameTrackerTest --iteration 10
Change-Id: I6280e9b1e9b949cb6f144217ed78d21ec46eafd5
2021-03-11 18:59:31 +08:00
Oli Lan
4ecda9575d Merge "Set source package when copying from share sheet." into sc-dev 2021-03-11 10:06:42 +00:00
Yohei Yukawa
96a51f9971 Add "cmd window trace save-for-bugreport"
This CL reworks our previous CL [1], which enabled "adb bugreport" to
include wintrace tracing files into bugreport.

In the previous CL there was a side-effect that wintrace tracing files
are saved not only when "adb bugreport" is executed but also when the
following command is manually executed.

  adb shell dumpsys window --dump-priority CRITICAL --proto

This is because we used the combination of
  --dump-priority CRITICAL
and
  --proto
as a signal that it's coming from "adb bugreport", but strictly
speaking it's not necessarily true.

Instead of relying on such a heuristic, this CL introduces a claer and
dedicated command as follows.

  adb shell cmd window tracing save-for-bugreport

With this, we can let "adb bugreport" trigger the above command to
make the behavior more understandable and maintainable.  Note that
this command is no-op when winscope is not running.

See the corresponding CL for frameworks/native [2] about how it's
triggered from "adb bugreport".

Our main motivation of this consolidation is to use the same pattern
for IME tracing, where we accidentally introduced Bug 177462676 while
attempting to save IME tracing data while running "adb bugreport" [3].

 [1]: I102bc4afab5efff361633d75c09af1df4a11812e
      9e2604688d
 [2]: I8be9dee9aa36c2b085596d58e418f8613d874500
      95305b3ba7bf18bc7ed3a07c67f84b1c2f4586f4
 [3]: Ie87eb8423e2bb70f28c330983d45b95e2e07062d
      ac24994aaa

Bug: 177462676
Test: Manually done as follows.
  1. adb shell cmd window tracing start
  2. adb logcat -d -s WindowTracing:*
       Make sure wintrace is not yet running
  3. adb shell dumpsys window \
         --dump-priority CRITICAL --proto > /dev/null
  4. adb logcat -d -s WindowTracing:*
       Make sure wintrace has not been stopped.
  5. adb shell cmd window tracing save-for-bugreport
  6. adb logcat -d -s WindowTracing:*
       Make sure wintrace was stopped then restarted.
  7. adb root && adb shell ls /data/misc/wmtrace/ -al
       Make sure wintrace files are saved.
Test: Manually done as follows.
  1. adb logcat -d -s WindowTracing:*
       Make sure wintrace is not yet running
  2. adb logcat -d -s WindowTracing:*
       Make sure there is no additional message
  3. adb shell cmd window tracing start
  4. adb logcat -d -s WindowTracing:*
       Make sure wintrace is running
  5. adb bugreport bugreport.zip
  6. adb logcat -d -s WindowTracing:*
       Make sure wintrace stopped then restarted.
  7. unzip -v bugreport.zip | grep wm_trace.pb
       Make sure "wm_trace.pb" is included.
  8. unzip -v bugreport.zip | grep wm_log.pb
       Make sure "wm_log.pb" is included.
Change-Id: I887ae6941b4844a606675b447f67ecee88d7f192
2021-03-10 15:54:41 -08:00
Victor Hsieh
f4305279e5 Merge "Move VerityUtils from services.jar to core.jar" into sc-dev 2021-03-10 23:10:25 +00:00
Jeff DeCew
364576c7e0 Merge "Flow text around the large icon." into sc-dev 2021-03-10 22:19:22 +00:00
George Mount
3006c81163 Make internal recycler view use stretch edge effect
Bug: 171228096

The internal RecyclerView now supports stretch overscroll.

Implementation taken from androidx-platform-dev RecyclerView.

Test: manual testing with share sheet

Change-Id: I2b68530baf5d85438ec4483ab940f47d2fc8f11c
2021-03-10 22:15:08 +00:00