OSDN Git Service

Go to the correct subscription in WifiCallingSettings
authorAntony Sargent <asargent@google.com>
Tue, 9 Apr 2019 22:32:39 +0000 (15:32 -0700)
committerAntony Sargent <asargent@google.com>
Tue, 9 Apr 2019 23:08:04 +0000 (16:08 -0700)
commit02db2ef9b684402dc256c5f4b53855e86adbcaac
tree634606ae449ba0ce8a4955aa260720f056fbb382
parentf0789717715bc47f988cb02d218eafa07bf4495a
Go to the correct subscription in WifiCallingSettings

For subscriptions that support wifi calling, we have a preference on the
mobile network details page which leads to a Wifi Calling page. That
page already supports the concept of multiple subscriptions with a
header strip containing a tab for each subscription that supports wifi
calling. However, we were not necessarily selecting the *correct* tab
when going to this page. So you might be viewing the mobile network
details for subscription B and click on "Wifi Calling", only to land on
the page with the tab for subscription A selected.

This CL fixes the problem by adding an extra with the current
subscription id to the Preference's intent in
WifiCallingPreferenceController, and then reads that extra in
WifiCallingSettings and uses it to select the appropriate tab.

Fixes: 117135894
Test: make RunSettingsRoboTests
Change-Id: I3aec30072712247d14fe0fb6b61207535f9e981c
src/com/android/settings/network/telephony/WifiCallingPreferenceController.java
src/com/android/settings/wifi/calling/WifiCallingSettings.java
tests/robotests/src/com/android/settings/network/telephony/WifiCallingPreferenceControllerTest.java
tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSettingsTest.java [new file with mode: 0644]