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

Commit ef0dc48c authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "Allow work profiles to set default dialer"

parents 16b34e41 e2b8d8fd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -817,10 +817,11 @@ public class TelecomServiceImpl {
        public String getDefaultDialerPackage(String callingPackage) {
            try {
                Log.startSession("TSI.gDDP", Log.getPackageAbbreviation(callingPackage));
                int callerUserId = UserHandle.getCallingUserId();
                final long token = Binder.clearCallingIdentity();
                try {
                    return mDefaultDialerCache.getDefaultDialerApplication(
                            ActivityManager.getCurrentUser());
                            callerUserId);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
@@ -1668,10 +1669,11 @@ public class TelecomServiceImpl {
                enforcePermission(MODIFY_PHONE_STATE);
                enforcePermission(WRITE_SECURE_SETTINGS);
                synchronized (mLock) {
                    int callerUserId = UserHandle.getCallingUserId();
                    long token = Binder.clearCallingIdentity();
                    try {
                        return mDefaultDialerCache.setDefaultDialer(packageName,
                                ActivityManager.getCurrentUser());
                                callerUserId);
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }