Loading testapps/res/layout/testdialer_main.xml +6 −0 Original line number Original line Diff line number Diff line Loading @@ -90,4 +90,10 @@ android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:text="Toggle InCallService" /> android:text="Toggle InCallService" /> <Button android:id="@+id/send_contact_discovery_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/send_contact_discovery" /> </LinearLayout> </LinearLayout> testapps/res/values/donottranslate_strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -113,4 +113,6 @@ <item>The FCC has mandated that I respond... I will do so begrudgingly</item> <item>The FCC has mandated that I respond... I will do so begrudgingly</item> <item>😂😂😂💯</item> <item>😂😂😂💯</item> </string-array> </string-array> <string name="send_contact_discovery">Send Contact Discovery Intent</string> </resources> </resources> testapps/src/com/android/server/telecom/testapps/TestDialerActivity.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -11,12 +11,18 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager; import android.net.Uri; import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.PersistableBundle; import android.provider.CallLog.Calls; import android.provider.CallLog.Calls; import android.provider.Settings; import android.telecom.PhoneAccount; import android.telecom.PhoneAccount; import android.telecom.TelecomManager; import android.telecom.TelecomManager; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; import android.telephony.ims.ImsRcsManager; import android.util.Log; import android.util.Log; import android.view.View; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.CheckBox; import android.widget.CheckBox; import android.widget.EditText; import android.widget.EditText; import android.widget.Toast; import android.widget.Toast; Loading Loading @@ -80,6 +86,10 @@ public class TestDialerActivity extends Activity { toggleInCallService(); toggleInCallService(); } } }); }); Button discoveryButton = findViewById(R.id.send_contact_discovery_button); discoveryButton.setOnClickListener(v -> sendContactDiscoveryIntent()); mPriorityView = findViewById(R.id.priority); mPriorityView = findViewById(R.id.priority); updateMutableUi(); updateMutableUi(); } } Loading Loading @@ -201,4 +211,10 @@ public class TestDialerActivity extends Activity { == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; Toast.makeText(this, "Is UI enabled? " + isEnabled, Toast.LENGTH_LONG).show(); Toast.makeText(this, "Is UI enabled? " + isEnabled, Toast.LENGTH_LONG).show(); } } private void sendContactDiscoveryIntent() { Intent intent = new Intent(ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN); intent.putExtra(Settings.EXTRA_SUB_ID, SubscriptionManager.getDefaultSubscriptionId()); startActivity(intent); } } } Loading
testapps/res/layout/testdialer_main.xml +6 −0 Original line number Original line Diff line number Diff line Loading @@ -90,4 +90,10 @@ android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:text="Toggle InCallService" /> android:text="Toggle InCallService" /> <Button android:id="@+id/send_contact_discovery_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/send_contact_discovery" /> </LinearLayout> </LinearLayout>
testapps/res/values/donottranslate_strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -113,4 +113,6 @@ <item>The FCC has mandated that I respond... I will do so begrudgingly</item> <item>The FCC has mandated that I respond... I will do so begrudgingly</item> <item>😂😂😂💯</item> <item>😂😂😂💯</item> </string-array> </string-array> <string name="send_contact_discovery">Send Contact Discovery Intent</string> </resources> </resources>
testapps/src/com/android/server/telecom/testapps/TestDialerActivity.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -11,12 +11,18 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager; import android.net.Uri; import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.PersistableBundle; import android.provider.CallLog.Calls; import android.provider.CallLog.Calls; import android.provider.Settings; import android.telecom.PhoneAccount; import android.telecom.PhoneAccount; import android.telecom.TelecomManager; import android.telecom.TelecomManager; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; import android.telephony.ims.ImsRcsManager; import android.util.Log; import android.util.Log; import android.view.View; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.CheckBox; import android.widget.CheckBox; import android.widget.EditText; import android.widget.EditText; import android.widget.Toast; import android.widget.Toast; Loading Loading @@ -80,6 +86,10 @@ public class TestDialerActivity extends Activity { toggleInCallService(); toggleInCallService(); } } }); }); Button discoveryButton = findViewById(R.id.send_contact_discovery_button); discoveryButton.setOnClickListener(v -> sendContactDiscoveryIntent()); mPriorityView = findViewById(R.id.priority); mPriorityView = findViewById(R.id.priority); updateMutableUi(); updateMutableUi(); } } Loading Loading @@ -201,4 +211,10 @@ public class TestDialerActivity extends Activity { == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; == PackageManager.COMPONENT_ENABLED_STATE_ENABLED; Toast.makeText(this, "Is UI enabled? " + isEnabled, Toast.LENGTH_LONG).show(); Toast.makeText(this, "Is UI enabled? " + isEnabled, Toast.LENGTH_LONG).show(); } } private void sendContactDiscoveryIntent() { Intent intent = new Intent(ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN); intent.putExtra(Settings.EXTRA_SUB_ID, SubscriptionManager.getDefaultSubscriptionId()); startActivity(intent); } } }