diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml
index 6c91aea..dbb106e 100644
--- a/res/xml/top_level_settings.xml
+++ b/res/xml/top_level_settings.xml
@@ -120,6 +120,7 @@
         android:summary="@string/support_summary"
         android:title="@string/page_tab_title_support"
         android:icon="@drawable/ic_homepage_support"
-        android:order="100"/>
+        android:order="100"
+        settings:controller="com.android.settings.support.SupportPreferenceController"/>
 
 </PreferenceScreen>
\ No newline at end of file
diff --git a/src/com/android/settings/homepage/TopLevelSettings.java b/src/com/android/settings/homepage/TopLevelSettings.java
index c450157..8f70b2b 100644
--- a/src/com/android/settings/homepage/TopLevelSettings.java
+++ b/src/com/android/settings/homepage/TopLevelSettings.java
@@ -33,6 +33,7 @@
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.dashboard.DashboardFragment;
 import com.android.settings.search.BaseSearchIndexProvider;
+import com.android.settings.support.SupportPreferenceController;
 import com.android.settingslib.core.instrumentation.Instrumentable;
 import com.android.settingslib.search.SearchIndexable;
 
@@ -68,6 +69,12 @@
     }
 
     @Override
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        use(SupportPreferenceController.class).setActivity(getActivity());
+    }
+
+    @Override
     public int getHelpResource() {
         // Disable the help icon because this page uses a full search view in actionbar.
         return 0;
diff --git a/src/com/android/settings/support/SupportPreferenceController.java b/src/com/android/settings/support/SupportPreferenceController.java
new file mode 100644
index 0000000..793842f
--- /dev/null
+++ b/src/com/android/settings/support/SupportPreferenceController.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.support;
+
+import android.app.Activity;
+import android.content.Context;
+import android.text.TextUtils;
+
+import androidx.preference.Preference;
+
+import com.android.settings.core.BasePreferenceController;
+import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.overlay.SupportFeatureProvider;
+
+public class SupportPreferenceController extends BasePreferenceController {
+
+    private final SupportFeatureProvider mSupportFeatureProvider;
+
+    private Activity mActivity;
+
+    public SupportPreferenceController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+        mSupportFeatureProvider = FeatureFactory.getFactory(context)
+                .getSupportFeatureProvider(context);
+    }
+
+    public void setActivity(Activity activity) {
+        mActivity = activity;
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return mSupportFeatureProvider == null ? UNSUPPORTED_ON_DEVICE : AVAILABLE;
+    }
+
+    @Override
+    public boolean handlePreferenceTreeClick(Preference preference) {
+        if (preference == null || mActivity == null ||
+                !TextUtils.equals(preference.getKey(), getPreferenceKey())) {
+            return false;
+        }
+        mSupportFeatureProvider.startSupport(mActivity);
+        return true;
+
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/support/SupportPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/support/SupportPreferenceControllerTest.java
new file mode 100644
index 0000000..d805047
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/support/SupportPreferenceControllerTest.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.support;
+
+import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.verify;
+
+import android.app.Activity;
+
+import androidx.preference.Preference;
+
+import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.Robolectric;
+import org.robolectric.util.ReflectionHelpers;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+public class SupportPreferenceControllerTest {
+
+
+    private Activity mActivity;
+    private FakeFeatureFactory mFeatureFactory;
+    private Preference mPreference;
+
+    @Before
+    public void setUp() {
+        mActivity = Robolectric.setupActivity(Activity.class);
+        mFeatureFactory = FakeFeatureFactory.setupForTest();
+        mPreference = new Preference(mActivity);
+        mPreference.setKey("test_key");
+    }
+
+    @Test
+    public void getAvailability_noSupport_unavailable() {
+        ReflectionHelpers.setField(mFeatureFactory, "supportFeatureProvider", null);
+        assertThat(new SupportPreferenceController(mActivity, "test_key").getAvailabilityStatus())
+                .isEqualTo(UNSUPPORTED_ON_DEVICE);
+    }
+
+    @Test
+    public void getAvailability_hasSupport_available() {
+        assertThat(new SupportPreferenceController(mActivity, "test_key").getAvailabilityStatus())
+                .isEqualTo(AVAILABLE);
+    }
+
+    @Test
+    public void handlePreferenceTreeClick_shouldLaunchSupport() {
+        final SupportPreferenceController controller = new SupportPreferenceController(mActivity,
+                mPreference.getKey());
+        controller.setActivity(mActivity);
+
+        assertThat(controller.handlePreferenceTreeClick(mPreference)).isTrue();
+        verify(mFeatureFactory.supportFeatureProvider).startSupport(mActivity);
+    }
+
+}
