Commit Graph

12975 Commits

Author SHA1 Message Date
Weng Su
5cf4cf2660 [Provider Model] Fix InternetPreferenceControllerTest failed issue.
- Bypass system resource

Bug: 179016907
Test: manual test
- atest InternetPreferenceControllerTest
Change-Id: I860eb3173f112a7d3f820701afb1a96a06d4a296
2021-02-01 14:37:38 +00:00
Jeremy Goldman
ba8f1ad06f Merge "SubscriptionUtil checks that SubscriptionInfo is null before accessing." into sc-dev 2021-02-01 08:16:42 +00:00
Weng Su
548569e3eb Merge "[Provider Model] Fix Internet preference crash" into sc-dev 2021-02-01 06:12:11 +00:00
Jeremy Goldman
3dd2878437 SubscriptionUtil checks that SubscriptionInfo is null before accessing.
Test: atest -c SubscriptionUtilTest
Bug: 178707680
Change-Id: I03938405929c3307460107671bbe695ee5e0f6e9
2021-02-01 05:01:49 +00:00
Manish Singh
becac249e3 Merge "Add Settings UI for MTP transcoding over USB." into sc-dev 2021-02-01 03:17:29 +00:00
Jiun-Yang Hsu
5da8b8b933 Merge "Create folder and OWNERS file for component test" am: cf231cad93 am: 1e2386b14b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1564814

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8474a2ec62e212d932865419b866c42c2fbd8826
2021-01-29 23:43:05 +00:00
Manish Singh
29a6c26d80 Add Settings UI for MTP transcoding over USB.
Enabling "Transcode exported media" means that the media transferred
from the device via MTP over USB would be transcoded, if necessary. This
switch also sets / unsets the sys.fuse.transcode_mtp system property.

"Transcode exported media" category would be accessible only when the
"File transfer / Audio Auto" or "PTP" radio button has been selected. We
are including PTP also since PTP supports transfer of videos.

Adding UsbDetailsTranscodeMtpController in a separate preference
category than "Charge connected device" primarily because they seemed to
be different in their own rights.

Here are a few screenshots:
https://screenshot.googleplex.com/8jeMstnSFsTtVCS.png
https://screenshot.googleplex.com/76hNz4iXp5dcX4M.png
https://screenshot.googleplex.com/AkTngE5hDDJCovv.png
https://screenshot.googleplex.com/4uQYGXuuSQLoz3w.png

BUG: 158466651
Test: manual testing.  Also added unit test.
Change-Id: I2603a9bffed3320c193cc08f867bd67d9848da18
(cherry picked from commit 974662936e)
2021-01-29 20:22:05 +00:00
Tsung-Mao Fang
829c7b7b24 Remove a test case for fixing broken pesubmit
Change-Id: Iaa0477d22dc680d08b5d5614fec2c7eb3154465a
Fix: 178567560
Test: Run presubmit process
(cherry picked from commit cefdfc7bc9)
2021-01-29 20:21:04 +00:00
tom hsu
ae6a21427c Avoid wrong telephonymanager with wrong sub id.
When initialized SimStatusDialogController, also create TelephonyManager
with sub id.

Bug: 174171839
Test: Manual test passed, see b/174171839#25
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SimStatusDialogControllerTest passed
Change-Id: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
Merged-In: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
2021-01-29 14:31:02 +00:00
Jiun-Yang Hsu
0b1f51445c Merge "Initial commit for Settings component test" into sc-dev 2021-01-29 12:55:02 +00:00
Jiun-Yang Hsu
2d0baa2c27 Create folder and OWNERS file for component test
Test: No test needed for creating folder and OWNERS
Change-Id: I6b1aff581df36a9c70309df2f2ce30d547a820d5
2021-01-29 09:01:30 +00:00
TreeHugger Robot
e7515466ea Merge "The UI is not immediately updated" into sc-dev 2021-01-29 07:56:42 +00:00
TreeHugger Robot
097361797a Merge "[Provider Model] Dynamically update the Internet Panel title" into sc-dev 2021-01-29 07:37:50 +00:00
SongFerngWang
c0b8f62b57 The UI is not immediately updated
Solution: Add Data Connection State listener by PhoneStateListener.

Bug: 178350321
Test: atest NetworkProviderWorkerTest
Change-Id: I692209035332bfd463537988f4e3ce166414031e
(cherry picked from commit 59958e663d)
Merged-In: I692209035332bfd463537988f4e3ce166414031e
2021-01-29 06:52:11 +00:00
Jiun-Yang Hsu
7a3635e7f4 Initial commit for Settings component test
Test: Tested on local device
Bug: 178765084
Change-Id: I3b8f36daa31b0a44e788fe4c84f94d48653ee037
2021-01-29 14:00:59 +08:00
Weng Su
fc3a51ed3f [Provider Model] Fix Internet preference crash
- Post on main thread for UI update

- Add NPE checking

Bug: 178670562
Test: manual test
- atest InternetPreferenceControllerTest

Change-Id: I6c37f7dc19f9f9bbc75b36415a47aa1366dc5f5e
2021-01-29 12:57:36 +08:00
TreeHugger Robot
16fa77369f Merge "Hide esos setting if no app provides esos functionality" into sc-dev 2021-01-29 04:31:59 +00:00
Wilson Wu
fa01bf30ba Apply ResultCallback to DevelopmentTiles
In CL[1], the startImeTrace and stopImeTrace apply
the ResultCallback mechanism. Change corresponding
API usages in DevelopmentTiles.

We are also working on getting rid of direct dependecy
on IInputMethodManager from Settings.(see b/175742251)

[1]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94

Bug: 163453493
Test: make RunSettingsRoboTests ROBOTEST_FILTER="WinscopeTraceTest"
Test: 1) Enable the Winscope Trace tile
      2) Do some actions like open keyboard
      3) Disable the Winscope Trace tile
      4) Grad a bugreport and verify trace on go/Winscope
Change-Id: I6733e8b500f5e02d4e14cde4ab7a46f4f716f5d0
2021-01-29 11:00:48 +08:00
Fan Zhang
6a8f11b2cf Hide esos setting if no app provides esos functionality
When user disables OEM app that provides esos, the setting is hidden as
well.

See more details on bug.

Bug: 178654110
Test: robotests
Change-Id: I7a0763381d3321124f4208a58bb8e10cf884f7c1
2021-01-28 18:38:52 +00:00
Weng Su
28172b61c8 [Provider Model] Dynamically update the Internet Panel title
- Change from "Internet" to "Airplane mode networks"

- Screenshot:
  https://screenshot.googleplex.com/gk3RBcjPsXq5NTk

Bug: 176803442
Test: manual test
- atest InternetConnectivityPanelTest
- make RunSettingsRoboTests ROBOTEST_FILTER=PanelFragmentTest

Change-Id: Ifb2c24434e480861fc7c3eaece683d49eb99013e
2021-01-28 11:00:08 +00:00
tom hsu
ba845f7fe4 Avoid wrong telephonymanager with wrong sub id.
When initialized SimStatusDialogController, also create TelephonyManager
with sub id.

Bug: 174171839
Test: Manual test passed, see b/174171839#25
Change-Id: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
2021-01-28 06:26:21 +00:00
Edgar Wang
9178f7cd66 Apply footer icon for Smart Storage
- Apply FooterPreference

Bug: 177968088
Test: manual & robotest
Change-Id: Ie934a139863a7522c6fd38cd27f8814fabcb541e
2021-01-28 04:55:15 +00:00
Wesley.CW Wang
0457af5347 Reorder Settings Battery main page index (1/2)
- Reorder battery page index
 - Remove option menu
 - Add battery usage preference
 - Remove last full charge and screen usage preference
 Screenshots:
 https://screenshot.googleplex.com/7VMeSVKHGViZyRv.png
 https://screenshot.googleplex.com/7v6wNL4qamfMAgM.png

Bug: 177407113
Test: make SettingsGoogleRoboTests -j40
Change-Id: I8a1fb30cdd3774840bf28d9c84017d946a4244df
2021-01-26 14:01:29 +00:00
Chris Li
c175f356ec Merge "Allow non-resizable apps in split-screen (3/n)" 2021-01-26 02:53:25 +00:00
Weng Su
ca8a3d7e64 [Provider Model] Add connected ethernet network to internet panel
- Show the connected ethernet network to first item of internet panel

- Screenshot:
  https://screenshot.googleplex.com/teritCBuvxxSyr6

Bug: 176796623
Test: manual test
- atest NetworkProviderWorkerTest \
        ProviderModelSliceTest

Change-Id: I423a7951f403bf86c288da52fc342520fd24f466
2021-01-25 14:46:37 +00:00
Weng Su
e9d44254c7 Merge "[Provider Model] Add connected ethernet network preference" 2021-01-25 14:46:05 +00:00
Jason Chiu
524feaf31c Merge "Adjust homepage styles and layouts" 2021-01-25 09:43:22 +00:00
Jeremy Goldman
09f43be1c6 Merge "SubscriptionsPreferenceController shows the unique sim description." 2021-01-25 09:03:40 +00:00
Weng Su
c7003e95a3 [Provider Model] Add connected ethernet network preference
- Show the preference if connected to ethernet network

- Hide the preference if not connected to ethernet network

- Screenshot:
  https://screenshot.googleplex.com/5ZkZXnTr9Hcfsyt

Bug: 176796623
Test: manual test
- atest ConnectedEthernetNetworkControllerTest
- make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I0f062eb2ee4898976f5e7a1c3f2c4061b60a3126
2021-01-25 07:31:52 +00:00
Arc Wang
c6ee2244a7 Merge "Fix battery optimization display problems" 2021-01-25 03:12:11 +00:00
SongFerng Wang
11501a0bc2 Merge "Replace allowedNetworkTypes with allowedNetworkTypesForReason" 2021-01-23 07:41:11 +00:00
Jason Chiu
b56ea7e9e3 Adjust homepage styles and layouts
- Fine tune the header text size and position
- Fix the header overlapping problem on the homepage and collapsing
  toolbar pages when configuration changes by adding android:id.
- New AppBarScrollingViewBehavior for the homepage to avoid manually
  offsetting the IA
- Correct the formula of counting search box height

Test: robotest, manual
Fixes: 177967923
Fixes: 177968564
Change-Id: Id3ed44f4296fa2a19d6890b009d3881a5c140bbd
2021-01-22 13:27:22 +00:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +00:00
Weng Su
bfefb8015a Merge "[Provider Model] Update internet preference icon and summary" 2021-01-22 05:34:14 +00:00
Weng Su
46837dc4d5 [Provider Model] Update internet preference icon and summary
- Airplane mode icon/summary

- Airplane mode networks icon/summary

- Wi-Fi network connected icon/SSID

- Cellular network connected icon/carrier-name

- Ethernet network connected icon/summary

- Screenshot:
  https://screenshot.googleplex.com/AzhCEX2HjwYUMtJ
  https://screenshot.googleplex.com/9BRfQLMW4UvHqqq
  https://screenshot.googleplex.com/5jdi8oEjMPUURdT

Bug: 176796623
Test: manual test
- atest -c InternetUpdaterTest \
           InternetPreferenceControllerTest

Change-Id: Icc8944dabdac597f12b67cffa72cb0be02d9671d
2021-01-21 17:24:10 +08:00
Chris Li
9cbc62824b Allow non-resizable apps in split-screen (3/n)
Update the developer option for enabling non-resizable for multi window
(freeform/splitscreen) instead of only freeform

Bug: 176061101
Test: manual
Test: make RunSettingsRoboTests
Change-Id: I56a9d8edca502d9449967f557c075b1408375a8a
2021-01-20 15:20:07 -08:00
Fan Zhang
e81091175e Default emergency gesture setting On.
And a few drive-by fixes:
* Move all emergency gesture fragments and controllers to emergency
  package for better code colocation.
* Remove the placeholder video preference from emergency_gesture_settings.xml

Bug: 178009196
Test: reran robotests
Change-Id: Ifcb591e7ab8e5e5494c480cbbe9410c08c296f8e
2021-01-20 13:08:04 -08:00
TreeHugger Robot
a347993239 Merge "Add metrics for EXTRA_KEY_DEVICE_PASSWORD_REQUIREMENT_ONLY" 2021-01-20 18:05:49 +00:00
Alex Johnston
8403e31d82 Merge "Fix CredentialManagementAppControllerTest" 2021-01-20 15:24:14 +00:00
TreeHugger Robot
f4e71b0019 Merge "Support EXTRA_DEVICE_PASSWORD_REQUIREMENT_ONLY" 2021-01-20 14:40:25 +00:00
Alex Johnston
8fc55e0231 Fix CredentialManagementAppControllerTest
Bug: 175277372
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CredentialManagementAppControllerTest
Change-Id: I5f9177d19232f38a761df9adba94d080464120e2
2021-01-20 11:29:07 +00:00
Rubin Xu
bc5da644dd Add metrics for EXTRA_KEY_DEVICE_PASSWORD_REQUIREMENT_ONLY
Bug: 169832516
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Change-Id: I2bcd6c4f1a5f04582bb88ec9fb285621b9ec77eb
2021-01-20 11:17:13 +00:00
Rubin Xu
ff1b547548 Support EXTRA_DEVICE_PASSWORD_REQUIREMENT_ONLY
When set, only enforce password requirement explicitly set device-wide.

As part of the change, restructure the code such that ChooseLockGeneric
becomes the central place for aggregating password requirements from
different parties, while ChooseLockPassword only enforces whatever
password reuirement it is told (by ChooseLockGeneric via intent extras)

Bug: 169832516
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password

Change-Id: I0acbea4819c13d4a8444c7b06928baccead18837
2021-01-20 11:16:22 +00:00
Ben Chung
1c7eba6660 Merge "Add audio adjustment fragment in a11y settings" 2021-01-20 08:49:35 +00:00
SongFerngWang
60c4163244 Replace allowedNetworkTypes with allowedNetworkTypesForReason
- Replace getAllowedNetworkTypes with
getallowedNetworkTypesForReason(ALLOWED_NETWORK_TYPES_REASON_CARRIER)
- Replace "Settings.Global.PREFERRED_NETWORK_MODE" with
"getAllowedNetworkTypesForReason(USER)"
- Move EnabledNetworkModePreferenceControllerTest from robotests to unit
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT
- Rename PreferredNetworkModeContentObserver to AllowedNetworkTypesListener
Bug: 161434786
Test: build pass.
(PASS)atest CdmaSystemSelectPreferenceControllerTest
(PASS)atest PreferredNetworkModePreferenceControllerTest
(PASS)atest AllowedNetworkTypesListenerTest
(PASS)atest EnabledNetworkModePreferenceControllerTest
(PASS)atest MobileNetworkUtilsTest

Change-Id: I2b981569ad11cf70a558c1952cc2e077464328d8
2021-01-20 08:23:08 +00:00
Jeremy Goldman
67c75ac102 Helper function to return the unique name for subscription info
Many classes within Settings have access to the subscription info, rather
than only having access to the subscription id. For these classes, it is
more convenient to have a helper method where the whole subscription
info can be passed in, rather than having to call the
getSubscriptionId() helper method in so many locations within the
telephony settings codebase.

Bug: 150370656
Bug: 148303118
Test: atest -c SubscriptionUtilTest
Change-Id: I181960933ab8610d5572b7a7d6671fab8c1dbd22
2021-01-19 09:30:14 +00:00
TreeHugger Robot
119bbbd308 Merge "[Provider Model] Add Fix connectivity toggle to Internet Settings" 2021-01-19 07:28:18 +00:00
Weng Su
598934d645 [Provider Model] Add Fix connectivity toggle to Internet Settings
- Add Fix connectivity toggle in menu item

- Show "Resetting your internet..." when recovering

- Screenshot:
  https://screenshot.googleplex.com/BPyRADfNUoPE8Dc

Bug: 172297799
Test: manual test
- make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I27594d24659ca281e224f86accc20d49514d5001
2021-01-19 06:08:53 +00:00
SongFerng Wang
8ee28c1baa Merge changes I79b4c3d4,Icc8a7793
* changes:
  [Provider mode] Carrier item display network type on slice.
  The provider model slice carrier toggle is broke.
2021-01-19 05:55:17 +00:00
Colin Cross
52033e133a Merge changes from topic "revert-13183140-SettingsGoogle-bp-NMIISXZYTU"
* changes:
  Revert "Export proguard.flags, manifest and sources for use by S..."
  Revert "Build Settings-robo-testutils for use by SettingsGoogleR..."
2021-01-19 05:28:29 +00:00