Fix intent filter for ManageExternalSourcesActivity

Also fix fragment nesting so the activity is styled correctly

Bug: 38496265
Test: adb shell am start -a android.settings.MANAGE_UNKNOWN_APP_SOURCES package:com.example.app
Change-Id: Iefe4d47eea9ed92e74631c0ed02e639e66a913f1
(cherry picked from commit 252036fc847c5deaeb8906fc93b8fcd61fb4ff66)
(cherry picked from commit d00bb30c3e82064f1f1884d72a37479f9ffaf180)
diff --git a/Settings/AndroidManifest.xml b/Settings/AndroidManifest.xml
index 9f7112b..74c271b 100644
--- a/Settings/AndroidManifest.xml
+++ b/Settings/AndroidManifest.xml
@@ -597,11 +597,17 @@
 
         <activity android:name=".device.apps.specialaccess.ManageExternalSourcesActivity"
                 android:label="@string/install_other_apps"
+                android:theme="@style/Theme.Settings.Transparent"
                 android:taskAffinity="">
             <intent-filter android:priority="1">
                 <action android:name="android.settings.MANAGE_UNKNOWN_APP_SOURCES" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
+            <intent-filter android:priority="1">
+                <action android:name="android.settings.MANAGE_UNKNOWN_APP_SOURCES" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:scheme="package" />
+            </intent-filter>
         </activity>
 
         <!-- Dummy intent filters for CTS TODO: implement something useful -->
diff --git a/Settings/src/com/android/tv/settings/device/apps/specialaccess/ManageExternalSourcesActivity.java b/Settings/src/com/android/tv/settings/device/apps/specialaccess/ManageExternalSourcesActivity.java
index 4bfd2b2..29f6118 100644
--- a/Settings/src/com/android/tv/settings/device/apps/specialaccess/ManageExternalSourcesActivity.java
+++ b/Settings/src/com/android/tv/settings/device/apps/specialaccess/ManageExternalSourcesActivity.java
@@ -18,6 +18,7 @@
 
 import android.app.Fragment;
 
+import com.android.tv.settings.BaseSettingsFragment;
 import com.android.tv.settings.TvSettingsActivity;
 import com.android.tv.settings.system.SecurityFragment;
 
@@ -32,7 +33,26 @@
             finish();
             return null;
         } else {
-            return new ManageExternalSources();
+            return SettingsFragment.newInstance();
+        }
+    }
+
+    /**
+     * Wrapper fragment for ManageExternalSources
+     */
+    public static class SettingsFragment extends BaseSettingsFragment {
+
+        /**
+         * @return new instance of {@link SettingsFragment}
+         */
+        public static SettingsFragment newInstance() {
+            return new SettingsFragment();
+        }
+
+        @Override
+        public void onPreferenceStartInitialScreen() {
+            final ManageExternalSources fragment = new ManageExternalSources();
+            startPreferenceFragment(fragment);
         }
     }
 }