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

Commit 8bc97b10 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Set number presentation in call log correctly" into lmp-mr1-dev

parents 767790f6 d5725fae
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -140,13 +140,12 @@ final class CallLogManager extends CallsManagerListenerBase {

        Log.d(TAG, "logNumber set to: %s", Log.pii(logNumber));

        final int presentation = getPresentation(call);
        final PhoneAccountHandle accountHandle = call.getTargetPhoneAccount();

        // TODO(vt): Once data usage is available, wire it up here.
        int callFeatures = getCallFeatures(call.getVideoStateHistory());
        logCall(call.getCallerInfo(), logNumber, presentation, callLogType, callFeatures,
                accountHandle, creationTime, age, null);
        logCall(call.getCallerInfo(), logNumber, call.getHandlePresentation(),
                callLogType, callFeatures, accountHandle, creationTime, age, null);
    }

    /**
@@ -231,21 +230,6 @@ final class CallLogManager extends CallsManagerListenerBase {
        return handleString;
    }

    /**
     * Gets the presentation from the {@link Call}.
     *
     * TODO: There needs to be a way to pass information from
     * Connection.getNumberPresentation() into a {@link Call} object. Until then, always return
     * PhoneConstants.PRESENTATION_ALLOWED. On top of that, we might need to introduce
     * getNumberPresentation to the ContactInfo object as well.
     *
     * @param call The call object to retrieve caller details from.
     * @return The number presentation constant to insert into the call logs.
     */
    private int getPresentation(Call call) {
        return PhoneConstants.PRESENTATION_ALLOWED;
    }

    /**
     * Adds the call defined by the parameters in the provided AddCallArgs to the CallLogProvider
     * using an AsyncTask to avoid blocking the main thread.