- Oct 06, 2023
-
-
Eric Biggers authored
The name of this source file does not match the test class it contains. Rename the source file to match the test class. Flag: TEST_ONLY Test: atest TrustTests Change-Id: Ib1b4bbcf980545dd0ee7b08951185d4038954e37 Merged-In: Ib1b4bbcf980545dd0ee7b08951185d4038954e37 (cherry picked from commit 2e98f22c)
-
- Sep 25, 2023
-
-
Jiyong Park authored
Before this change, when a death recipient is set on a binder proxy via linkToDeath, a JNI global ref to the recipient object was created. That global ref is cleared only when unlinkToDeath is explicitly called or binderDied is notified. In addition, since binderDied didn't give the IBinder which has died, people has kept a strong reference to IBinder in the death recipient object. Ex: class FooHolder implements Binder.DeathRecipient { private IFoo mFoo; public FooHolder(IFoo foo) { mFoo = foo; // this!!! mFoo.linkToDeath(this, 0); } @Override public void binderDied() { // know that IFoo has died } } Unfortunately, this is prone to leak. Even if there's no reference to FooHolder in your program, it is kept in memory due to the JNI global ref as mentioned above. It means that you keep IFoo as well, and that in turn keeps the binder service in the remote side. As a result, binderDied will never be called (well, except when the server process crashes). The only way to release this object is calling unlinkToDeath explicitly when you drop references to FooHolder. However, it's error prone and keeping that practice is hard to be enforced. Recently, the need for this pattern has become weaker as we introduced binderDied(IBinder who). However, the API is quite new and its use is not mandated. There still are many cases where this pattern is used. This change is an attempt to fix the issue without having to touch the existing uses. The idea is to change the way that death recipient objects are strongly referenced - depending on whether you are targeting Android V+ or not. If targeting Android V+, the death recipient object is "weakly" referenced from JNI. Instead, it is "strongly" referenced from the BinderProxy object it is registered at. This means that if you drop a BinderProxy object, you are dropping its death recipients as well, unless you keep references to the recipients separately. For apps targeting pre-V versions, we keep the JNI strong reference. An important implication of this is that you won't get binderDied if you drop BinderProxy object before the binder actually dies. This actually is the documented behavior and has been the actual behavior "if you don't use the FooHolder pattern mentioned above". I'd argue that this CL fixes the undocumented incorrect behavior. However, we should be conservative when making any behavioral change, thus we are hiding this change behind the target SDK level. Bug: 298374304 Test: atest BinderLeakTest BinderLeakTest_legacy Change-Id: Ibb371f4de45530670d5f783f8ead8404c39381b4
-
- Sep 13, 2023
-
-
Pete Bentley authored
* Outdated defaults for plain HTTP. * Replaced expired test pins with the current intermediate. issuer cert for android.com. * Replaced obsolete trust anchors with a single GTS Root cert. * Fixed connection tests to use startHandshake() not getInputStream(). * Made checkstyle happier. Would have converted to JUnit4 too, but unsure how to migrate ActivityUnitTestCase correctly. Bug: 259406200 Test: NetworkSecurityConfigTests Change-Id: I385fc4bb67cd937e9e5f7b291f2cee37fd9ad715
-
- Sep 11, 2023
-
-
Colin Cross authored
Fix kotlin nullable errors that were exposed by setting the retention of android.annotation.NonNull and android.annotation.Nullable to class retention. Bug: 294110802 Test: builds (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f3413858f14bf7398453603a8df50a8a9169f6a4) Merged-In: I35530e7ed63a647c39018ef0ee850ceea4dbc0ba Change-Id: I35530e7ed63a647c39018ef0ee850ceea4dbc0ba
-
Colin Cross authored
Fix kotlin nullable errors that were exposed by setting the retention of android.annotation.NonNull and android.annotation.Nullable to class retention. Bug: 294110802 Test: builds (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:37a0857d61b9e10abe3de1463ffdf4b1d7d5d333) Merged-In: I8113aa76a60904bc70211f95b1e4c05d11e4ae85 Change-Id: I8113aa76a60904bc70211f95b1e4c05d11e4ae85
-
- Sep 08, 2023
-
-
Eric Biggers authored
TrustManagerService#refreshDeviceLockedForUser() incorrectly considers the device to be unlocked by a trust agent whenever a trust agent has granted trust. This ignores the conditions that TrustManagerService#updateTrust() has for recognizing trust grants. This code used to be correct, but it became incorrect in Android 10 when trust agents were made to extend unlock rather than actively unlock. The correct state is sent to Keyguard, while the incorrect state is sent to Keystore. This would cause UnlockedDeviceRequired keys to sometimes be usable when the device is locked, though since Android 12 this bug is hidden by other bugs with UnlockedDeviceRequired keys that make them unusable in many cases. However, these bugs are planned to be fixed. Therefore, fix this bug by making refreshDeviceLockedForUser() use mUserTrustState, which holds the user's authoritative trust state. Bug: 296464083 Bug: 298249081 Flag: 296464083 Test: adb shell device_config put hardware_backed_security android.security.fix_unlocked_device_required_keys true atest TrustTests adb shell device_config put hardware_backed_security android.security.fix_unlocked_device_required_keys false atest TrustTests Change-Id: I0880685c23ebe71a799671fa611fafb42642fa83
-
Colin Cross authored
Fix kotlin nullable errors that were exposed by setting the retention of android.annotation.NonNull and android.annotation.Nullable to class retention. Bug: 294110802 Test: builds Change-Id: I31c4f4d256ff8dd2b6ed1f6ed74844ccaf7a4814 Merged-In: I31c4f4d256ff8dd2b6ed1f6ed74844ccaf7a4814 (cherry picked from commit c5a0cfdd)
-
Eric Biggers authored
- Make assertLocked and assertUnlocked check KeyguardManager#isDeviceLocked, in addition to what they were checking before. This is important, as this verifies what TrustManagerService (and thus also Keystore) considers the device locked state to be. - Rename assertUnlocked to assertUnlockedAndTrusted. This makes it clear that it checks for trusted (which implies unlocked), not just unlocked (which does not necessarily imply trusted). - Rename the inner class LockState to TrustState. This makes it clear what it actually is. - Improve the class comment. Bug: 296464083 Bug: 298249081 Flag: TEST_ONLY Test: atest TrustTests Change-Id: I865ec19dff7ebe00ff083da29154e3c9cb846574
-
- Sep 07, 2023
-
-
Bryce Lee authored
This change adds a new callback from TrustManagerService when the enabled trust agents change. This addition enables TrustListeners to react when an authentication method has been enabled by the user. Test: atest KeyguardStateControllerTest#testOnEnabledTrustAgentsChangedCallback Test: atest KeyguardUpdateMonitorTest#testOnEnabledTrustAgentsChangedCallback Test: atest TrustManagerServiceTest#reportEnabledTrustAgentsChangedInformsListener Fixes: 277845892 Fixes: 279231562 Change-Id: Id6d4b65abb4de77f52f1d48499eed3ca26384663 (cherry picked from commit 3580317c) Fixes: 299529171 Merged-In: Id6d4b65abb4de77f52f1d48499eed3ca26384663
-
- Aug 22, 2023
-
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I14164732acadf87cd629cfa73a731c47ad8b5168
-
Eric Rahm authored
`getRenderScript` is never actually used, now that `RenderScript` is deprecated we can go ahead and remove it. Bug: 266947193 Test: m SmartCamera (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:80c54ee85c4c8863ccf55b1d49b313499622ae04) Merged-In: Id38295ebf0d240f34e162471c53ff266262b2f0e Change-Id: Id38295ebf0d240f34e162471c53ff266262b2f0e
-
Eric Rahm authored
`AllocationBacking` is never actually used, now that `RenderScript` is deprecated we should go ahead and remove it. Bug: 266947193 Test: m SmartCamera (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9456ddc17ee5b1ef85a99292340b187128e49964) Merged-In: If54972b7d5b8f9d4b1274837255127345d95086c Change-Id: If54972b7d5b8f9d4b1274837255127345d95086c
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: If129d646e8911f5cc431b74490f763cb7bdb83e0
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I99097f77917eb64fb0cc6ddb2137d836de898552
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I6591e94aab762f06df283435fcec75c410c5d176
-
- Aug 21, 2023
-
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I82d47d7abe48e9ca5652dff588d5cd1b754f2eea
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: Icec32a6672f514156401230df37cc425525edd87
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: Ie88aa04de93e25e6286406b0d8cd8e37e30885bc
-
Chan Kim authored
See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I6aac693d52eb9fa9f6640bebccfce169dfa67fa5
-
- Aug 09, 2023
-
-
Colin Cross authored
Fix kotlin nullable errors that were exposed by setting the retention of android.annotation.NonNull and android.annotation.Nullable to class retention. Bug: 294110802 Test: builds Change-Id: I0736e8abf503c80b92e3762bed908400ffedb335
-
- Jul 28, 2023
-
-
rambowang authored
- Replace CarrierConfigChange receiver with listener - Get subset of carrier configs with new API instead of private method Bug: 265961787 Test: atest TelephonySubscriptionTrackerTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:628147b7a0e1f6126245ae702f31bb2cf5bd1d4d) Merged-In: I93f14421624ac76bdf84c06cfd4c067bf2ccde7a Change-Id: I93f14421624ac76bdf84c06cfd4c067bf2ccde7a
-
- Jul 19, 2023
-
-
Lucas Dupin authored
And app can call notifyColorsChanged() on a destroyed engine, which would cause problems, given it doesn't have a surface anymore. The same is true to visibility notification, where the engine can be destroyed before it had the opportuinity of drawing its first frame (if it had to load large assets for example) Test: manually change wallpapers Test: WallpaperServiceTest (both CTS and internal) Fixes: 291053623 (cherry picked from commit 650a7f8a) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f9ac2b1703c62f53cd5c504e1ac7a3371b4fbe9) Merged-In: Iff83603695cff491f2045586d5b3f4658f7ae55a Change-Id: Iff83603695cff491f2045586d5b3f4658f7ae55a
-
- Jul 12, 2023
-
-
Patrick Baumann authored
Change-Id: I9ebb972e551ab1a8bc3c77cefa7bda8df9a0b278 Fixes: 288146151 Bug: 288146151 Test: N/A
-
- Jul 11, 2023
-
-
Josep del Rio authored
As part of the trunkstable migration, we need to add a component to the OWNERS file of the InputTests module. Bug: 288137971 Test: not needed Change-Id: Ibab9174832b6cb98993b33543a3d0393248dbab9
-
- Jun 30, 2023
-
-
Victor Hsieh authored
The test collects expected APEX package names from listing /apex by a shell command. The shell command also tries to remove the noise (normally an APEX has two entires, see below). $ ls -d /apex/*/ /apex/com.android.adbd/ /apex/com.android.adbd@340815002/ ... /apex/com.google.mainline.primary.libs@340716000/ /apex/sharedlibs/ The test used to deduplicate by filtering out '@'. But apparently an (DLCA) APEX only has one entry with '@'. With this change, the shell command removes '@\d+' then deduplicate the strings. Bug: 288551133 Test: BinaryTransparencyHostTest#testCollectAllApexInfo (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5a1d0cc3454094a930978bcac1281aafc71475d3) Merged-In: I4bc3e8226dd7790aa276ac5dfad7371c60046384 Change-Id: I4bc3e8226dd7790aa276ac5dfad7371c60046384
-
- Jun 16, 2023
-
-
Yan Yan authored
IpSecTunnelInterface#setUnderlyingNetwork will throw IAE when the underlying network is not functional and has null LinkProperties. This commit updates VCN to explicitly handle this exception, instead relying on the mechanism for handling all uncaught exceptions. Bug: 240112879 Test: atest CtsVcnTestCases & FrameworksVcnTests Change-Id: I2fdf1da542eb04d56a04e04c762f8c2c19828071
-
Alan Stokes authored
This reverts commit 2f8ca4af. Reason for revert: This doesn't actually do what I thought it did. And b/286514492 has a more general fix. Bug: 239817928 Change-Id: Iffaaf3d9aacc8bd42afb2756517eb91690e8ffe3
-
- Jun 15, 2023
-
-
Hui Kang authored
Test: presubmit Bug: 286084672 Change-Id: I87e163bfd3d68c0161d2ae5bba87f6b5fdd46648
-
- Jun 14, 2023
-
-
Ming-Shin Lu authored
Ensure UiBenchActivityTransitionsAnimationMicrobenchmark launching EditTextTypeActivity that calls sendKeyDownUpSync is allowed without throwing SecurityException. Bug: 241190603 Test: atest UiBenchEditTextTypingMicrobenchmark Change-Id: Id3c3490d7ab98a17da4e07d8d62d048c98ff1ec4
-
- Jun 12, 2023
-
-
Yan Yan authored
Allows IKE library metrics to identify and log the system clients This commit also updates VcnManagementServiceTest to mock out createAttributionContext Bug: 278943609 Test: manually verified the metrics Test: CtsVcnTestCases, FrameworksVcnTests, Ikev2VpnTest, VpnManagerServiceTest, VpnTest Change-Id: I8b326de0484f9c97eb1b12f27a792c5ebf35ba1e Merged-In: I8b326de0484f9c97eb1b12f27a792c5ebf35ba1e
-
- Jun 09, 2023
-
-
Yan Yan authored
Allows IKE library metrics to identify and log the system clients This commit also updates VcnManagementServiceTest to mock out createAttributionContext Bug: 278943609 Test: manually verified the metrics Test: CtsVcnTestCases, FrameworksVcnTests, Ikev2VpnTest, VpnManagerServiceTest, VpnTest Change-Id: I8b326de0484f9c97eb1b12f27a792c5ebf35ba1e
-
- Jun 08, 2023
-
-
John Reck authored
Have Bitmap.createBitmap(sourceBitmap, ...) preserve any gainmaps if present, transforming the gainmaps in the same way. This addresses 2 common usages: 1) Rotating bitmaps to handle EXIF orientations 2) Bitmap.createScaledBitmap() to do "static" scaling Bug: 286131154 Test: SilkFX GainmapTransformsTest Change-Id: I5a62dccbb2c70bc38cca581b161eef792c8b2a78
-
- Jun 07, 2023
-
-
Alan Stokes authored
This test, and the code it is testing, makes use of the event log - looking for specific info in it, and writing to it. Make sure we capture the event log during runs of the test so that we have some chance of diagnosing falures. Bug: 239817928 Test: N/A Change-Id: I610c7ddd67381d04c35fd42343e21098c150beb5
-
- Jun 03, 2023
-
-
czq authored
New alert window was added to warn when 32-bit apps are launched on 64-bit devices. However, that interrupts some UI tests when they were launched in `module-abi: x86` or `module-abi: armeabi-v7a` mode. Add the command to disable the warning dialog for these tests. Bug: 284559054 Test: atest Change-Id: I1a8ecce60d95e27b00f45231f13c6aa80d1cf0bc
-
- May 31, 2023
-
-
Yohei Yukawa authored
InputMethodStressTest is yet for internal stability testing only. Not ready for formal compatibility tests such as vts. Fix: 284542566 Fix: 284950559 Test: atest InputMethodStressTest Change-Id: I5792b0d84b049f8a590cb1146a27882c7084129f
-
- May 27, 2023
-
-
czq authored
Although we set "android:configChanges="orientation|screenSize" for TestActivity, it is still recreated after rotation on tablets. After recreation, the old activity and EditText view are dropped, which causes the test failures. Fix this by: 1. Remove android:configChanges to trigger recreation at all devices 2. Record the last created instance of TestActivity to get the new activity 3. Verify the show/hide behavior for the new acitivity. Note that the keyboard will not show after activity recreation only when visibility flag is SOFT_INPUT_STATE_ALWAYS_HIDDEN. Bug: 275666243 Test: atest com.android.inputmethod.stresstest.ImeOpenCloseStressTest#testRotateScreenWithKeyboardOn Change-Id: I113c0b1376febed5cb6dace9cd0467339f77c699
-
- May 26, 2023
-
-
Pablo Gamito authored
So we can still reference and use the off display. Required for FaaS scenario extraction to determine device orientation even if the display is off. Bug: 281084744 Test: atest FlickerLibTest && atest FlickerTests Change-Id: I027d5505bfc5d615a4e16c611f2cdef3c5aaa508
-
- May 24, 2023
-
-
Hui Kang authored
These tests already have IwTest annotation. The IwTest tests will be merged with platinum tests using the PlatinumTest annotation. The IwTest annotation will be deprecated and removed. Test: make Bug: 283409062 Change-Id: Id1554220acc23bc181bbb68105f6e863422f5e8f
-
- May 22, 2023
-
-
Sam Dubey authored
Postsubmit-only test groups don't need to be in a specific directory. Bug: 283262732 Test: N/A Change-Id: Ie329253c93f95d19a66c40399f4f72704b20fd84
-
czq authored
Bug: 280141638 Test: atest com.android.inputmethod.stresstest.DefaultImeVisibilityTest#showHideDefaultIme Change-Id: I5c4e1ea528fdefb676f0db7943098778686624de
-