Commit Graph

7102 Commits

Author SHA1 Message Date
Yunfan Chen
d1e350c7fc Fix display size calculations in large screen (2/3)
The fix is taken from AOSP patch aosp/2154236.

This will make sure the UI Automator always has the entire display to
interact with. Otherwise, in multi-windowing mode or on devices with
task bar, it will only be able to interact with the current focused
window, the default launch bounds, or the display excluding task bar,
depends on the actual scenario.

Test: PlatformSenarioTests
Bug: 238981445
Bug: 238985243
Bug: 238581838
Bug: 233945217
Change-Id: I9223ef5552ddb081e75de1242670862f2813e56d
2022-08-09 13:38:43 +09:00
Jayant Chowdhary
d1ce457da1 s/get_interesting_hal_pids/get_interesting_pids.
Since pids can belong to non hal processes as well, in theory.

Bug: 233130219

Test: build

Change-Id: I8ef6b2aaa871f6a8f992887a394d81c544e9cba4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-05-24 20:50:08 +00:00
Lucas Dupin
bfd1812fcb Try to load colors more frequently
During OTA, sysprops aren't available as early in the boot process.
This causes the boot animation to not have dynamic colors.

This CL tries to load the colors more frequently, at every part loop.
Before we'd only try on the first frame of each animation part.

Test: adb shell bootanimation
Fixes: 229029861
Change-Id: I1bbebf93b4fbc31d945c4181472576cf29f13bc7
2022-04-25 15:57:38 -07:00
joenchen
85b339fb24 bootanimation: correct logo position and size after resolution changed
The resolution may be changed while the boot animation is playing.
mInitWidth and mInitHeight store the original resolution, and then the
animation coordinate and size are recalculated according to the ratio
(mWidth/mInitWidth and mHeight/mInitHeight).

Bug: 228605923
Test: change resolution and then reboot to check the animation
Change-Id: Id09490ecf7fc4b3e1a6baf073c134f357e9b327f
(cherry picked from commit 764ea04421)
Merged-In: Id09490ecf7fc4b3e1a6baf073c134f357e9b327f
2022-04-20 07:05:15 +00:00
Tyler Gunn
e1edc97d38 Merge "Add telecom log marking shell command." am: 5b04c63c64 am: b984978ad7 am: 5f44a37baa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2061586

Change-Id: I8b7c0ed95bb77dd0761eebafa2deb645ec728163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 16:36:33 +00:00
Tyler Gunn
043bb30f98 Add telecom log marking shell command.
We often get bugs where testers have executed a LONG list of test steps.
It becomes extremely difficult to know where in the logs corresponds to
which test script step.

This adds a new telecom shell command:
adb shell telecom log-mark Testing 1 2 3

This command adds a USER_LOG_MARK event log item to all ongoing calls and
to the general telecom logs with the specified message.

Test: Tested using the new shell command to mark the telecom logs in and out of calls.
Fixes: 228895073
Change-Id: Ic11edc777e57a4fc8748a42c931379faf7cea671
2022-04-12 11:14:14 -07:00
Dave McCloskey
5a608433a3 Update LockSettingsCmd's showUsage method to defer to calling
"locksettings help".

This removes the duplication and also fixes the
current behavior showing the incorrect documentation for "locksettings
verify" which does *not* log in the user.

Test: adb shell locksettings
Test: adb shell locksettings clear --old 0000 (to verify other commands
still work)

Change-Id: I429288a9e4280d41213e1c0fd8234d3666888abc
2022-04-05 17:06:15 +00:00
Ricky Niu
9d86af2555 Modified the resetUsbPort command to Asynchronous
Because the resetUsbPort API modified to Asynchronous,
related function need to be modified.

Bug: 217369748
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: Ieef549736532688ff356b4bb8fa790fb10403300
2022-04-01 18:16:45 +00:00
Ricky Niu
66c77dfdf9 Add resetUsbPort in svc usb command
Implement resetUsbPort to support manual testing on
real device to verify feature functionality from App layer
and VTS test.

Bug: 216387845
Test: Manual test with "svc usb reset UsbPort" correctly

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: Ieb29de3dd398859607490548a1f3a16f8359ae8f
(cherry picked from commit 519062eabd)
Merged-In: Ieb29de3dd398859607490548a1f3a16f8359ae8f
2022-04-01 18:12:33 +00:00
Lucas Dupin
cd25684a0c Reload color sysprops after failing
During OTA, sysprops aren't load as fast as during regular boot.
This causes the animation to not be able to pick up the dynamic colors.

We can mitigate this issue by trying to reload the sysprops at the
beginning of each animation part.

Test: manual
Bug: 227381265
Change-Id: I4397079aacc52acb5cda54a925f70e4f5c745b3f
2022-03-29 23:38:50 +00:00
Nikita Ioffe
99ba880e55 Add a way to instrument sdk sandbox processes
The following restrictions applies to the instrumentation of the sdk
sandbox processes:

* Instrumentation must be signed with the same certificate as the client
  app the instrumented sdk sandbox belongs to.
* If there is a running instance of to-be-instrumented sdk sandbox
  process, then it will be killed before the instrumentation starts.
* While instrumentation is running the client app won't be allowed to
  connect to the instrumented sdk sandbox process.
* The --no-restart instrumentation of the sdk sandbox processes is not
  supported.

Bug: 209061624
Test: atest SdkSandboxInprocessTests
Change-Id: Ia4b145c091bf8da600a77ea82fc9e3cd97757275
2022-03-18 14:50:21 +00:00
Elliott Hughes
ff645f8555 Merge "Revert "Disable pointer authentication in app processes."" am: b9fc2910ca am: a236c37517 am: 95dc32f484
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021036

Change-Id: Ic1be7b048ce64956ce5276c26a5a031e6192e3d6
2022-03-14 22:11:21 +00:00
Pirama Arumuga Nainar
3900e2887b Merge "Disable "-readability-duplicate-include" tidy warning in generated file" am: e6c05a8fd7 am: 07888666d2 am: 92d4ec9cd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2019339

Change-Id: Id5cca221c2e7c80c66d3233020e0900faee230c2
2022-03-14 21:59:01 +00:00
Elliott Hughes
b9fc2910ca Merge "Revert "Disable pointer authentication in app processes."" 2022-03-14 21:09:31 +00:00
Elliott Hughes
90d4d6040c Revert "Disable pointer authentication in app processes."
Revert "Disable pointer authentication in app processes."

Revert submission 1954983-master-I3030c47be9d02a27505bd4775c1982a20755758c

Reason for revert: PAC has shipped with S, and we're going with app compat outreach rather than regressing security.
Reverted Changes:
I3030c47be:Disable pointer authentication in app processes.
I3030c47be:Disable pointer authentication in app processes.

Change-Id: I75c4d2d3cf59aecf99d9c9d37c6750f999e74de8
2022-03-10 18:01:04 +00:00
Pirama Arumuga Nainar
8186f296d0 Disable "-readability-duplicate-include" tidy warning in generated file
/buildbot/src/android/master-plus-llvm/out/soong/.intermediates/frameworks/base/cmds/idmap2/libidmap2_protos/android_arm64_armv8-2a_cortex-a55_static/gen/proto/frameworks/base/cmds/idmap2/libidmap2/proto/fabricated_v1.pb.h:34:1: error: duplicate include [readability-duplicate-include,-warnings-as-errors]

Change-Id: I5da44b2714ce8455a4b8af7556decfc1c24c0d11
Test: presubmit
2022-03-10 05:25:35 +00:00
Treehugger Robot
199359822e Merge "Forward svc bluetooth to "cmd bluetooth"" 2022-03-09 12:50:31 +00:00
Treehugger Robot
780bfed3f9 Merge "Add additional logs for bootanimation" am: 51a4954076 am: 4aa84137f0 am: a73e533986
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991970

Change-Id: Ia36255c49f4323125ac37b812b28a87091c8cd79
2022-03-04 03:03:17 +00:00
Treehugger Robot
4aa84137f0 Merge "Add additional logs for bootanimation" am: 51a4954076
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991970

Change-Id: Ie8d99a45040925a1e9957dcf4ac1dfbcf65d9752
2022-03-04 02:29:48 +00:00
Treehugger Robot
51a4954076 Merge "Add additional logs for bootanimation" 2022-03-03 20:08:23 +00:00
Yoshiaki Maruoka
9ef19b85cb Add additional logs for bootanimation
The information will be printed
 - Message if no animation file
 - File name when it's loaded
 - Image name and path, loop information when playing
 - Play time at the end

Bug: 220161782
Test: Manual, check logcat with and without bootanimation.zip
Change-Id: I0e16bdeb4456a423649a27f7ae88f256e3fa3d19
2022-03-03 07:40:43 +00:00
TreeHugger Robot
c66198eec4 Merge "Forward svc bluetooth to "cmd bluetooth"" into tm-dev 2022-03-01 16:18:52 +00:00
Tim Murray
2538e20d62 incidentd: fix race in waitpid_with_timeout
waitpid_with_timeout has a race between a child process exiting and
the signal being blocked. Add an early waitpid to detect a child that
exited quickly.

Test: TH
Bug: 215574756
Change-Id: I6c7e9998d5b848c6144769f218fbcd7a0ee154bf
(cherry picked from commit 1f3012d223)
2022-02-23 22:20:18 +00:00
Yi Kong
0a1eeefb0d Merge "idmap2: Remove more redundant "using" statements" am: ee8e50ac1f am: a872a08411 am: e676492866
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991775

Change-Id: I2bef74e6be9d76721e6ef5f4e516f7da8dc574ab
2022-02-23 19:05:49 +00:00
Yi Kong
a872a08411 Merge "idmap2: Remove more redundant "using" statements" am: ee8e50ac1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991775

Change-Id: I029e6c4037a86993923a3e204df4fef60a4de2bf
2022-02-23 18:20:44 +00:00
William Escande
a956966554 Forward svc bluetooth to "cmd bluetooth"
BluetoothShellCommand is now implementing the shell command
Fix: 216233593
Test: manual: adb shell svc bluetooth enable
Test: manual: adb shell svc bluetooth disable

Merged-In: Icbd0395624585d5a22663472b5897ed4518e2670
Change-Id: Icbd0395624585d5a22663472b5897ed4518e2670
2022-02-23 16:30:15 +01:00
William Escande
3d43c2345c Forward svc bluetooth to "cmd bluetooth"
BluetoothShellCommand is now implementing the shell command
Fix: 216233593
Test: manual: adb shell svc bluetooth enable
Test: manual: adb shell svc bluetooth disable

Change-Id: Icbd0395624585d5a22663472b5897ed4518e2670
2022-02-23 15:48:56 +01:00
Yi Kong
56f2cf6fa5 idmap2: Remove more redundant "using" statements
Test: presubmit
Bug: 219872355
Change-Id: I74e5b38400060477f9d50b51b1f261ec6a181dd1
2022-02-20 14:36:15 +08:00
Yurii Zubrytskyi
279475e4e6 Merge "idmap2: Remove redundant "using" statements" am: 871327e261 am: 5e0db6292d am: 22af5f4dd0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1990330

Change-Id: Id60f75ef1d69b8f501e21ce8c1ccd8ff9f8548a6
2022-02-18 05:55:09 +00:00
Yurii Zubrytskyi
5e0db6292d Merge "idmap2: Remove redundant "using" statements" am: 871327e261
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1990330

Change-Id: I362da94b4ee8445aff305872024a4aff55cc9d3d
2022-02-18 05:09:39 +00:00
Yurii Zubrytskyi
6c47b0b3d9 Merge "[idmap] Add logging for the service start/stop" 2022-02-17 20:21:51 +00:00
Yi Kong
b0981d9287 idmap2: Remove redundant "using" statements
They are already under the same namespace.

Test: presubmit
Bug: 219872355
Change-Id: Ie09d529bc9d9f690feb5dba16fe174b89a14ee08
2022-02-17 17:53:42 +00:00
Yurii Zubrytskyi
280a4cfbc4 [idmap] Add logging for the service start/stop
As of now it's impossible to tell what happened or is happening
to idmap2d - and that's the important thing in the bug. Adding
some logging to help investigating it if it happens again

Bug: 219393586
Test: manual
Change-Id: Ia6615f80d8a4b7ba94714f0af10e09ba9d709bb6
2022-02-16 16:58:30 -08:00
Nikita Ioffe
0b977ecd05 Add a flag to always do the cert signature check
Right now signature check is unconditionally bypassed on debuggable
builds, which makes things a little bit confusing - instrumentation will
succeed on debuggable build, but fail on the user build.

Bug: 209061624
Test: adb shell am --always-check-signature com.android.tests.supplemental.process/androidx.test.runner.AndroidJUnitRunner
Change-Id: I66d6331156d4503e147141872cbe73a9330ea701
2022-02-16 17:32:36 +00:00
Mårten Kongstad
546e8e9b3f idmap2: fix clang-format warnings
Bug: N/A
Test: frameworks/base/cmds/idmap2/static-checks.sh
Test: atest --host idmap2_tests
Change-Id: I5cd8d512df188371d4b2096246e51effbcbc1a61
2022-02-14 09:29:18 +00:00
Xin Li
5ad6db7742 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I8cfa435bb6233818adb9cc99dadeeb06a03443d5
Change-Id: Ib93992d88fd1704179009a3872798b9e7b83a6d1
2022-02-11 07:25:43 +00:00
Pirama Arumuga Nainar
2810da2c61 Merge "Fix Wbitwise-instead-of-logical introduced by clang-r445002" am: 9f165ca3e1 am: 665796dd6d am: bdd7c5eb53 am: 138c4fe4bc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1961919

Change-Id: I7cbc2ef02aa2b6f235d6a63aa008f9764188f30d
2022-01-28 21:19:00 +00:00
Pirama Arumuga Nainar
bdd7c5eb53 Merge "Fix Wbitwise-instead-of-logical introduced by clang-r445002" am: 9f165ca3e1 am: 665796dd6d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1961919

Change-Id: I6640db34b9ed6f3a4c64e0eb718c0eb0c725113e
2022-01-28 20:50:28 +00:00
Pirama Arumuga Nainar
9f165ca3e1 Merge "Fix Wbitwise-instead-of-logical introduced by clang-r445002" 2022-01-28 20:14:07 +00:00
Peter Collingbourne
192923ab5f Merge "Disable pointer authentication in app processes." am: 4b799b3691 am: 373ab4c0d8 am: 1d5943f8e4 am: 346030ce52
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954983

Change-Id: I6283a782aadd8db730cc30043c68a7e48036d87d
2022-01-24 22:17:25 +00:00
Peter Collingbourne
1d5943f8e4 Merge "Disable pointer authentication in app processes." am: 4b799b3691 am: 373ab4c0d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954983

Change-Id: I9f6de7f1452011ff40dabb7c489c0423974639f5
2022-01-24 21:50:23 +00:00
Peter Collingbourne
4b799b3691 Merge "Disable pointer authentication in app processes." 2022-01-24 21:17:30 +00:00
Pirama Arumuga Nainar
bf3cc242fc Fix Wbitwise-instead-of-logical introduced by clang-r445002
Bug: http://b/215753485

frameworks/base/cmds/incidentd/src/WorkDirectory.cpp:283:38: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
            report->set_all_sections(report->all_sections() | args.all());
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                            ||
frameworks/base/cmds/incidentd/src/WorkDirectory.cpp:283:38: note: cast
one or both operands to int to silence this warning

Test: Build with new clang
Change-Id: I8dc614e274c95f8941bf390cb68c60d0328bb31b
2022-01-21 14:16:03 -08:00
Peter Collingbourne
69538cf7f3 Disable pointer authentication in app processes.
Unfortunately we have discovered that some applications in the wild
are using PAC instructions incorrectly. To keep those applications
working on PAC enabled devices, disable PAC in application processes
for now.

Bug: 212660282
Change-Id: I3030c47be9d02a27505bd4775c1982a20755758c
2022-01-19 13:35:54 -08:00
Thomas Stuart
c8460d8e21 cleanupOrphanPA's feature framework (2/2)*
Bug: 210134615
Test: Unit + manual
Change-Id: Ic350e4e45c0d1597c6f61e3e3e717b3a2c1bb099
2022-01-19 00:22:04 +00:00
Ricky Wai
9d08478274 Do not throw exception if storage app data isolation is not enabled
As the feature is not enabled yet, we should not throw exception and
block all tests. We should show error message instead.

Bug: 213442885
Test: atest android.os.storage.cts.StorageManagerTest#testCallback
Change-Id: I9a46c9ed1aeb59d982ba3841943016bd7a357ac5
2022-01-13 18:37:58 +00:00
Rafal Slawik
1334f1a76c Increase size limits
Incidents contain traces with average size of 8 MB. We hit the upload
size limit of 100 MB before the upload count limit of 50. Increase the
size limit to 400 MB to upload more traces.

Previous increase: http://ag/7695408

Bug: 214244170
Test: incidentd_test
Change-Id: Iae2f856d375f126f23191d152e4a46243fa3f38f
2022-01-12 17:26:19 +00:00
Josh Yang
f95b2007a3 Change the bootanim time file location.
This change moves the bootanim time file location from /data/system/time
to /data/bootanim/time. This change helps us remove the access to
system_data_file from bootanim.

Bug: 210757252
Test: Boot animation can show time. No SELinux violations.
Change-Id: Ie61155f8976f3b8c6ad5ceac1826140c1455ad54
2021-12-23 14:35:34 -08:00
Thiebaud Weksteen
2a32ff7e14 Merge "Enable clock only when supported by product" 2021-12-13 00:56:44 +00:00
Thiébaud Weksteen
08de4439ac Enable clock only when supported by product
In 9748086, a detection for clock drifting was implemented. It relies on
2 files that must be provided by the product
(/data/system/time/last_time_change and
/data/system/time/time_is_accurate). Generally, these files are not
available which triggers an SELinux denial error message.

Introduce a new property ("persist.sys.bootanim.clock.enabled") which
can be set by a product to enable this feature (default is false). For
future reference, it is not sufficient to only enable this property, the
product must also provide the files described above (see
BootAnimation::updateIsTimeAccurate).

Bug: 62954877
Test: lunch r11-userdebug && m
Change-Id: Ia27e69547e3d898925029dc0c2be4ad717891c57
2021-11-23 10:49:49 +11:00