How to set my custom dialer app as default dialer in AOSP

1.2k views Asked by At

I am working on custom ROM and there is requirement for implementing a custom dialer application. The dialer is working fine but only things is pending that to make default one.

I have added folder in package directory with Android.mk and dialer.apk file (I have not added source code). My custom dialer application install as system application and all system level permission as well.

I have tried couple of solution to archive this but not getting success on this. i.e. link1, link2.

Also added LOCAL_OVERRIDES_PACKAGES field/flag in my Android.mk and on this the aosp dialer application not install but my dialer application is not set as defaut.

Once I have set as default dialer application everything are working fine.

Can anyone help me on this to set custom dialer application (.apk) as a default dialer application in aosp. Or there issue as i have not added source code instead of that I have added only .apk file.

I am using Android-11 source code.

1

There are 1 answers

2
Yong On BEST ANSWER

The query logic has changed and it's in packages/services/Telecomm/src/com/android/server/telecom/DefaultDialerCache.java

Resources resources = mContext.getResources();
mSystemDialerComponentName = new ComponentName(resources.getString(
    com.android.internal.R.string.config_defaultDialer),
    resources.getString(R.string.incall_default_class));

You should modify or overlay

  1. config_defaultDialer in frameworks/base/core/res/res/values/config.xml
  2. incall_default_class in packages/services/Telecomm/res/values/config.xml
  3. dialer_default_class in packages/services/Telecomm/res/values/config.xml