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

Commit 4659f381 authored by Kunduz Baryktabasova's avatar Kunduz Baryktabasova
Browse files

Add call log uri for marking missed calls as read when dialer apps get

notification on reboot.

Test: N/A
Bug: 292597423

Change-Id: I39b4b1cbd3d6626e4a70b7d15b31584adbbc0955
parent 95cce436
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -20,3 +20,10 @@ flag {
  description: "When set, Telecom will auto-unbind if a ConnectionService returns no connections after some time."
  bug: "293458004"
}

flag{
  name: "add_call_uri_for_missed_calls"
  namespace: "telecom"
  description: "The key is used for dialer apps to mark missed calls as read when it gets the notification on reboot."
  bug: "292597423"
}
+7 −2
Original line number Diff line number Diff line
@@ -263,8 +263,13 @@ public final class CallLogManager extends CallsManagerListenerBase {
            logCall(call, type, new LogCallCompletedListener() {
                @Override
                public void onLogCompleted(@Nullable Uri uri) {
                    if (mFeatureFlags.addCallUriForMissedCalls()){
                        mMissedCallNotifier.showMissedCallNotification(
                            new MissedCallNotifier.CallInfo(call));
                                new MissedCallNotifier.CallInfo(call), uri);
                    } else {
                        mMissedCallNotifier.showMissedCallNotification(
                                new MissedCallNotifier.CallInfo(call), /* uri= */ null);
                    }
                }
            }, result);
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -1021,7 +1021,7 @@ public class CallsManager extends Call.ListenerBase
            if (result.shouldShowNotification) {
                Log.i(this, "onCallScreeningCompleted: blocked call, showing notification.");
                mMissedCallNotifier.showMissedCallNotification(
                        new MissedCallNotifier.CallInfo(incomingCall));
                        new MissedCallNotifier.CallInfo(incomingCall), /* uri= */ null);
            }
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.telecom;

import android.annotation.Nullable;
import android.net.Uri;
import android.os.UserHandle;
import android.telecom.PhoneAccountHandle;
@@ -85,7 +86,7 @@ public interface MissedCallNotifier extends CallsManager.CallsManagerListener {

    void clearMissedCalls(UserHandle userHandle);

    void showMissedCallNotification(CallInfo call);
    void showMissedCallNotification(CallInfo call, @Nullable Uri uri);

    void reloadAfterBootComplete(CallerInfoLookupHelper callerInfoLookupHelper,
            CallInfoFactory callInfoFactory);
+2 −1
Original line number Diff line number Diff line
@@ -274,7 +274,8 @@ public class TelecomSystem {
            mMissedCallNotifier = missedCallNotifierImplFactory
                    .makeMissedCallNotifierImpl(mContext, mPhoneAccountRegistrar,
                            defaultDialerCache,
                            deviceIdleControllerAdapter);
                            deviceIdleControllerAdapter,
                            featureFlags);
            DisconnectedCallNotifier.Factory disconnectedCallNotifierFactory =
                    new DisconnectedCallNotifier.Default();

Loading