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

Commit cb71babf authored by Sandeep Kunta's avatar Sandeep Kunta Committed by Natiq Ahmed
Browse files

CallReceiver method should not be called directly

in new release, as CallActivity & CallReceiver are in different
processes, method in CallRecevier should not be directly called
from CallActivity.

Change-Id: I9e7af0dd50ce9be2dc14c47cbc5d2cc65b091685
parent c81ef639
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -189,12 +189,8 @@ public class CallActivity extends Activity {

        intent.putExtra(CallReceiver.KEY_IS_DEFAULT_DIALER, isDefaultDialer());

        if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
            CallReceiver.processOutgoingCallIntent(getApplicationContext(), intent);
        } else {
        sendBroadcastToReceiver(intent, false /* isIncoming */);
    }
    }

    private boolean isTtyModeEnabled() {
        return (android.provider.Settings.Secure.getInt(
@@ -204,12 +200,8 @@ public class CallActivity extends Activity {
    }

    private void processIncomingCallIntent(Intent intent) {
        if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
            CallReceiver.processIncomingCallIntent(intent);
        } else {
        sendBroadcastToReceiver(intent, true /* isIncoming */);
    }
    }

    private boolean isDefaultDialer() {
        final String packageName = getCallingPackage();