[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
This commit is contained in:
@@ -149,16 +149,15 @@ public class InternetUpdater implements AirplaneModeEnabler.OnAirplaneModeChange
|
||||
|
||||
public InternetUpdater(Context context, Lifecycle lifecycle,
|
||||
OnInternetTypeChangedListener listener) {
|
||||
if (lifecycle == null) {
|
||||
throw new IllegalArgumentException("Lifecycle must be set");
|
||||
}
|
||||
mContext = context;
|
||||
mAirplaneModeEnabler = new AirplaneModeEnabler(mContext, this);
|
||||
mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
|
||||
mWifiManager = mContext.getSystemService(WifiManager.class);
|
||||
mWifiStateFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
|
||||
mOnInternetTypeChangedListener = listener;
|
||||
lifecycle.addObserver(this);
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
/** @OnLifecycleEvent(ON_RESUME) */
|
||||
|
Reference in New Issue
Block a user