LineageParts: Inject Contributors Cloud into Settings via IA

This is now possible since Google added a new category key
that suits our needs.

Change-Id: Ib7b6ccca25eeaa9582b696dfe6953698c6fa9789
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b8a993a..468a590 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -253,6 +253,27 @@
                 android:resource="@string/expanded_desktop_settings_summary" />
         </activity-alias>
 
+        <!-- Contributors Cloud (MyDeviceInfo category) -->
+        <activity-alias
+            android:name=".contributors.ContributorsCloudFragment"
+            android:label="@string/contributors_cloud_fragment_title"
+            android:targetActivity="PartsActivity">
+            <intent-filter>
+                <action android:name="com.android.settings.action.IA_SETTINGS" />
+                <action android:name="org.lineageos.lineageparts.CONTRIBUTORS_CLOUD" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data
+                android:name="com.android.settings.category"
+                android:value="com.android.settings.category.ia.my_device_info" />
+            <meta-data
+                android:name="com.android.settings.order"
+                android:value="16" />
+            <meta-data
+                android:name="com.android.settings.summary"
+                android:resource="@string/summary_empty" />
+        </activity-alias>
+
         <!-- Anonymous Statistics -->
         <receiver android:name=".lineagestats.ReportingServiceManager"
             android:enabled="true"
diff --git a/res/xml/contributors_cloud.xml b/res/xml/contributors_cloud.xml
new file mode 100644
index 0000000..2e83511
--- /dev/null
+++ b/res/xml/contributors_cloud.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The LineageOS 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.
+-->
+
+<PreferenceScreen
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:key="contributors_cloud"
+    android:title="@string/contributors_cloud_fragment_title" />
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
index 2ad4fdb..a91deb9 100644
--- a/res/xml/parts_catalog.xml
+++ b/res/xml/parts_catalog.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
      Copyright (C) 2016 The CyanogenMod Project
-                   2017 The LineageOS Project
+                   2017-2019 The LineageOS Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -41,7 +41,8 @@
 
     <part android:key="contributors"
           android:title="@string/contributors_cloud_fragment_title"
-          android:fragment="org.lineageos.lineageparts.contributors.ContributorsCloudFragment" />
+          android:fragment="org.lineageos.lineageparts.contributors.ContributorsCloudFragment"
+          lineage:xmlRes="@xml/contributors_cloud" />
 
     <part android:key="livedisplay"
           android:title="@*lineageos.platform:string/live_display_title"