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

Commit cea3c3c9 authored by Brad Ebinger's avatar Brad Ebinger Committed by Automerger Merge Worker
Browse files

Add new intent launch button in dialer test activity am: ef4dff32

Change-Id: I51515cb68f15a631180c65b55f26e73e8a286dd9
parents 27b33f03 ef4dff32
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -90,4 +90,10 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        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>
+2 −0
Original line number Diff line number Diff line
@@ -113,4 +113,6 @@
        <item>The FCC has mandated that I respond... I will do so begrudgingly</item>
        <item>😂😂😂💯</item>
    </string-array>

    <string name="send_contact_discovery">Send Contact Discovery Intent</string>
</resources>
+16 −0
Original line number Diff line number Diff line
@@ -11,12 +11,18 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.provider.CallLog.Calls;
import android.provider.Settings;
import android.telecom.PhoneAccount;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
import android.telephony.ims.ImsRcsManager;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
@@ -80,6 +86,10 @@ public class TestDialerActivity extends Activity {
                toggleInCallService();
            }
        });

        Button discoveryButton = findViewById(R.id.send_contact_discovery_button);
        discoveryButton.setOnClickListener(v -> sendContactDiscoveryIntent());

        mPriorityView = findViewById(R.id.priority);
        updateMutableUi();
    }
@@ -201,4 +211,10 @@ public class TestDialerActivity extends Activity {
                == PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
        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);
    }
}