Commit Graph

16119 Commits

Author SHA1 Message Date
Neil Fuller
8bdd44b67e Merge "Fix logic used for auto time zone settings" 2022-04-19 15:21:40 +00:00
TreeHugger Robot
b0f783b29d Merge "[Settings] Code refactor for Lifecycle listening" 2022-04-19 08:54:35 +00:00
Tsung-Mao Fang
a8d5f8dbc1 Merge "Do not expose wifi slice when no permission" into tm-dev am: ccb8855b98 am: 11979785a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17536305

Change-Id: I6992311468464d28114e7aa07e2347fed679060a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 08:30:11 +00:00
TreeHugger Robot
12214747b5 Merge "Fix transparency seekbar is enabled while fade feature is disabled." into tm-dev am: fbaa9f3faa am: 48086b485a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17799714

Change-Id: Iaca40b54154e5881443ba403e69c3db8ace5fb9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 08:30:01 +00:00
Tsung-Mao Fang
ccb8855b98 Merge "Do not expose wifi slice when no permission" into tm-dev 2022-04-19 08:12:37 +00:00
Tsung-Mao Fang
821608c5be Do not expose wifi slice when no permission
Prior to this cl, slice provider always exposes wifi slice
to calling package without confirming any wifi permissions.

For current solution, we will check calling package's permission state
and decide whether slice provider should expose wifi slice or not.

Because settings search is a part of settings app,
this permission checker won't be applied to settings intelligence.

Test: manual, robotest, cts
Also run manul
Bug: 178014725

Change-Id: I2770b5b43366a5aa65c7519efc4243d350a21b26
2022-04-19 08:07:35 +00:00
TreeHugger Robot
fbaa9f3faa Merge "Fix transparency seekbar is enabled while fade feature is disabled." into tm-dev 2022-04-19 07:52:35 +00:00
Bonian Chen
9a4c66d23b [Settings] Code refactor for Lifecycle listening
This is an abstract class for building a set of callback behavior
based on Lifecycle status change.

Through extending this class, the implemented methods are invoked
only when required.

Bug: 229689535
Test: unit test
Change-Id: I7534393546f821738a63ebde121a5a88ee03b23b
2022-04-19 15:12:59 +08:00
TreeHugger Robot
4d001b972b Merge "Read CarrierConfig to get operator name" into tm-dev am: b1bdc42d52 am: 0e3e447e11
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17800680

Change-Id: If68a15a92b3e830b3a1fded9278898af74b6e00a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 02:39:13 +00:00
Hugh Chen
5dcf2d778a Merge "Fix default usb settings will set wrong function when onPause()" into tm-dev am: abad3c4a88 am: fb156692b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17799707

Change-Id: I7dec1d842c22757250943fb9490cccbb06a0b16e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 02:39:03 +00:00
TreeHugger Robot
b1bdc42d52 Merge "Read CarrierConfig to get operator name" into tm-dev 2022-04-19 02:08:35 +00:00
menghanli
7ae0b641dd Fix transparency seekbar is enabled while fade feature is disabled.
Root cause: Show default status until setting key changed. It does not
show latest status when created.
Solution: Update the status when created.

Bug: 229566130
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FloatingMenuTransparencyPreferenceControllerTest
Change-Id: Ia25fe5cec0444c1771e8ce31aae2a4cb3b0405a1
2022-04-19 08:15:28 +08:00
Niklas Lindgren
8bc83ef615 Read CarrierConfig to get operator name
Config if operator name should be in status bar is now read
from carrier config. For dual sim devices we use data sim.

Bug: 116847905
Test: Add item for carrier in vendor.xml and swap sim cards
between ones that have the item enabled and disabled. We have
also tested to swap data sim cards on dual sim device.
Test: m RunSettingsRoboTests ROBOTEST_FILTER="ShowOperatorNamePreferenceControllerTest"

Change-Id: I03311b96ee660aed80ec867b05aa0a34cfc15f54
2022-04-18 21:34:57 +00:00
Hugh Chen
aadc44ae26 Fix default usb settings will set wrong function when onPause()
Bug: 229200265
Test: make -j64 RunSettingsRoboTests
Change-Id: Ibee2d39af8b341d03117d96029446ddcd45921fe
2022-04-18 12:16:57 +00:00
ykhung
08318ce06c Format BatteryEntry and BatteryDiffEntry class am: b593e00af0 am: ecf5574c2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17782705

Change-Id: I8b03fcb6cc727360f7a5f9c72852117a3a060439
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-17 15:37:56 +00:00
ykhung
b593e00af0 Format BatteryEntry and BatteryDiffEntry class
Bug: N/A
Test: make RunSettingsRoboTests
Change-Id: I14e2ef4c455209e58edc5ccdbe064f469815cccd
2022-04-17 06:23:47 +00:00
TreeHugger Robot
c6e4554848 Merge "When in guest mode hide the rename button" 2022-04-15 09:07:20 +00:00
Chaohui Wang
4d0df6d16f Merge "Fix title clipped for "Custom settings for schedule"" into tm-dev am: fbafdbdd8f am: 467676063e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17607148

Change-Id: I696518d33b0e79f5b297c99829cf884de1a1b2be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 00:03:52 +00:00
Chaohui Wang
fbafdbdd8f Merge "Fix title clipped for "Custom settings for schedule"" into tm-dev 2022-04-14 23:22:19 +00:00
Quang Luong
132e8286cb Merge "Use WifiEntry.getStandardString() for Wi-Fi Type summary" into tm-dev am: 93ae7acbf4 am: 6f7a9b88ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17483256

Change-Id: I842c62d47fff47de41dcc40a18eca8f777ecc1db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 16:51:21 +00:00
Quang Luong
93ae7acbf4 Merge "Use WifiEntry.getStandardString() for Wi-Fi Type summary" into tm-dev 2022-04-14 16:14:21 +00:00
Tsung-Mao Fang
61eb591020 Merge "Use androidx.window from prebuilt." into tm-dev am: 7877c073e5 am: 6c02827b8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17644388

Change-Id: I5c04d7f3c942107fb958480f67344cc9daa006ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 15:25:27 +00:00
Neil Fuller
7a8ac683d4 Fix logic used for auto time zone settings
Fix the logic used that determines whether the automatic time
zone detection toggle is available in the Settings UI Date & Time
screen. Also, ensure that the TimeZonePreferenceController uses correct
logic for whether the user can manually enter a time zone.

This change migrates the controllers to use a existing high-level
TimeManager API rather than (incorrectly) duplicating in Settings UI the
logic for whether time zone detection is supported / enabled.

Without this change, WiFi-only devices _with_ location-based time zone
detection enabled would incorrectly hide the "auto time zone" toggle,
which would have the knock-on of making it look like the user is allowed
to enter a time zone manually when they aren't (because it is
enabled/disabled based on the presence of the toggle).

That toggle still needs to be present while there is a possible time
zone detection mechanism. All the (quite complex) logic around this is
already considered by the TimeManager API.

Possible side effects:

This change decouples the "does the toggle show true or false?"
(isEnabled()) from the "should the toggle be shown at all?"
(isAvailable()) logic by removing a call to isAvailable() inside of
isEnabled(). This is to avoid making multiple (probably more expensive
than what it was doing before) calls to the time_zone_detector service,
and avoid the extra complexity of caching / cache invalidation that
would be needed to mitigate it. Previously, as a result of the call to
isAvailable(), isEnabled() would always return false when mIsFromSUW is
true, but now it will return the underlying value of the device's
auto_time_zone setting. This means that if the UI is changed in future
to render a visible-but-can't-be-changed-by-the-user toggle for auto
time zone, it will display the current setting value, which is perfectly
reasonable.  It is assumed it will have no other side effects.

The AutoTimeZonePreferenceControllerTest.isFromSUW_notEnable test has
been changed to reflect the change in behavior. Various name changes
made to tests to reflect the new behavior.

Bug: 228247623
Bug: 186625820
Bug: 172891783
Test: treehugger
Test: Manual test on a device with telephony
Test: m ROBOTEST_FILTER=AutoTimeZonePreferenceControllerTest RunSettingsRoboTests -j40
Test: m ROBOTEST_FILTER=TimeZonePreferenceControllerTest RunSettingsRoboTests -j40
Change-Id: I4c7608e8645eee5994c8ecf85a14a27d3278ac04
2022-04-14 13:26:05 +00:00
Hugh Chen
bf81ecd75f When in guest mode hide the rename button
Bug: 198173108
Test: local test
Change-Id: I29eb227104baa43ab8223f86a6a5d9cecd612bde
2022-04-14 11:21:07 +00:00
Diego Vela
668aea9b55 Use androidx.window from prebuilt.
Use androidx.window prebuilt for consistency.

Bug: 223114509
Test: m -j

Change-Id: Ifeba7d0073ba7aeb6308c186738161c4857a97a3
2022-04-14 09:55:36 +00:00
Presubmit Automerger Backend
3632d82d97 [automerge] Unchecked battery saver switch once it's 1st launch 2p: d2ce1d9194 am: 2885a43ddd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17707388

Change-Id: Id55628cd91c2be5615d371b9279589c301223c6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 11:55:36 +00:00
TreeHugger Robot
55aba46fe9 Merge "Unchecked battery saver switch once it's 1st launch" into tm-dev 2022-04-13 11:15:46 +00:00
Presubmit Automerger Backend
2885a43ddd [automerge] Unchecked battery saver switch once it's 1st launch 2p: d2ce1d9194
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17707388

Bug: 227725656
Change-Id: If2036f7792f3c9358e88061d5afd4873612fd3f9
2022-04-13 09:07:40 +00:00
Wesley Wang
d2ce1d9194 Unchecked battery saver switch once it's 1st launch
- Add low battery warning ack check to onSwitchChanged(), reset the
   switch to off once it's 1st time launch, the switch should be enable
   by battery saver change event at 1st instead of enable directly, will
   not check this state anymore after 1st launch

Bug: 227725656
Test: make RunSettingsRoboTests
Change-Id: I79f502f567fae5dd10166d8b24fd50d59c261001
2022-04-13 17:06:52 +08:00
Edgar Wang
e40e18c10d Merge changes from topic "presubmit-am-020809e13415452dbdf7bee571efa369"
* changes:
  [automerge] Index the gesture options in System Navigation Settings page 2p: 257ebe4a5e 2p: 739a359b07
  [automerge] Index the gesture options in System Navigation Settings page 2p: 257ebe4a5e
  Index the gesture options in System Navigation Settings page
2022-04-13 04:34:04 +00:00
Edgar Wang
5a539c5cb2 Merge "Index the gesture options in System Navigation Settings page" into tm-dev 2022-04-13 04:34:04 +00:00
Edgar Wang
2c52db547b Merge changes from topic "presubmit-am-020809e13415452dbdf7bee571efa369" into tm-mainline-prod
* changes:
  [automerge] Index the gesture options in System Navigation Settings page 2p: 257ebe4a5e
  Index the gesture options in System Navigation Settings page
2022-04-13 04:34:04 +00:00
Presubmit Automerger Backend
8eadfcd0d6 [automerge] Fix that device isn't responding for a while when resetting all settings on “Display size and text” page. 2p: 09a2a49bd3 am: 74dd53583b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17614845

Change-Id: I76f447e38c77aff30b587694088d053d50a524c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 01:25:25 +00:00
Julia Reynolds
773c7e937e [automerge] Add missing extra when launching apps 2p: 87bb1b34c5 am: 3d8de3e21f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17721989

Change-Id: I305aa504ba2c4b242078341b9af15e62b8a25a04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 00:52:16 +00:00
PETER LIANG
8bd6647885 Merge "Fix that device isn't responding for a while when resetting all settings on “Display size and text” page." into tm-dev 2022-04-13 00:39:27 +00:00
Presubmit Automerger Backend
74dd53583b [automerge] Fix that device isn't responding for a while when resetting all settings on “Display size and text” page. 2p: 09a2a49bd3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17614845

Bug: 223747686
Bug: 220082104
Bug: 220070773
Change-Id: If66da507a1e49fa2abec0f4a36507cb73fb176b4
2022-04-13 00:38:51 +00:00
Peter_Liang
09a2a49bd3 Fix that device isn't responding for a while when resetting all settings on “Display size and text” page.
Goal:
Probably has the race condition issue between "Bold text" and  the other features including "Display Size", “Font Size” if they would be enabled at the same time, so our workaround is that the “Bold text” would be reset first and then do the remaining to avoid flickering problem.

Bug: 223747686
Bug: 220082104
Bug: 220070773
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreferenceFragmentTest
Change-Id: If1425fe2579bec8dded69680ac73fbfb03c37321
2022-04-13 00:38:44 +00:00
TreeHugger Robot
6a489ca8b7 Merge "Apply only RING_VIBRATION_INTENSITY to ringtone vibrations" into tm-dev am: 7a4f6a5ba3 am: 54f6f65f13
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17474927

Change-Id: I221b376e3d1f844aa970b84936570d6bfd5c70ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 00:36:36 +00:00
TreeHugger Robot
14a3861f0b Merge "Add missing extra when launching apps" into tm-dev 2022-04-12 23:27:14 +00:00
Julia Reynolds
3d8de3e21f [automerge] Add missing extra when launching apps 2p: 87bb1b34c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17721989

Change-Id: Ib37af2c92b1da8de0ce14f643db2e4ad1775408b
2022-04-12 20:21:07 +00:00
Julia Reynolds
87bb1b34c5 Add missing extra when launching apps
As promised in the api docs

Test: AbstractZenModeAutomaticRulePreferenceControllerTest, view
schedule DND page
Fixes: 221423986

Change-Id: I7ddc1b112950da225afa2ba13ebf5df481922177
2022-04-12 16:20:01 -04:00
TreeHugger Robot
7a4f6a5ba3 Merge "Apply only RING_VIBRATION_INTENSITY to ringtone vibrations" into tm-dev 2022-04-12 17:24:05 +00:00
Edgar Wang
8b2165a414 [automerge] Index the gesture options in System Navigation Settings page 2p: 257ebe4a5e 2p: 739a359b07
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17684395

Change-Id: I84b8d5cd0c913106597377a2392489469f8f6c13
2022-04-11 13:29:21 +00:00
Edgar Wang
739a359b07 [automerge] Index the gesture options in System Navigation Settings page 2p: 257ebe4a5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17684395

Change-Id: I0d3b1e9416e0928cae610f1b36825b6f325f6b73
2022-04-11 13:29:12 +00:00
Edgar Wang
257ebe4a5e Index the gesture options in System Navigation Settings page
Fixes: 167536360
Test: manual verify & robotest
Change-Id: Ie1a24a7206153dc1405f8a28369a6bade11ddd39
2022-04-11 21:05:37 +08:00
TreeHugger Robot
ecde21063a Merge changes from topic "presubmit-am-c49a96c26d054adbb0d2e7c248dd53a1" into tm-mainline-prod am: 67b061ae0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17630131

Change-Id: I36d4b7699e8610f0f8f0073c6f504251a9d98387
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-09 09:21:44 +00:00
TreeHugger Robot
3ed73b7b2d Merge "Fix unexpected Wi-Fi hotspot shutdown" into tm-dev 2022-04-09 08:59:05 +00:00
TreeHugger Robot
67b061ae0b Merge changes from topic "presubmit-am-c49a96c26d054adbb0d2e7c248dd53a1" into tm-mainline-prod
* changes:
  [automerge] Fix unexpected Wi-Fi hotspot shutdown 2p: 6c42636cb8
  Fix unexpected Wi-Fi hotspot shutdown
2022-04-09 08:59:04 +00:00
Mill Chen
a9c43b938d Merge "Add cache mechanism for secondary users in Storage" into tm-dev am: 34eecaad79 am: 0a4bbff802
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17182074

Change-Id: If75ec07f5896033bef78bb2bb3acff5a01e49498
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 06:27:36 +00:00
Mill Chen
34eecaad79 Merge "Add cache mechanism for secondary users in Storage" into tm-dev 2022-04-08 05:48:45 +00:00