From de06181c7e22364656fa5373afb1234c419c1b6b Mon Sep 17 00:00:00 2001 From: dhacker29 Date: Thu, 23 Apr 2015 01:30:19 -0400 Subject: 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 --- src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/com/cyanogenmod/setupwizard/setup') diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java index a9574fd..63a9a0e 100644 --- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java @@ -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); -- cgit v1.1