简体   繁体   中英

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

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. ie 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM