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

Commit 3d85ef43 authored by Andrew Lee's avatar Andrew Lee Committed by Ravi Paluri
Browse files

Add video calling setting to TelephonyManager.

We want to add a user setting to enable/disable video calling. This
is a telephony-level setting which the user sets using Telephony's
Call Settings, and applies universally to video calls.

But this setting needs to be accessible in places such as Dialer,
so these changes are to support storing the setting in
TelephonyManager (to be implemented in PhoneInterfaceManager) and
providing access to the setting for applications like Dialer
through TelephonyManager.

+ Add function definitions to ITelephony.
+ Add function wrapper implementations in TelephonyManager.

Conflicts:
	telephony/java/com/android/internal/telephony/ITelephony.aidl

Bug: 16014284
Change-Id: I1dce8bf5ae4f0ee115698ce9627ba8fc424dd855
parent 3215193e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -4197,15 +4197,24 @@ public class TelephonyManager {
        }
    }

//FIXME L-MR1-INTERNAL
    /** @hide */
    @SystemApi
    public void enableVideoCalling(boolean enable) {
        try {
            getITelephony().enableVideoCalling(enable);
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#enableVideoCalling", e);
        }
    }

    /** @hide */
    @SystemApi
    public boolean isVideoCallingEnabled() {
        try {
            return getITelephony().isVideoCallingEnabled();
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#isVideoCallingEnabled", e);
        }
        return false;
    }
}
+15 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import java.util.List;
/**
 * Interface used to interact with the phone.  Mostly this is used by the
 * TelephonyManager class.  A few places are still using this directly.
 * Please clean them up if possible and use TelephonyManager insteadl.
 * Please clean them up if possible and use TelephonyManager instead.
 *
 * {@hide}
 */
@@ -949,4 +949,18 @@ interface ITelephony {
      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
      */
    String getDeviceId();

    /**
     * Enables or disables video calling.
     *
     * @param enable Whether to enable video calling.
     */
    void enableVideoCalling(boolean enable);

    /**
     * Whether video calling has been enabled by the user.
     *
     * @return {@code True} if the user has enabled video calling, {@code false} otherwise.
     */
    boolean isVideoCallingEnabled();
}