Retrieve WifiDppQrGeneratorFragment at runtime.
* Add getWifiDppQrCodeGeneratorFragment() in WifiFeatureProvider * WifiDppConfiguratorActivity calls from the FeatureFactory to get WifiDppQrCodeGeneratorFragment instance * Use a flag to guard this behaviour * Updated a few private variables of WifiDppQrCodeGeneratorFragment to protected so I can access them in derived classes. Bug: b/338891273 Settings Intake: b/329012096 Test: manual test, override the flag locally, and check I can switch to overriden implementation. Flag: com.android.settings.flags.enable_wifi_sharing_runtime_fragment Change-Id: I715bf89bd9be221f06914e87629c76bf7a2f743f
This commit is contained in:
@@ -27,6 +27,7 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
|
||||
import com.android.settings.wifi.details.WifiNetworkDetailsViewModel;
|
||||
import com.android.settings.wifi.dpp.WifiDppQrCodeGeneratorFragment;
|
||||
import com.android.settings.wifi.repository.SharedConnectivityRepository;
|
||||
import com.android.settings.wifi.repository.WifiHotspotRepository;
|
||||
import com.android.settings.wifi.tether.WifiHotspotSecurityViewModel;
|
||||
@@ -146,6 +147,15 @@ public class WifiFeatureProvider {
|
||||
return viewModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an instance of WifiDppQrCodeGeneratorFragment
|
||||
*/
|
||||
public WifiDppQrCodeGeneratorFragment getWifiDppQrCodeGeneratorFragment() {
|
||||
WifiDppQrCodeGeneratorFragment fragment = new WifiDppQrCodeGeneratorFragment();
|
||||
verboseLog(TAG, "getWifiDppQrCodeGeneratorFragment():" + fragment);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a {@link Log#VERBOSE} log message.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user