Flip the value of "privacy" setting and "active call"
Both default value should be false.
Bug: 162573313
Test: Manually
Change-Id: I33a0fe08aaa0c76df6ccde91eaabb2f4941f03dd
diff --git a/res/values/configs.xml b/res/values/configs.xml
index d295698..123b867 100644
--- a/res/values/configs.xml
+++ b/res/values/configs.xml
@@ -51,7 +51,7 @@
<bool name="config_should_show_active_call_setting">false</bool>
<!-- A config determines whether to show a heads up notification when there's a incoming call-->
- <bool name="config_should_show_incoming_call_hun">true</bool>
+ <bool name="config_should_suppress_incoming_call_hun">false</bool>
<!-- A config determines whether to show an entry in setting to config showing a heads up
notification when there's a incoming call-->
<bool name="config_should_show_incoming_call_hun_setting">false</bool>
diff --git a/res/xml/settings_page.xml b/res/xml/settings_page.xml
index 81389ff..b63e4f1 100644
--- a/res/xml/settings_page.xml
+++ b/res/xml/settings_page.xml
@@ -32,7 +32,7 @@
app:isPreferenceVisible="@bool/config_should_show_active_call_setting"/>
<SwitchPreference
- android:defaultValue="@bool/config_should_show_incoming_call_hun"
+ android:defaultValue="@bool/config_should_suppress_incoming_call_hun"
android:key="@string/pref_no_incoming_call_hun_key"
android:title="@string/pref_no_incoming_call_hun_title"
android:summary="@string/pref_no_incoming_call_hun_summary"
diff --git a/src/com/android/car/dialer/telecom/InCallRouter.java b/src/com/android/car/dialer/telecom/InCallRouter.java
index d00a20d..127c4dc 100644
--- a/src/com/android/car/dialer/telecom/InCallRouter.java
+++ b/src/com/android/car/dialer/telecom/InCallRouter.java
@@ -164,13 +164,13 @@
}
private boolean shouldShowIncomingCallHun() {
- return PreferenceManager.getDefaultSharedPreferences(mContext)
- .getBoolean(mContext.getString(R.string.pref_no_incoming_call_hun_key), true);
+ return !PreferenceManager.getDefaultSharedPreferences(mContext)
+ .getBoolean(mContext.getString(R.string.pref_no_incoming_call_hun_key), false);
}
private boolean shouldShowFullScreenUi() {
return PreferenceManager.getDefaultSharedPreferences(mContext)
.getBoolean(mContext.getString(R.string.pref_no_fullscreen_active_call_ui_key),
- true);
+ false);
}
}