Commit Graph

16084 Commits

Author SHA1 Message Date
Treehugger Robot
bae3bf9b63 Merge "Show "Not available" summary when hotspot speed is unavailable" into udc-d1-dev am: a99c52e160 am: 34a254fc0c am: cc4410e536
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23601566

Change-Id: Idfc98b457000a4968a47651b35f271e3bc20c3bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 06:33:29 +00:00
Treehugger Robot
cc4410e536 Merge "Show "Not available" summary when hotspot speed is unavailable" into udc-d1-dev am: a99c52e160 am: 34a254fc0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23601566

Change-Id: I1f9fa9e219f1192945824aa4b07c9149e8a2876f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 05:42:42 +00:00
Treehugger Robot
a99c52e160 Merge "Show "Not available" summary when hotspot speed is unavailable" into udc-d1-dev 2023-06-09 04:29:16 +00:00
Weng Su
7171e0a29b Show "Not available" summary when hotspot speed is unavailable
- Show "Not available" summary when hotspot bands (5 GHz and 6 GHz) are unavailable

- Update debug logs to track down issues

Bug: 285769583
Test: manual test
atest -c WifiHotspotSpeedSettingsTest
atest -c WifiHotspotSpeedViewModelTest

Change-Id: If1050c120b4b612d3a9adbe886c2f12db82b793e
2023-06-08 21:38:01 +08:00
Hao Dong
3d81e3893e Clean up multi window toast on FingerprintEnrollEnrolling.
ag/22361082 and ag/22460413 have added a dialog preventing entering
FingerprintEnrollEnrolling. So showing toast and early return in
onCreate() will never be reached. This CL cleans up this obsolete code
block.

Bug: 283244022
Test: N/A

Change-Id: Ifc5f3d909a275c735035146e44f70d2b5d5b51e3
2023-06-07 18:19:13 +00:00
Treehugger Robot
24e5321dfb Merge "Move DisplayDataSizeTest to AndroidJunitTest" 2023-06-07 01:25:28 +00:00
Chun-Ku Lin
24b045c987 Move DisplayDataSizeTest to AndroidJunitTest
**Root cause**
- When DisplayDataSizeTest was created, it was ignored already due to
b/214161063. That means the test never passed in the beginning.

- The default display's type in Robolectric is TYPE_UNKNOWN. However, in
the constructor of DisplayDensityUtils, we check all the display that is
not TYPE_INTERNAL can't be a default display. Hence the test failed.

- Even if we shadow the DisplayInfo to have TYPE_INTERNAL for default
  display, the test still failed, because whenever we tried to get the
  default display density we always get 0, and doens't have other diplay
  density values. Hence we can't test increasing the display size in
  Robolectric Test.

Note: the solution here is a workaround for waiting AsyncTask to finish.
If we ever change the implementation in DisplayDensityUtils to not use
AsyncTask, we'll need to update the test.

Bug: 279082331
Test: atest DisplaySizeDataTest --iterations 20

Change-Id: I3ccee5e7ba4d9399a8b715d84a9d53e106f88762
2023-06-07 00:06:48 +00:00
Ale Nijamkin
fd48767844 Merge "Fixes nav stack issue." into udc-dev am: b5dda005fd am: 1e3ecf6352 am: dc6449157b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23573917

Change-Id: Ifad706722aa509bcad777a6af0fd4749629eb5b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 21:10:27 +00:00
Ale Nijamkin
d31487b529 Merge "Fixes nav stack issue." into udc-dev am: b5dda005fd am: 306421f87f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23573917

Change-Id: I6ca144e73e9d3e4465dcfd0325b57add2f61f426
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 20:23:19 +00:00
Ale Nijamkin
1e3ecf6352 Merge "Fixes nav stack issue." into udc-dev am: b5dda005fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23573917

Change-Id: I93ad7cae5cf900539bbded918807ea19b4c358b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 19:44:29 +00:00
Alejandro Nijamkin
6f9f3a4594 Fixes nav stack issue.
By marking the Intent that's being sent to WPP as "launched from
settings", the code in CustomizationPickerActivity can correctly
conclude that the multi-pane wrapper does not need to be applied to the
intent, preventing the odd "disordering" of the back stack in the bug.

Fix: 284809020
Test: manually verified, on a large screen device with a multi-pane
settings configuration, that going to Display > Lock screen > Shortcuts
and then swiping back off the left edge of the display correctly exits
settings instead of revealing an incorrect screen like it did in the
bug.
Test: also manually verified that the long-press on the home screena and
on the lock screen paths both open the right tab in WPP in settings
correctly.

Change-Id: Iac2b4e9fa5bab91b6a5251f1c51b4d21a0824f00
2023-06-05 16:02:17 -07:00
Treehugger Robot
7dd9e05701 Merge "Use spy to inject the return value of a boolean resource" 2023-06-05 17:29:36 +00:00
Chun-Ku Lin
7e868fa690 Use spy to inject the return value of a boolean resource
**Root cause**
The test was failing because it was not grabbing the boolean resource
from the values-mc999 folder. I'm not sure what changed in Robolectric
that causes it not able to find the resources based on the
qualifiers.

Bug: 279082331
Test: atest TopLevelAccessibilityPreferenceControllerTest
Change-Id: Ie738d1ada1a87b48f34efb7e0477c691c4d44d1e
2023-06-03 06:29:43 +00:00
TreeHugger Robot
2247bb0a0e Merge "Update the FlashNotificationsPreferenceFragmentTest to return correct metric category" 2023-06-03 05:52:27 +00:00
Chun-Ku Lin
0f0461518e Update the FlashNotificationsPreferenceFragmentTest to return correct
metric category

**Root Cause**
The test was written when the metric category is set to 0. After we
update the metric category to FLASH_NOTIFICATION_SETTINGS in the
FlashNotificationsPrefereenceFragment, we forgot to update the test.

Bug: 279082331
Test: atest FlashNotificationsPreferenceFragmentTest
Change-Id: Icd709bd9e571ca264226d0ca860e5c482eae3927
2023-06-03 04:56:22 +00:00
TreeHugger Robot
463fce7dae Merge "Pass the constant actionId directly when calling performAccessibilityAction" 2023-06-03 00:11:07 +00:00
TreeHugger Robot
e6b3ba84ca Merge "Fix ToggleFeaturePreferenceFragmentTest#setupFragment_getExpectedPreferenceScreenResId" 2023-06-02 23:47:08 +00:00
Chun-Ku Lin
de5809a4f6 Pass the constant actionId directly when calling
performAccessibilityAction

**Root cause**
When constructing an AccessibilityAction, robolectric's
ShadowAccessibilityAction uses reflection to get the private static
final variable `ACTION_TYPE_MASK` to check if the passed action is a
valid action.

However, since ag/I744b3a94fe3c3cc3b559758a95ab0b5b181155bb we renamed
the internal variable, hence robolectric is not able to find the
ACTION_TYPE_MASK variable when using reflection.

By passing the action id directly when calling
performAccessibilityAction, we don't need to use
ShadowAccessibilityAction anymore.

Bug: 279082331
Test: atest AccessibilityQuickSettingsTooltipWindowTest

Change-Id: Ie956de44c9b19a2d19470ad670866d77ca272b3b
2023-06-02 23:23:22 +00:00
Chun-Ku Lin
c7cd3783ba Fix ToggleFeaturePreferenceFragmentTest#setupFragment_getExpectedPreferenceScreenResId
**Root cause**
Robolectric doesn't like to launch a spy'ed fragment. You will get an
error like java.lang.IllegalStateException: Can't access ViewModels from detached fragment

Since the test itself doesn't require launch a fragment, I removed the
setup part and renamed the test.

Bug: 279082331
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: Iafc431fd8c9cf7812ea99164e5e85683f3e0c121
2023-06-02 22:52:13 +00:00
Chun-Ku Lin
e63659e6db Fix AccessibilityButtonFragmentTest
**Root cause**
We expected the spy resources will be used when calling
context.getResources(). However, we didn't set up the connection. Hence
the test failed due to trying to use the original resources.

Bug: 279082331
Test: atest AccessibilityButtonFragmentTest
Change-Id: Ib6e51b2b2607bec7980b9288a0a8076e4a036863
2023-06-02 22:15:15 +00:00
TreeHugger Robot
cddd329f80 Merge "Fix ToggleScreenMagnificationPreferenceFragmentTest" 2023-06-02 19:39:07 +00:00
Treehugger Robot
249107bc45 Merge "Fix AccessibilityHearingAidPreferenceControllerTest" 2023-06-02 17:48:23 +00:00
Treehugger Robot
d19f4f85fd Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev am: 47d3cfe635 am: 91737c0b3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23517077

Change-Id: I9277de61513b892dee6517e2a6a393f77451e9c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 15:56:40 +00:00
YK Hung
6f892d206b Merge "Update incompatible charger checking rule" into udc-dev am: bfc4637d09 am: 4eabcdea6d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23484351

Change-Id: I924fe9631af514f947d278f32e808938a9c4c72e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 15:50:24 +00:00
Treehugger Robot
3ac151950a Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev am: 47d3cfe635 am: 88a51ef8be
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23517077

Change-Id: Id13a9a99f652848a60d38813e5802b9d34b1bcf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 15:37:32 +00:00
YK Hung
a23fdeef7a Merge "Update incompatible charger checking rule" into udc-dev am: bfc4637d09 am: 466e7c56b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23484351

Change-Id: I10082d3d520ae0438f493dd6b4af6055eb4d2a5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 15:29:09 +00:00
Chun-Ku Lin
0aea3ddb33 Fix AccessibilityHearingAidPreferenceControllerTest
**Root cause**
When adding a feature flag on showing different hearing aid page on
 click, the tests were not executed because they were marked as @Ignore.

In order to execute the test, we need to turn the feature flag off, so that the test run in the same scenario where the feature flag was not introduced.

Bug: 279082331
Test: atest AccessibilityHearingAidPreferenceControllerTest
Change-Id: If11ac40a7ea3926578992f7c0577e7cbb1bb3273
2023-06-02 06:47:38 +00:00
Treehugger Robot
91737c0b3b Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev am: 47d3cfe635
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23517077

Change-Id: I272844e63ff78dc9ef730c04b768ee2dc1634e73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 04:24:57 +00:00
Treehugger Robot
47d3cfe635 Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev 2023-06-02 04:19:22 +00:00
Chun-Ku Lin
c8c67d731f Fix ToggleScreenMagnificationPreferenceFragmentTest
- Prevent mocking ToggleScreenMagnificationPreferenceFragment for test
- Use Robolectric's way to launch the fragment so that the fragment
  contains necessary setup

**Root cause**
- We called onCreateView directly in the test without the necessary setup
  in onCreate, which causes the FooterPreferenceController not being
  initialized.
- We created a spyContext that returns a mock PackageManager, however,
  in the test execution, we didn't mock the context used by the fragment
  under test. Hence, the fragment didn't use the mock PackageManager in
  test.

Bug: 284209879
Test: atest ToggleScreenMagnificationPreferenceFragmentTest --iterations
5

Change-Id: I7e71a03177526f5bb0c20a58855a7dfdffc2a22f
2023-06-02 03:04:37 +00:00
YK Hung
4eabcdea6d Merge "Update incompatible charger checking rule" into udc-dev am: bfc4637d09
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23484351

Change-Id: I7a3133f83570a82bb5e87dd1096d5d47f85f3390
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 01:22:21 +00:00
YK Hung
bfc4637d09 Merge "Update incompatible charger checking rule" into udc-dev 2023-06-02 00:50:17 +00:00
Weng Su
ef81179538 Skip Wi-Fi hotspot in Settings Widgets
- Do not show Wi-Fi hotspots in Settings Widgets if the config is not set to show

Bug: 275268676
Test: Manual test
atest -c CreateShortcutPreferenceControllerTest

Change-Id: I5d86a78c9d48c9b63faff50d46f1254dbefd94cf
2023-06-02 04:54:59 +08:00
Treehugger Robot
0a9fe7a3ab Merge "Adding ShadowBluetoothAdapter for the test" 2023-06-01 18:52:02 +00:00
Prabir Pradhan
edbc95e817 Merge "Add "Show key presses" to input developer options" into udc-qpr-dev am: 8fca8a72dc am: 753647d584
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23356796

Change-Id: I9c43018307252742022d19443c3423fa4ee05550
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 18:24:09 +00:00
Chun-Ku Lin
b34dcecc58 Adding ShadowBluetoothAdapter for the test
Many robotests that touches BluetoothAdapter might need to use our own
ShadowBluetoothAdapter which implements a "fake" getSupportedProfiles
call, so that the test won't trying to execute the android framework's getSupportedProfiles method.

Bug: 285235777
Test: atest AccessibilitySettingsTest

Change-Id: I5b3b2f4528a2b32aff22928653c57576981c0ff9
2023-06-01 17:50:10 +00:00
Prabir Pradhan
8fca8a72dc Merge "Add "Show key presses" to input developer options" into udc-qpr-dev 2023-06-01 17:37:44 +00:00
Pavel Grafov
81e7bac047 Merge "Avoid double quiet mode requests" into udc-dev am: 8e13abebc0 am: 4c5394afb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23489320

Change-Id: I8ce1a31df186ab0a396c8b0858286fd1cc53f740
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 17:35:41 +00:00
Pavel Grafov
40897d4bec Merge "Avoid double quiet mode requests" into udc-dev am: 8e13abebc0 am: fb15f59582
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23489320

Change-Id: I3411ef7f49b9327690c07e5413ba3dbaf95064a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 16:41:23 +00:00
Pavel Grafov
4c5394afb3 Merge "Avoid double quiet mode requests" into udc-dev am: 8e13abebc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23489320

Change-Id: I6a82013b578378facf575a6daa9070ff337d0fc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 16:38:28 +00:00
Pavel Grafov
8e13abebc0 Merge "Avoid double quiet mode requests" into udc-dev 2023-06-01 15:31:13 +00:00
Angela Wang
6451a35d3e Merge "Shouldn't show pair another ear dialog if hearing aid supports CSIP" into udc-qpr-dev am: d91da4f4ca am: 4560d2f83b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23412076

Change-Id: I782742799c995339e9f00ba2265acd84fb2ee3a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 12:24:00 +00:00
Angela Wang
d91da4f4ca Merge "Shouldn't show pair another ear dialog if hearing aid supports CSIP" into udc-qpr-dev 2023-06-01 11:04:31 +00:00
Angela Wang
1bc59caf13 Shouldn't show pair another ear dialog if hearing aid supports CSIP
Some devices may supports both ASHA and CSIP. If the device supports
CSIP, it'll automatically pair the other ear and thus no need to pop up
the pair another ear dialog which is specially for ASHA device.

Bug: 283269736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest
Change-Id: I9a8e3876e2905b18b1c63e74f47c6877504ebdc8
2023-06-01 09:54:35 +00:00
TreeHugger Robot
c57d3de706 Merge "Fix TetherSettings crash issue" into udc-dev am: f65da39f37 am: 9f831a600b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23485222

Change-Id: I15e5a054a77aafd21dcedea9b6a96a5b05b21e03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 05:46:26 +00:00
TreeHugger Robot
b2905ee16b Merge "Fix TetherSettings crash issue" into udc-dev am: f65da39f37 am: ee4a8af972
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23485222

Change-Id: I84d3cb1f5f2f2139fe080b630205819f00aaca0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 05:42:14 +00:00
TreeHugger Robot
9f831a600b Merge "Fix TetherSettings crash issue" into udc-dev am: f65da39f37
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23485222

Change-Id: Ia75886edc6211a05645e047bc627a95f923cd6ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 05:02:59 +00:00
ykhung
e2f19b7de9 Update incompatible charger checking rule
Bug: 278316711
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I8f720bcdf7c0efabc8278913ccf1c0427c857fac
2023-06-01 12:50:47 +08:00
Angela Wang
412f5fad85 Merge "Make Hearing devices preference always visible" into udc-qpr-dev am: 7df08d69be am: 5176db8a71
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23429459

Change-Id: I6e5e91d3bbc44f3973fc021a94cde5d0accb5ce0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 03:36:35 +00:00
Angela Wang
7df08d69be Merge "Make Hearing devices preference always visible" into udc-qpr-dev 2023-06-01 02:04:50 +00:00