Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffcb31f6 authored by Walter Jang's avatar Walter Jang
Browse files

Change name of device account detection flag (1/2)

Test: see I1b9a0cbcd47c9a0a4e2299a692c7b7145ffeeec2
Bug: 32604475
Bug: 35246161

Change-Id: I24b1e5fa69172fbb3ce66e0946aca7cb6843e3fb
parent 34ae3fcd
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -19,6 +19,13 @@ package com.android.contacts;
 * Experiment flag names.
 */
public final class Experiments {

    /**
     * Experiment to enable device account detection using CP2 queries
     */
    public static final String CP2_DEVICE_ACCOUNT_DETECTION_ENABLED =
            "Account__cp2_device_account_detection_enabled";

    /**
     * Flags for maximum content update time
     */
@@ -31,12 +38,6 @@ public final class Experiments {
    public static final String DYNAMIC_MIN_CONTENT_CHANGE_UPDATE_DELAY_MILLIS =
            "Shortcuts__dynamic_min_content_change_update_delay_millis";

    /**
     * Experiment to enable device account detection using CP2 queries
     */
    public static final String OEM_CP2_DEVICE_ACCOUNT_DETECTION_ENABLED =
            "OEM__cp2_device_account_detection_enabled";

    /**
     * Flags for maximum time to show spinner for a contacts sync.
     */
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ class AccountTypeManagerImpl extends AccountTypeManager

        ContentResolver.addStatusChangeListener(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS, this);

        if (Flags.getInstance().getBoolean(Experiments.OEM_CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
        if (Flags.getInstance().getBoolean(Experiments.CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
            // Observe changes to RAW_CONTACTS so that we will update the list of "Device" accounts
            // if a new device contact is added.
            mContext.getContentResolver().registerContentObserver(
+2 −2
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public abstract class DeviceLocalAccountLocator {

    public static DeviceLocalAccountLocator create(Context context,
            Set<String> knownAccountTypes) {
        if (Flags.getInstance().getBoolean(Experiments.OEM_CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
        if (Flags.getInstance().getBoolean(Experiments.CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
            return new Cp2DeviceLocalAccountLocator(context.getContentResolver(),
                    ObjectFactory.getDeviceLocalAccountTypeFactory(context), knownAccountTypes);
        }
@@ -65,7 +65,7 @@ public abstract class DeviceLocalAccountLocator {
        for (Account account : accountManager.getAccounts()) {
            knownTypes.add(account.type);
        }
        if (Flags.getInstance().getBoolean(Experiments.OEM_CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
        if (Flags.getInstance().getBoolean(Experiments.CP2_DEVICE_ACCOUNT_DETECTION_ENABLED)) {
            return new Cp2DeviceLocalAccountLocator(context.getContentResolver(),
                    ObjectFactory.getDeviceLocalAccountTypeFactory(context), knownTypes);
        } else {