Change carrier config

Use KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL instead of
KEY_USE_RCS_PRESENCE_BOOL

Bug: 173828080
Test: build pass
Change-Id: I384686bd073a00341f4e552b71b24798619502fa
This commit is contained in:
allenwtsu
2020-11-27 01:13:26 +08:00
parent 4d181cc04f
commit 91f11e9a47
3 changed files with 12 additions and 4 deletions

View File

@@ -98,8 +98,11 @@ public class ContactDiscoveryPreferenceController extends TelephonyTogglePrefere
@Override
public int getAvailabilityStatus(int subId) {
PersistableBundle bundle = mCarrierConfigManager.getConfigForSubId(subId);
boolean shouldShowPresence = bundle != null && bundle.getBoolean(
CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/);
boolean shouldShowPresence = bundle != null
&& (bundle.getBoolean(
CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/)
|| bundle.getBoolean(
CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false /*default*/));
return shouldShowPresence ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
}

View File

@@ -199,7 +199,10 @@ public class MobileNetworkUtils {
return false;
}
PersistableBundle bundle = carrierConfigManager.getConfigForSubId(subId);
return bundle.getBoolean(CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/);
return bundle.getBoolean(
CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/)
|| bundle.getBoolean(CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL,
false /*default*/);
}
@VisibleForTesting

View File

@@ -159,7 +159,9 @@ public class ContactDiscoveryPreferenceControllerTest {
}
private void setRcsPresenceConfig(boolean isEnabled) {
mCarrierConfig.putBoolean(CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, isEnabled);
mCarrierConfig.putBoolean(
CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL,
isEnabled);
}
private ContentObserver getUceChangeObserver() {