Rename a bunch of mobile network files

1. Make them have "MobileNetwork" prefix
2. Also update WifiCallingPreference to remove its category
if it is invisible

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I25871d579d6495e902e5583030889942ed2506a8
This commit is contained in:
jackqdyulei
2018-10-29 13:46:33 -07:00
parent 76da1123e4
commit 2aae67a061
11 changed files with 78 additions and 44 deletions

View File

@@ -46,6 +46,9 @@ import java.util.List;
public class WifiCallingPreferenceController extends BasePreferenceController implements
LifecycleObserver, OnStart, OnStop {
@VisibleForTesting
static final String KEY_PREFERENCE_CATEGORY = "calling_category";
private TelephonyManager mTelephonyManager;
@VisibleForTesting
ImsManager mImsManager;
@@ -86,6 +89,13 @@ public class WifiCallingPreferenceController extends BasePreferenceController im
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
mPreference = screen.findPreference(getPreferenceKey());
if (!isAvailable()) {
// Set category as invisible
final Preference preferenceCateogry = screen.findPreference(KEY_PREFERENCE_CATEGORY);
if (preferenceCateogry != null) {
preferenceCateogry.setVisible(false);
}
}
}
@Override