Commit Graph

15649 Commits

Author SHA1 Message Date
Chavi Weingarten
db033dff10 Merge "Added client requests for ImpressionAttestation" 2020-12-01 18:14:32 +00:00
Ioana Stefan
27a97f0f3e Merge "Add IntDef annotation to gravity field" 2020-12-01 13:12:38 +00:00
Wilson Wu
b325530f65 Merge "Make IInputMethodManager to oneway (3/N)" 2020-12-01 10:39:18 +00:00
TreeHugger Robot
2200250bf8 Merge "Promote Context related tests to presubmit" 2020-12-01 07:59:24 +00:00
Wilson Wu
b9590fa1e1 Make IInputMethodManager to oneway (3/N)
-. Create InputBindResult result callback and apply it
   to startInputOrWindowGainedFocus().
-. Create a callback utility class.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
2020-12-01 14:58:00 +08:00
Jeff Sharkey
d0cc126b93 Merge changes from topic "nov17"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Mechanical refactoring to new typed XML classes.
2020-12-01 01:51:32 +00:00
Jeff Sharkey
df8679a9a7 Hand-migration to TypedXml interface.
Previous changes have applied mechanical refactorings, but this change
hand-migrates the remaining logic which was too complex to identify.

This change should have no behavior change; famous last words.

Bug: 171832118
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Id9cf744fc28a66de6439bddb1344293f4ad96acf
2020-11-30 15:43:59 -07:00
Nikita Dubrovsky
83de85f7b6 Merge "Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo" 2020-11-30 22:33:03 +00:00
Tiger Huang
343b6ddaf5 Merge "Remove PRIVATE_FLAG_IS_SCREEN_DECOR" 2020-11-30 15:38:54 +00:00
Ioana Stefan
c9393ea0ad Merge changes I6718aa31,I4dc6147f
* changes:
  Add InputConnection app side tracing
  Add InputConnection debug information
2020-11-30 11:33:14 +00:00
Nikita Dubrovsky
10f027f69f Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo
Bug: 174125311
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: atest FrameworksCoreTests:TextViewOnReceiveContentTest
Change-Id: If3988dfe9dbed6bcd5e1f1566cb3ecdb111aef3f
2020-11-27 15:50:31 -08:00
Tiger Huang
0a959d2f41 Remove PRIVATE_FLAG_IS_SCREEN_DECOR
Applying this flag won't make the window provide insets anymore in the
new insets system. A screen decor window should use providesInsetsTypes
to provide insets instead.

Bug: 149813814
Test: Presubmit
Change-Id: I567bfc4f2e687aa2e9d65fe8e7edda867497c324
2020-11-28 03:19:56 +08:00
Ioana Stefan
c47b324d39 Add InputConnection debug information
Add InputConnection information to IME tracing. This change adds
only information about the text associated with an
EditableInputConnection instance: editable text, selected text, text
before and after the cursor (for a preset length) and cursor caps mode.

Test: flash a device
      start IME tracing with `adb shell ime tracing start`
      stop IME tracing with `adb shell ime tracing stop`
      visualise the traces in Winscope and see the inputConnection information
Change-Id: I4dc6147fb7baa2cea413d2c44226e8c84c056c37
2020-11-27 15:20:58 +00:00
Ioana Stefan
9065908890 Merge "Remove flag status of LayoutInDisplayCutoutMode" 2020-11-27 14:45:01 +00:00
Ioana Stefan
422afa9153 Add IntDef annotation to gravity field
This change adds IntDef annotation to the gravity field in LayoutParams.

Bug: 173682107
Test: run `mp :framework-minus-apex-intdefs` and see that the Gravity
mapping was generated

Change-Id: I030241f72b07aeea0c625e5b557dfcc800f537d9
2020-11-26 15:31:57 +00:00
TreeHugger Robot
54db67bd6c Merge "Extract input device vibrators code from VibratorService" 2020-11-26 11:48:18 +00:00
TreeHugger Robot
d329889eea Merge "Let IME#onFinishInput called without dup onStartInput when screen-off" 2020-11-26 11:25:22 +00:00
Jason Macnak
e2fb6a64b8 Merge "Revert "Flip BLAST for SurfaceView"" 2020-11-25 21:19:08 +00:00
Jason Macnak
8209b80d54 Revert "Flip BLAST for SurfaceView"
This reverts commit 5cc302542b.

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

Change-Id: I782432c4d26ce19d3c7f1769fc1d5ebfd4b2cf71
2020-11-25 19:26:40 +00:00
Ioana Stefan
cf9b08dbef Remove flag status of LayoutInDisplayCutoutMode
LayoutInDisplayCutoutMode was marked with `flag=true` by mistake. This
change marks it as false by default.

Bug: 174239218
Test: N/A
Change-Id: Ided586c85871981c3be6f4af200fbcbc65754f64
2020-11-25 17:10:06 +00:00
Ming-Shin Lu
152eacec4f Let IME#onFinishInput called without dup onStartInput when screen-off
Also called IME#onStartInput without dup onFinishInput when screen-on,
to fix the long-standing IME input connection lifecycle issue when
device screen state changes.

Bug: 156215187
Bug: 26851566
Test: atest InputMethodStartInputLifecycleTest
Test: manual as below steps
      0) Enable InputMethodService debug flag.
      0-1) In Settings -> Develop options -> AppCompatibility Changes,
           Select Gboard and then toggle
           "FINISH_INPUT_NO_FALLBACK_CONNECTION" change.
      1) Launch a app with focused a editor and show soft-input
      2) When device screen turned-off, will see InputMethodService only
         callbacks below logs:
           CALL: doFinishInput
           CALL: onFinishInputView
           CALL: onFinishInput
      3) When device screen turned-on, will see InputMethodService only
         callbacks below logs:
           CALL: onStartInput
           CALL: onStartInputView

Change-Id: I8a657e75e274d842fb46b60375f6aeafeab96a59
2020-11-25 23:32:49 +08:00
Sean Stout
acd7a80462 Change shouldShowIme -> displayImePolicy
This CL allows for a Trusted Display to specify not only whether the IME
should show on itself or the fallback Display, but also whether the IME
should not show at all.

This behavior is useful if interacting with a display that has a built
in IME; it will prevent an IME from also showing on the default Display.

Bug: 170233231
Test: atest MultiDisplaySystemDecorationTests#testDisplayPolicyImeHideImeOperation
Change-Id: Id86db922e8f2c3ca065f830ee371cccaa7c36101
2020-11-25 15:22:51 +00:00
Lais Andrade
e320282bba Extract input device vibrators code from VibratorService
This code will also be migrated to VibratorManagerService, to give
preference to input devices over the devices vibrators when the user
setting enables it.

This need to remain a server-side code so permissions/setting will be
applied to system vibrations even when they are redirected to input
devices (including vibration scaling).

Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorServiceTest
      atest FrameworksServiceTests:InputDeviceVibratorsTest
Change-Id: I6c61c3f20e4d82d44af136917d3755d9f6edd31f
2020-11-25 14:35:35 +00:00
chaviw
c767fd2b6c Added client requests for ImpressionAttestation
Since the ImpressionAttestation requests will be from outside the
system, exposed some methods in IWindowManager and IWindowSession to
allow apps to generate the impression token and allow the ads services
to validate the token.

Most of the methods are passthroughs to ExtServices since client apps
cannot directly call into ExtServices

For the generateImpressionToken method, WindowManager will look up the
information about the window to find it's location in the display. It
will then update the bounds passed in so they are in screen space
instead of window space. WindowManager will take the screenshot, using
the uid from the window session, and send the screenshot to ExtServices.
That's where the hash and token will be generated.

Test: Builds
Bug: 155825630
Change-Id: Iacc6c398794d9a302e4d609a16fa99a810369aff
2020-11-24 15:11:17 -08:00
TreeHugger Robot
7c976c6774 Merge "Flip BLAST for SurfaceView" 2020-11-24 18:18:13 +00:00
Ady Abraham
d90ac7139c Merge "Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE" 2020-11-23 23:20:48 +00:00
Ady Abraham
15d23d83a7 Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE
When getting DISPLAY_EVENT_FRAME_RATE_OVERRIDE from SurfaceFlinger,
expose the overridden frame rate to the relevant application
if the current refresh rate allows that.

Bug: 169271059
Bug: 169271062
Bug: 170503758
Test: manual test using SF backdoor
adb shell service call SurfaceFlinger 1039 i32 <uid> f <refresh rate>

Change-Id: I6ae1a98e6ca13e9d3d095a5713a6b0ca99652256
2020-11-23 20:02:48 +00:00
Michael Wachenschwanz
26acf27957 Merge changes I9b91ed27,Ia77d0eac,I014c2ee9
* changes:
  Fix PowerStatsView AppPicker activity start
  Utilize Measured Energy data in PowerStatsViewer
  Introduce MeasuredEnergyStats to BatteryStatsImpl
2020-11-23 17:38:05 +00:00
Michael Wachenschwanz
d23a7c4f03 Introduce MeasuredEnergyStats to BatteryStatsImpl
Initial checkin that plumbs the flow of energy consumption data through
BatteryStatsService, BatteryStatsImpl, and BatteryExternalStatsWorker.

Also, start monitoring the display subsystem measured enegy consumption
and attribute energy to screen on and screen doze state.

Fixes: 171728122
Test: atest FrameworksCoreTests:MeasuredEnergyStatsTest
Change-Id: I014c2ee99da773ebc93e18d026b2e2e694d0d4b2
2020-11-20 14:59:36 -08:00
Jeff DeCew
ee451e5882 Allow tapping notification icon to expand/contract.
Bug: 163626038
Test: manual
Change-Id: Ie8bf816b0acfc3f078dd1d0583d325de4b625764
2020-11-20 14:39:45 -05:00
Jeff DeCew
fbc843081f Prioritize ContentTitle over the SubText
Previously, we shrunk the title to a minimum width, then showed the subtext with the remaining space. This felt like a poor balance, where we'd rather get as much of the title as possible.

Bug: 163626038
Test: manual - using Notify's drag resizing was really helpful
Change-Id: I8045cb473cbb42f04e3054fb40bda2ac427e693e
2020-11-20 14:39:44 -05:00
Charles Chen
480b5b733f Promote Context related tests to presubmit
Test: atest -p frameworks/base/core/java/android/app:presubmit
Test: atest -p frameworks/base/core/java/android/content:presubmit
Test: atest -p frameworks/base/core/java/android/view:presubmit
Bug: 170927371

Change-Id: I5c26418546cf4fcc710d5d0c2f6e5d10b2c03f84
2020-11-20 20:11:58 +08:00
TreeHugger Robot
5cbef17292 Merge "SyncPointerCapture (4/n): Receive capture events in InputEventReceiver" 2020-11-20 04:35:02 +00:00
Vishnu Nair
5cc302542b Flip BLAST for SurfaceView
Enable buffers to go through BLASTBufferQueue
in SurfaceView.

Bug: 168917217
Test: atest SurfaceViewBufferTests & manual tests
Change-Id: I2385b896a5501d910f8d7e3f285186b3e6c3e2f5
2020-11-19 14:10:58 -08:00
TreeHugger Robot
7bb2a03b2d Merge "API Review: InputConnection error handling is inconsistent" 2020-11-19 15:35:56 +00:00
Bernardo Rufino
f48a5e3d13 Merge "Optionally wait animations on syncInputTransactions/injectInputEvent" 2020-11-19 14:07:13 +00:00
Bernardo Rufino
ab008846a8 Optionally wait animations on syncInputTransactions/injectInputEvent
I need to perform a touch while animating in CTS to test ag/13067140,
but current methods all wait for animations to complete, which defeats
the purpose.

Creating new methods that optionally wait for animations to complete.

Test: atest WindowUntrustedTouchTest on child CL
Bug: 172787052
Change-Id: I4832ea2c62531a73098d2817930638ccb5f40765
2020-11-19 08:30:08 +00:00
Nikita Dubrovsky
d8b6ec5f39 Merge "Add View.performReceiveContent in addition to View.onReceiveContent" 2020-11-18 21:25:16 +00:00
Issei Suzuki
30ce5da1bc Merge changes Ia2f99fa3,I4320b04d
* changes:
  Replace old app transition type to new transition type (3/N)
  Replace old app transition type to new transition type (2/N)
2020-11-18 17:07:39 +00:00
Issei Suzuki
656bfb5389 Replace old app transition type to new transition type (2/N)
AppTransitionController#getTransitionCompatType scans app transition
requests being set in the setup stage, and decides the app transition
animation.

Bug: 166736358
Test: Changes are behind a flag. No logic change yet.
Change-Id: I4320b04da2569d555369e6698f084d9514e36590
2020-11-18 15:05:29 +01:00
TreeHugger Robot
5bc9594c6b Merge "Add divider view support for app-pairs" 2020-11-18 12:12:18 +00:00
Tiger Huang
33ffcac4d4 Merge "Remove legacy frames from WindowFrames and DisplayFrames" 2020-11-18 09:26:46 +00:00
Tiger Huang
b73471b4ec Remove legacy frames from WindowFrames and DisplayFrames
These frames are used for computing the legacy insets which won't be
used anymore. We should only maintain the new insets system now.

This CL also unhides Rect#inset APIs.

Bug: 149813814
Test: atest WindowFrameTests DisplayPolicyLayoutTests InsetsPolicyTest
            SplashscreenTests ManifestLayoutTests WindowMetricsTests
            WindowInsetsAnimationImeTests WindowInsetsControllerTests
            WindowUntrustedTouchTest DisplayContentTests
Change-Id: I06e40be6342b2ae35f7cc3e6f4ebdbe68edf0499
2020-11-18 10:59:15 +08:00
Nikita Dubrovsky
53bf38e9ff Add View.performReceiveContent in addition to View.onReceiveContent
Bug: 170191676
Bug: 152068298
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: atest FrameworksCoreTests:TextViewOnReceiveContentTest
Change-Id: I3a3a3ec3b386c5af9c7e997fb32201fefa564545
2020-11-17 15:26:58 -08:00
Prabir Pradhan
7c48ce83bc SyncPointerCapture (4/n): Receive capture events in InputEventReceiver
Since a capture event was added to the InputChannel, this CL lets
InputEventReceiver receive the capture events sent by the publisher.

Bug: 141749603
Test: build, crosshatch boots
Change-Id: I608f3cf86d96e4d2b00b28f88fa2b7aa6e83b6dc
2020-11-17 14:58:46 -08:00
Ioana Stefan
06f759835a Merge changes from topics "ime-tracing-interface", "optimized-ime-tracing-clients", "optimized-ime-tracing-imms", "optimized-ime-tracing-ims"
* changes:
  Log only current client data in IME tracing
  Optimized workflow for IME tracing on InputMethodManagerService side
  Optimized workflow for IME tracing on InputMethodService side
  Optimized workflow for IME tracing on clients side
2020-11-17 15:18:30 +00:00
TreeHugger Robot
781e61d2c9 Merge "Add shouldBeSeamless param to Surface.setFrameRate" 2020-11-17 14:57:11 +00:00
Jeff DeCew
5185c6bf66 Merge changes from topic "template_redesign"
* changes:
  Update variable names to reduce confusion.
  Fix/hack MessagingStyle notifications
  Reduce notification minimized height
  Fix the placement of the work profile and feedback badges.
  Fix HUNs
  Remove the unneeded icon spacing in the InboxStyle.
  Hide app name from minimized notifications
  Notification Title is 16pt in Big state
  Ensure headerless notification with large icon is big enough.
  Round corners of BigPicture
  Increase the expand button touchable area.
  Remove the reply action entirely.
  Notification template redesign; part 1.
  Remove night-mode override of notification_divider_height
2020-11-17 13:21:53 +00:00
Marin Shalamanov
41ffa8dd06 Add shouldBeSeamless param to Surface.setFrameRate
This CL adds a new parameter shouldBeSeamless to the existing
setFrameRate APIs. This parameter indicates whether the desired
refresh rate should be achieved only seamlessly or also switches
with visual interruptions for the user are allowed. The default
value of the new parameter is "true".

Test: atest SetFrameRateTest
Test: atest RefreshRateConfigsTest
Test: atest libsurfaceflinger_unittest
Bug: 161776961
Change-Id: Ic2446d278e4f57fe507d30a0a18ef7b85909da4b
2020-11-17 11:53:14 +01:00
Jerry Chang
0545edfa3d Add divider view support for app-pairs
Add divider bar for app-pairs. AppPairLayout and divide policy records
and handles the layout in pair.

Bug: 172704238
Bug: 172704672
Test: manul check the behavior of the splits and divider bar.
Test: AppPairTests, AppPairsPoolTests, AppPairsControllerTests

Change-Id: I688c7001d056fe8dd9a192885e1f9fd5f004dc11
2020-11-17 11:22:19 +08:00