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

Commit 2a46b902 authored by Sailesh Nepal's avatar Sailesh Nepal
Browse files

Move ICallService.aidl to IConnectionService.aidl

Change-Id: I5a082e50dafea0104174cb97d3ae8af168944fc3
parent 7f87e8ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -328,12 +328,12 @@ LOCAL_SRC_FILES += \
	media/java/android/media/tv/ITvInputServiceCallback.aidl \
	media/java/android/media/tv/ITvInputSession.aidl \
	media/java/android/media/tv/ITvInputSessionCallback.aidl \
	telecomm/java/com/android/internal/telecomm/ICallService.aidl \
	telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl \
	telecomm/java/com/android/internal/telecomm/ICallServiceLookupResponse.aidl \
	telecomm/java/com/android/internal/telecomm/ICallServiceProvider.aidl \
	telecomm/java/com/android/internal/telecomm/ICallVideoProvider.aidl \
	telecomm/java/com/android/internal/telecomm/ICallVideoClient.aidl \
	telecomm/java/com/android/internal/telecomm/IConnectionService.aidl \
	telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl \
	telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl \
	telecomm/java/com/android/internal/telecomm/IInCallService.aidl \
	telecomm/java/com/android/internal/telecomm/ITelecommService.aidl \
+1 −0
Original line number Diff line number Diff line
@@ -209,6 +209,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framew
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework2_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/telecomm/java/com/android/internal/telecomm)

# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
+8 −26
Original line number Diff line number Diff line
@@ -27536,21 +27536,6 @@ package android.telecomm {
    field public static final int VoWIFI = 2; // 0x2
  }
  public final class CallInfo implements android.os.Parcelable {
    ctor public CallInfo(java.lang.String, android.telecomm.CallState, android.net.Uri);
    method public int describeContents();
    method public android.telecomm.PhoneAccount getAccount();
    method public android.telecomm.CallServiceDescriptor getCurrentCallServiceDescriptor();
    method public android.os.Bundle getExtras();
    method public android.telecomm.GatewayInfo getGatewayInfo();
    method public android.net.Uri getHandle();
    method public java.lang.String getId();
    method public android.net.Uri getOriginalHandle();
    method public android.telecomm.CallState getState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public final class CallNumberPresentation extends java.lang.Enum {
    method public static android.telecomm.CallNumberPresentation valueOf(java.lang.String);
    method public static final android.telecomm.CallNumberPresentation[] values();
@@ -27560,15 +27545,9 @@ package android.telecomm {
    enum_constant public static final android.telecomm.CallNumberPresentation UNKNOWN;
  }
  public abstract class CallService extends android.app.Service {
    ctor public CallService();
    method public final android.os.IBinder getBinder();
    method public final android.os.IBinder onBind(android.content.Intent);
  }
  public final class CallServiceDescriptor implements android.os.Parcelable {
    method public int describeContents();
    method public java.lang.String getCallServiceId();
    method public java.lang.String getConnectionServiceId();
    method public int getNetworkType();
    method public android.content.ComponentName getServiceComponent();
    method public static android.telecomm.CallServiceDescriptor.Builder newBuilder(android.content.Context);
@@ -27581,7 +27560,7 @@ package android.telecomm {
  public static class CallServiceDescriptor.Builder {
    method public android.telecomm.CallServiceDescriptor build();
    method public android.telecomm.CallServiceDescriptor.Builder setCallService(java.lang.Class<? extends android.telecomm.CallService>);
    method public android.telecomm.CallServiceDescriptor.Builder setConnectionService(java.lang.Class<? extends android.telecomm.ConnectionService>);
    method public android.telecomm.CallServiceDescriptor.Builder setNetworkType(int);
  }
@@ -27654,7 +27633,6 @@ package android.telecomm {
    method protected void onAbort();
    method protected void onAnswer();
    method protected void onChildrenChanged(java.util.List<android.telecomm.Connection>);
    method protected void onConference();
    method protected void onDisconnect();
    method protected void onHold();
    method protected void onPhoneAccountClicked();
@@ -27705,12 +27683,13 @@ package android.telecomm {
    field public static final android.os.Parcelable.Creator CREATOR;
  }
  public abstract class ConnectionService extends android.telecomm.CallService {
  public abstract class ConnectionService extends android.app.Service {
    ctor public ConnectionService();
    method public final void createRemoteOutgoingConnection(android.telecomm.ConnectionRequest, android.telecomm.ConnectionService.OutgoingCallResponse<android.telecomm.RemoteConnection>);
    method public final java.util.Collection<android.telecomm.Connection> getAllConnections();
    method public final void lookupRemoteAccounts(android.net.Uri, android.telecomm.SimpleResponse<android.net.Uri, java.util.List<android.telecomm.PhoneAccount>>);
    method public final void maybeRespondToAccountLookup();
    method public final android.os.IBinder onBind(android.content.Intent);
    method protected void onConnectionAdded(android.telecomm.Connection);
    method protected void onConnectionRemoved(android.telecomm.Connection);
    method protected void onCreateConferenceConnection(java.lang.String, android.telecomm.Connection, android.telecomm.Response<java.lang.String, android.telecomm.Connection>);
@@ -27828,6 +27807,7 @@ package android.telecomm {
    method public void disconnect();
    method public int getDisconnectCause();
    method public java.lang.String getDisconnectMessage();
    method public int getFeatures();
    method public int getState();
    method public void hold();
    method public void playDtmf(char);
@@ -27842,6 +27822,7 @@ package android.telecomm {
  public static abstract interface RemoteConnection.Listener {
    method public abstract void onDestroyed(android.telecomm.RemoteConnection);
    method public abstract void onDisconnected(android.telecomm.RemoteConnection, int, java.lang.String);
    method public abstract void onFeaturesChanged(android.telecomm.RemoteConnection, int);
    method public abstract void onPostDialWait(android.telecomm.RemoteConnection, java.lang.String);
    method public abstract void onRequestingRingback(android.telecomm.RemoteConnection, boolean);
    method public abstract void onStateChanged(android.telecomm.RemoteConnection, int);
@@ -27859,14 +27840,15 @@ package android.telecomm {
  public final class TelecommConstants {
    ctor public TelecommConstants();
    field public static final java.lang.String ACTION_CALL_SERVICE;
    field public static final java.lang.String ACTION_CALL_SERVICE_PROVIDER;
    field public static final java.lang.String ACTION_CONNECTION_SERVICE;
    field public static final java.lang.String ACTION_INCOMING_CALL = "android.intent.action.INCOMING_CALL";
    field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
    field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
    field public static final java.lang.String EXTRA_CALL_SERVICE_DESCRIPTOR = "android.intent.extra.CALL_SERVICE_DESCRIPTOR";
    field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
    field public static final java.lang.String EXTRA_INCOMING_CALL_EXTRAS = "android.intent.extra.INCOMING_CALL_EXTRAS";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO = "android.intent.extra.START_CALL_WITH_VIDEO";
+0 −19
Original line number Diff line number Diff line
/*
 * Copyright 2013, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.telecomm;

parcelable CallInfo;
+0 −213
Original line number Diff line number Diff line
/*
 * Copyright 2013, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.telecomm;

import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * A parcelable holder class of Call information data. This class is intended for transferring call
 * information from Telecomm to call services and thus is read-only.
 * TODO(santoscordon): Need final public-facing comments in this file.
 */
public final class CallInfo implements Parcelable {

    /**
     * Unique identifier for the call.
     */
    private final String mId;

    /**
     * The state of the call.
     */
    private final CallState mState;

    /**
     * Endpoint to which the call is connected.
     * This could be the dialed value for outgoing calls or the caller id of incoming calls.
     */
    private final Uri mHandle;

    /**
     * Gateway information for the call.
     */
    private final GatewayInfo mGatewayInfo;

    /**
     * Account information for the call.
     */
    private final PhoneAccount mAccount;

    /**
     * Additional information that can be persisted.
     */
    private final Bundle mExtras;

    /** The descriptor for the call service currently routing this call. */
    private final CallServiceDescriptor mCurrentCallServiceDescriptor;

    public CallInfo(String id, CallState state, Uri handle) {
        this(id, state, handle, null, null, Bundle.EMPTY, null);
    }

    /**
     * Persists handle of the other party of this call.
     *
     * @param id The unique ID of the call.
     * @param state The state of the call.
     * @param handle The handle to the other party in this call.
     * @param gatewayInfo Gateway information pertaining to this call.
     * @param account Account information pertaining to this call.
     * @param extras Additional information that can be persisted.
     * @param currentCallServiceDescriptor The descriptor for the call service currently routing
     *         this call.
     *
     * @hide
     */
    public CallInfo(
            String id,
            CallState state,
            Uri handle,
            GatewayInfo gatewayInfo,
            PhoneAccount account,
            Bundle extras,
            CallServiceDescriptor currentCallServiceDescriptor) {
        mId = id;
        mState = state;
        mHandle = handle;
        mGatewayInfo = gatewayInfo;
        mAccount = account;
        mExtras = extras;
        mCurrentCallServiceDescriptor = currentCallServiceDescriptor;
    }

    public String getId() {
        return mId;
    }

    public CallState getState() {
        return mState;
    }

    public Uri getHandle() {
        return mHandle;
    }

    /**
     * @return The actual handle this call is associated with. This is used by call services to
     * correctly indicate in their UI what handle the user is actually calling, and by other
     * telecomm components that require the user-dialed handle to function.
     */
    public Uri getOriginalHandle() {
        if (mGatewayInfo != null) {
            return mGatewayInfo.getOriginalHandle();
        }
        return getHandle();
    }

    public GatewayInfo getGatewayInfo() {
        return mGatewayInfo;
    }

    public PhoneAccount getAccount() {
        return mAccount;
    }

    public Bundle getExtras() {
        return mExtras;
    }

    public CallServiceDescriptor getCurrentCallServiceDescriptor() {
        return mCurrentCallServiceDescriptor;
    }

    /**
     * Responsible for creating CallInfo objects for deserialized Parcels.
     */
    public static final Parcelable.Creator<CallInfo> CREATOR = new Parcelable.Creator<CallInfo> () {
        @Override
        public CallInfo createFromParcel(Parcel source) {
            String id = source.readString();
            CallState state = CallState.valueOf(source.readString());
            Uri handle = Uri.CREATOR.createFromParcel(source);

            GatewayInfo gatewayInfo = readProviderInfoIfExists(source, GatewayInfo.CREATOR);
            PhoneAccount account = readProviderInfoIfExists(source, PhoneAccount.CREATOR);

            ClassLoader classLoader = CallInfo.class.getClassLoader();
            Bundle extras = source.readParcelable(classLoader);
            CallServiceDescriptor descriptor = source.readParcelable(classLoader);
            return new CallInfo(id, state, handle, gatewayInfo, account, extras, descriptor);
        }

        @Override
        public CallInfo[] newArray(int size) {
            return new CallInfo[size];
        }
    };

    /**
     * {@inheritDoc}
     */
    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * Writes CallInfo object into a serializeable Parcel.
     */
    @Override
    public void writeToParcel(Parcel destination, int flags) {
        destination.writeString(mId);
        destination.writeString(mState.name());
        mHandle.writeToParcel(destination, 0);

        writeProviderInfoIfExists(destination, mGatewayInfo);
        writeProviderInfoIfExists(destination, mAccount);

        destination.writeParcelable(mExtras, 0);
        destination.writeParcelable(mCurrentCallServiceDescriptor, 0);
    }

    /**
     * Helper function to write provider information (either GatewayInfo or Account) to
     * parcel. Will write a false byte if the information does not exist.
     */
    private void writeProviderInfoIfExists(Parcel destination, Parcelable provider) {
        if (provider != null) {
            destination.writeByte((byte) 1);
            provider.writeToParcel(destination, 0);
        } else {
            destination.writeByte((byte) 0);
        }
    }

    /**
     * Helper function to read provider information (either GatewayInfo or Account) from
     * parcel.
     */
    private static <T> T readProviderInfoIfExists(Parcel source,
            Parcelable.Creator<T> creator) {
        if (source.readByte() != 0) {
            return creator.createFromParcel(source);
        }
        return null;
    }
}
Loading