Remove about preference in GoogleContacts

Bug: 30105414
Test: Open Contacts app and check that settings has About Contacts
section.
Test: Open GoogleContacts app and check that settings has no About
Contacts.

Change-Id: I24ec035be378a441e7dcdf6c495034cc6eda73d4
diff --git a/AndroidManifest_common.xml b/AndroidManifest_common.xml
index 8fc97ac..a6bc77e 100644
--- a/AndroidManifest_common.xml
+++ b/AndroidManifest_common.xml
@@ -222,7 +222,7 @@
         <activity android:name=".common.activity.LicenseActivity"
             android:label="@string/activity_title_licenses"
             android:theme="@style/ContactsPreferencesTheme"
-            android:exported="false" />
+            android:exported="true" />
 
         <!-- Used to filter contacts list by account -->
         <activity
diff --git a/src/com/android/contacts/common/preference/AboutPreferenceFragment.java b/src/com/android/contacts/common/preference/AboutPreferenceFragment.java
index 3b5a28d..d8426ba 100644
--- a/src/com/android/contacts/common/preference/AboutPreferenceFragment.java
+++ b/src/com/android/contacts/common/preference/AboutPreferenceFragment.java
@@ -35,8 +35,8 @@
  */
 public class AboutPreferenceFragment extends PreferenceFragment {
 
-    private static final String PRIVACY_POLICY_URL = "http://www.google.com/policies/privacy";
-    private static final String TERMS_OF_SERVICE_URL = "http://www.google.com/policies/terms";
+    public static final String PRIVACY_POLICY_URL = "http://www.google.com/policies/privacy";
+    public static final String TERMS_OF_SERVICE_URL = "http://www.google.com/policies/terms";
 
     public static AboutPreferenceFragment newInstance() {
         return new AboutPreferenceFragment();
diff --git a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
index 901a15e..e2782f8 100644
--- a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
+++ b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
@@ -57,6 +57,7 @@
 import com.android.contacts.common.model.account.AccountWithDataSet;
 import com.android.contacts.common.util.AccountFilterUtil;
 import com.android.contacts.common.util.ImplicitIntentsUtil;
+import com.android.contactsbind.HelpUtils;
 
 import java.util.List;
 
@@ -226,7 +227,9 @@
         }
 
         final Preference aboutPreference = findPreference(KEY_ABOUT);
-        aboutPreference.setOnPreferenceClickListener(this);
+        if (aboutPreference != null) {
+            aboutPreference.setOnPreferenceClickListener(this);
+        }
 
         final Preference customFilterPreference = findPreference(KEY_CUSTOM_CONTACTS_FILTER);
         if (customFilterPreference != null) {
@@ -263,6 +266,10 @@
             getPreferenceScreen().removePreference(findPreference(KEY_SORT_ORDER));
         }
 
+        if (HelpUtils.isHelpAndFeedbackAvailable()) {
+            getPreferenceScreen().removePreference(findPreference(KEY_ABOUT));
+        }
+
         // Disable display order for CJK locales as well
         if (!resources.getBoolean(R.bool.config_display_order_user_changeable)) {
             getPreferenceScreen().removePreference(findPreference(KEY_DISPLAY_ORDER));