diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-06 01:34:00 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-06 01:34:00 +0000 |
commit | 9f9fcf22651247c50dcd07742e6a4cb6739df6ad (patch) | |
tree | e43b21731137ade5c9483a8a459f81e0b5f6e6aa | |
parent | 5f5c06a1bdb1d6c92164c2c2d31b5ca47ea66663 (diff) | |
parent | de593df5b54d75478f5ede312abeac8d7008003d (diff) | |
download | ContactsProvider-9f9fcf22651247c50dcd07742e6a4cb6739df6ad.tar.gz |
Snap for 10078820 from de593df5b54d75478f5ede312abeac8d7008003d to udc-release
Change-Id: I39e79a68c61ee7f08881ae2a041da392ab911324
-rw-r--r-- | src/com/android/providers/contacts/ContactsProvider2.java | 14 |
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(); } /** |