WifiSetup: If device has Leanback feature specify tv.settings
Fugu has both com.android.settings and com.android.tv.settings so currently it brings up a selector dialog for how to handle the wifi intent, which leads to "Activity is launching as a new task, so cancelling activity result." Fix this by passing the component name in the intent if FEATURE_LEANBACK is present Change-Id: I470590315d3f95a32b7796dd4a916a543392fcd6
This commit is contained in:
@@ -222,6 +222,9 @@ public class WifiSetupPage extends SetupPage {
|
||||
private void launchWifiSetup() {
|
||||
SetupWizardUtils.tryEnablingWifi(mContext);
|
||||
Intent intent = new Intent(SetupWizardApp.ACTION_SETUP_WIFI);
|
||||
if (SetupWizardUtils.hasLeanback(mContext)) {
|
||||
intent.setComponent(SetupWizardUtils.mTvwifisettingsActivity);
|
||||
}
|
||||
intent.putExtra(SetupWizardApp.EXTRA_FIRST_RUN, true);
|
||||
intent.putExtra(SetupWizardApp.EXTRA_ALLOW_SKIP, true);
|
||||
intent.putExtra(SetupWizardApp.EXTRA_USE_IMMERSIVE, true);
|
||||
|
Reference in New Issue
Block a user