Commit Graph

9340 Commits

Author SHA1 Message Date
Raff Tsai
9bd767b052 Merge "Fix testcase error and UI refresh issue" 2019-09-10 00:47:24 +00:00
TreeHugger Robot
0a38ab8f6e Merge "Update slice states when on Voip calling" 2019-09-09 07:56:06 +00:00
Raff Tsai
8291671f97 Fix testcase error and UI refresh issue
Restricted App list can be update in RestrictedAppDetails page and
go back to SmartBatterySettings page without update the App list.
We need to update the list in updateState() again.

Fixes: 140585454
Test: manual, robolectric
Change-Id: I48a197351ffb9b07490f1de7ba1f7417102458a2
2019-09-09 12:00:21 +08:00
hughchen
059cb397cd Update slice states when on Voip calling
This CL is used to register intent of AudioManager.STREAM_DEVICES_CHANGED_ACTION
to know that phone is on VOIP call. When received this intent, media slice will
to update UI. Then if audio mode is on-going call, we will hide the slice UI.

Bug: 132198606
Test: Test: make -j42 RunSettingsRoboTests
Change-Id: Ic17ebd319b3da8f42089d36ba530cfb57c93c4c6
2019-09-09 11:01:44 +08:00
TreeHugger Robot
ea43780693 Merge "Revert "Prevent accounts page directly opening in screen pinning mode"" 2019-09-06 11:13:40 +00:00
Mill Chen
348234565a Revert "Prevent accounts page directly opening in screen pinning mode"
This reverts commit f3242dab35.

Reason for revert: use another way to handle this.

Change-Id: I83c97db5189cfda3a09f5249d8591ea91dbd3bcb
2019-09-06 09:18:23 +00:00
TreeHugger Robot
e90244ba5f Merge "Fix Battery usage page refresh issue" 2019-09-05 17:14:15 +00:00
TreeHugger Robot
9ea11ac24d Merge "[Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network" 2019-09-05 10:09:32 +00:00
Arc Wang
9db4bf7dbb [Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network
Should only allow saved network UI initialization for once.

Bug: 140362368
Test: WifiConfigControllerTest
      manual:
      Manually change EAP method and other security fields for a saved
      Wi-Fi neterprise network.

Change-Id: Iddc1dae53849760f43b41b75262358dff6ba09af
2019-09-05 16:07:08 +08:00
Raff Tsai
577240642d Fix Battery usage page refresh issue
restartBatteryStatsLoader made a loader existed in fragment. onStart
will resume the loader. onResume registers mBatteryBroadcastReceiver
will caused the loader activated the second time. We move
restartBatteryStatsLoader to onStart can reduce the loader runs only
once.

Fixes: 140488811
Test: manual
Change-Id: I4cac574ea8e9c07c1a9df48a57fb8140d5687b21
2019-09-05 14:37:21 +08:00
Cosmo Hsieh
b2e5ebee4a Merge "[Network Connection] Call NetworkRequestUserSelectionCallback#reject() if user quit activity without selection" 2019-09-05 03:53:57 +00:00
cosmohsieh
0f2773fb78 [Network Connection] Call NetworkRequestUserSelectionCallback#reject() if user quit activity without selection
Call NetworkRequestUserSelectionCallback#reject() to notify framework that user quit this request without
selecting any network.

Bug: 138855477
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.NetworkRequestErrorDialogFragmentTest
Change-Id: I4b06c9772598ab3f9416f32456cd0a65e2d70d68
2019-09-05 01:06:10 +08:00
Raff Tsai
8641986401 Prevent UI jank
Move hide preference logic to getAvailabilityStatus, it can remove
the preference before onresume.

Fixes: 140366463
Test: manual, robolectric
Change-Id: Ie11b5357b1e9340b30b8f19eac60c479cdb7687e
2019-09-03 14:16:27 +08:00
Raff Tsai
e5f89ea85d Merge "Remove useless folder" 2019-09-02 03:35:35 +00:00
Mady Mellor
0c47113a5b qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 129158983
Bug: 136034310
Bug: 137876221
Change-Id: If2b813f24cf5998829fe417e32179c5e8283d308
2019-08-29 17:54:26 -07:00
TreeHugger Robot
34b1e00ca7 Merge "Fix Battery page animation" 2019-08-29 03:41:25 +00:00
Raff Tsai
4b9171679a Remove useless folder
Bug: 140207811
Test: make RunSettingsRoboTests
Change-Id: Ia8283cc648b829d573f3ecd29f134701b6168b84
2019-08-29 09:58:46 +08:00
TreeHugger Robot
cea963b4ab Merge "Add RoleControllerManager.isApplicationVisibleForRole()." 2019-08-28 11:19:51 +00:00
Sunny Shao
b47cccf6a0 Use FooterPreference in xml explicitly
Removed the FooterPreferenceMixin from the DeviceAdminSettings page.

Fixes: 140015273
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.applications
Change-Id: I91c10946ae35f9a5cde30399e231dbc8a1481b23
2019-08-27 10:41:13 +08:00
Hai Zhang
51b76855f9 Add RoleControllerManager.isApplicationVisibleForRole().
Settings doesn't actually need to know whether an application
qualifies for a role, but only whether the default app setting should
be visible for an application. Qualification and visibility differs in
cases such as FallbackHome inside Settings which is a qualifying home
activity but should never be shown in default apps UI.

Fixes: 138636320
Test: manual
Change-Id: I2995b6fa5c7920d14fa644748db9c41b442ce53b
2019-08-26 14:23:44 -07:00
Jayachandran Chinnakkannu
0dc28d0187 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev am: 7afb9854a7 am: b5617b6f21
am: f51fdf64a9

Change-Id: Iebcaff0317b527481618ed076859ecb03cc879e3
2019-08-26 11:52:28 -07:00
Jayachandran Chinnakkannu
f51fdf64a9 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev am: 7afb9854a7
am: b5617b6f21

Change-Id: Ia137a3f3454cff7af7c3aa7195eb89c049fadaf2
2019-08-26 11:39:22 -07:00
Sunny Shao
7687e0b17d Use FooterPreference in xml explicitly
Removed the FooterPreferenceMixin from the UserSettings page.

Fixes: 140008560
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.users
Change-Id: If6da2bd2f6a72d8e61b8c8bca9e3179cfdee05e6
2019-08-26 17:08:31 +08:00
Jayachandran Chinnakkannu
b5617b6f21 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: I561ecbcd376ac4be2003e291f5528130673460fd
2019-08-23 20:36:56 -07:00
Jayachandran Chinnakkannu
15a9d54958 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: I2598b482b4630279d47685381ddac9c746fbe12d
2019-08-23 20:31:09 -07:00
Arc Wang
ea15072a94 Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" into qt-qpr1-dev
am: 318be48d07

Change-Id: I6a33141d8e12a3a16d723b506c986eff941956c9
2019-08-22 22:23:57 -07:00
TreeHugger Robot
318be48d07 Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" into qt-qpr1-dev 2019-08-23 05:04:35 +00:00
Goven Liu
765a37f803 Merge "[Wi-Fi NetworkRequest] Don't need to have code to test theme" 2019-08-23 01:42:15 +00:00
Bonian Chen
128de7bdb6 [Settings] hide preferred network mode UI
Hide preferred network mode UI no matter home, roaming or no service
when KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL been enabled.

Bug: 137681413
Test: atest PreferredNetworkModePreferenceControllerTest
      atest EnabledNetworkModePreferenceControllerTest
      Manual with AT&T SIM card in out of servce and in service

Change-Id: Ia0d1333c6cbae3a3717c8db6b77fbb9ea8cec968
2019-08-22 14:36:12 -07:00
SongFerng Wang
26ed731e5e Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev am: 201fc40816
am: f1a5d8a08a

Change-Id: I239d149303efd378a53ac34525c4a53f5eaed2bc
2019-08-22 03:16:03 -07:00
SongFerng Wang
f1a5d8a08a Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev
am: 201fc40816

Change-Id: I76ac45fbc93bf01bbc4783fecfd3eed8b9dbb6d2
2019-08-22 03:01:21 -07:00
TreeHugger Robot
04e72e23d9 Merge "[Wi-Fi] Prevent fatal exception for null intent action" 2019-08-22 09:51:01 +00:00
SongFerng Wang
201fc40816 Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev 2019-08-22 09:49:27 +00:00
Arc Wang
1e451cf708 [Wi-Fi] Prevent fatal exception for null intent action
Intent action may be null.

Bug: 139020487
Test: WifiScanModeActivityTest
      WifiNoInternetDialogTest
      WifiDppConfiguratorActivityTest
      WifiDppEnrolleeActivityTest
Change-Id: Ie6119a86aaee1a6b40710705a0ea7d92c24736d6
2019-08-22 13:42:47 +08:00
andychou
34fc2495d2 If the user add APN with empty APN type, map it for default type
Original behavior will map all APN type if enter empty APN type. But it
sometimes cause problem that MMS or IMS not working when select to this
custom APN. So if the user doesn't enter any APN type, just map to
valure of carrier config 'apn_settings_default_apn_types_string_array'
to avoid all the functions broken.

Bug: 129704611
Test: 1.Enter empty APN type and check if only default is added into
APN. 2.atest ApnEditorTest pass.
Change-Id: Icec274e5b402af06822479bcc60294b347f5254f
2019-08-21 21:20:49 +08:00
govenliu
2b9aaaf943 [Wi-Fi NetworkRequest] Don't need to have code to test theme
Per setting team's suggestion, don't need to test theme, so remove
related code in testing.

Bug: N/A
Test: N/A, Just remove test code.
Change-Id: If0ca632506b554a4471b5d25f07ab27a078de92e
2019-08-21 16:32:50 +08:00
Raff Tsai
64d9bc1351 Fix failed testcase
Fixes: 139505838
Test: robolectric
Change-Id: I553dfe1709fc845708c07c4f3288840b5925f0b3
2019-08-21 13:44:03 +08:00
Goven Liu
fe3548ef41 Merge "[Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog" into qt-qpr1-dev
am: cfcfb024c4

Change-Id: If72465328b970ce0d8e9d0c69f0a229a528bdbee
2019-08-20 22:36:09 -07:00
Goven Liu
7d6a2dd886 Merge "[Wi-Fi] Hide SoftKeyboard temporary when user tap the advanced button." 2019-08-21 04:27:59 +00:00
govenliu
14a74125e6 [Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog
We should set the same theme which applied in Settings APP to the NetworkRequestDialog

Bug: 139294487
Test: check if the right theme is applied when launching this activity.
Change-Id: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
Merged-In: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
2019-08-21 12:23:32 +08:00
TreeHugger Robot
785c024cad Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" 2019-08-20 08:37:07 +00:00
Arc Wang
3fff50e3ba [Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.

Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
      manual test:
      Click the Share button of a connected hidden SSID Wi-Fi network
      and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
      Settings to scan the saved QR code image.

Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
Merged-In: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
2019-08-20 16:15:02 +08:00
govenliu
c3eab6a9d9 [Wi-Fi] Hide SoftKeyboard temporary when user tap the advanced button.
When tapping on the advanced button during configuring a network, some items in the expanded list are covered by IME keyboard, which may cause user to ignore them accidently.

To improve it, hide the IME temporary to let user can see most of them.

Bug: 78441374
Test: Use ShadowInputMethodManager to check if the keyboard is hide or not after tapping on the advance button.
Change-Id: I0677d96febc90c66d1cf6f98555bbb436a654660
2019-08-20 10:55:44 +08:00
govenliu
dbf920cfff [Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog
We should set the same theme which applied in Settings APP to the NetworkRequestDialog

Bug: 139294487
Test: check if the right theme is applied when launching this activity.
Change-Id: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
2019-08-20 10:26:14 +08:00
Arc Wang
03f1ee1b50 [Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.

Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
      manual test:
      Click the Share button of a connected hidden SSID Wi-Fi network
      and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
      Settings to scan the saved QR code image.

Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
2019-08-20 09:54:17 +08:00
Raff Tsai
648ada031d Fix Battery page animation
TextView summary1 has default height 2 line. If the content is longer
than 2 line, the TextView increases itself which causes the animation.
By increasing minLines to 3, it can avoid the animation. And remove
summary2 because it is only for debug purpose, the debug information
can be merged to summary1.

Fixes: 139554919
Test: visual, make RunSettingsRoboTests
Change-Id: I167ac87c9bd83035e00d4991961599e76f4f69e1
2019-08-19 16:47:53 +08:00
Arc Wang
a266ec8ffd Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev am: 54dbed859d
am: 0e53b6293d

Change-Id: I574c161e5cdde8f879031ff403082dddefe0dbb9
2019-08-17 07:27:01 -07:00
Arc Wang
0e53b6293d Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I0d5071d429dbd82d420e1199bd5baed0b687e2ae
2019-08-17 07:18:03 -07:00
Arc Wang
2394d0821b Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I19214265a783f092bb183b3341aa1c2116f3188f
2019-08-17 07:17:59 -07:00
Arc Wang
5101624819 Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I7267b4fe82f6e5e6e6523463eb710049c68e66f9
2019-08-17 07:17:59 -07:00