aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-06 01:33:43 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-06 01:33:43 +0000
commitd659eaac8577e70b88143567aa22213a21486a58 (patch)
treee43b21731137ade5c9483a8a459f81e0b5f6e6aa
parent7a9cb31b24c7dfac7ab2e1e8af34eb7c51f6f34a (diff)
parentfb71d4ff22f593cb8babae9e8564630d10c9e453 (diff)
downloadContactsProvider-d659eaac8577e70b88143567aa22213a21486a58.tar.gz
Snap for 10079468 from fb71d4ff22f593cb8babae9e8564630d10c9e453 to udc-d1-release
Change-Id: Ibfe89d88bb9eee789f02e2c81bdf8deb76687a5b
-rw-r--r--src/com/android/providers/contacts/ContactsProvider2.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java
index e77526f0..f4ce5c74 100644
--- a/src/com/android/providers/contacts/ContactsProvider2.java
+++ b/src/com/android/providers/contacts/ContactsProvider2.java
@@ -140,6 +140,7 @@ import android.util.SparseArray;
import com.android.common.content.ProjectionMap;
import com.android.common.content.SyncStateContentProviderHelper;
import com.android.common.io.MoreCloseables;
+import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.config.appcloning.AppCloningDeviceConfigHelper;
import com.android.internal.util.ArrayUtils;
@@ -2194,16 +2195,17 @@ public class ContactsProvider2 extends AbstractContactsProvider
}
/**
- * Returned whether the feature flag for contacts sharing for clone profile is set. If true,
- * the clone contacts provider would use the parent contacts providers contacts data to serve
- * its requests.
+ * Returns whether contacts sharing is enabled allowing the clone contacts provider to use the
+ * parent contacts providers contacts data to serve its requests. The method returns true if
+ * the device supports clone profile contacts sharing and the feature flag for the same is
+ * turned on.
+ *
* @return true/false if contact sharing is enabled/disabled
*/
@VisibleForTesting
protected boolean isContactSharingEnabledForCloneProfile() {
- // TODO(b/253449368): This method should also check for the config controlling
- // all app-cloning features.
- return mAppCloningDeviceConfigHelper.getEnableAppCloningBuildingBlocks();
+ return getContext().getResources().getBoolean(R.bool.config_enableAppCloningBuildingBlocks)
+ && mAppCloningDeviceConfigHelper.getEnableAppCloningBuildingBlocks();
}
/**