Merge "Add support for opening JAR/ZIP files via FD."
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 073196c..59edadc 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -786,19 +786,13 @@
public boolean enableBLE() {
if (!isBleScanAlwaysAvailable()) return false;
- if (isLeEnabled() == true) {
- if (DBG) Log.d(TAG, "enableBLE(): BT is already enabled..!");
- try {
- mManagerService.updateBleAppCount(mToken, true);
- } catch (RemoteException e) {
- Log.e(TAG, "", e);
- }
- return true;
- }
-
try {
- if (DBG) Log.d(TAG, "Calling enableBLE");
mManagerService.updateBleAppCount(mToken, true);
+ if (isLeEnabled()) {
+ if (DBG) Log.d(TAG, "enableBLE(): Bluetooth already enabled");
+ return true;
+ }
+ if (DBG) Log.d(TAG, "enableBLE(): Calling enable");
return mManagerService.enable(ActivityThread.currentPackageName());
} catch (RemoteException e) {
Log.e(TAG, "", e);
@@ -1519,6 +1513,36 @@
}
/**
+ * Gets the currently supported profiles by the adapter.
+ *
+ *<p> This can be used to check whether a profile is supported before attempting
+ * to connect to its respective proxy.
+ *
+ * @return a list of integers indicating the ids of supported profiles as defined in
+ * {@link BluetoothProfile}.
+ * @hide
+ */
+ public List<Integer> getSupportedProfiles() {
+ final ArrayList<Integer> supportedProfiles = new ArrayList<Integer>();
+
+ try {
+ synchronized (mManagerCallback) {
+ if (mService != null) {
+ final long supportedProfilesBitMask = mService.getSupportedProfiles();
+
+ for (int i = 0; i <= BluetoothProfile.MAX_PROFILE_ID; i++) {
+ if ((supportedProfilesBitMask & (1 << i)) != 0) {
+ supportedProfiles.add(i);
+ }
+ }
+ }
+ }
+ } catch (RemoteException e) {Log.e(TAG, "getSupportedProfiles:", e);}
+
+ return supportedProfiles;
+ }
+
+ /**
* Get the current connection state of the local Bluetooth adapter.
* This can be used to check whether the local Bluetooth adapter is connected
* to any profile of any other remote Bluetooth Device.
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index eee66d1..20d95cc 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -137,6 +137,13 @@
public static final int PBAP_CLIENT = 17;
/**
+ * Max profile ID. This value should be updated whenever a new profile is added to match
+ * the largest value assigned to a profile.
+ * @hide
+ */
+ public static final int MAX_PROFILE_ID = 17;
+
+ /**
* Default priority for devices that we try to auto-connect to and
* and allow incoming connections for the profile
* @hide
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index 8c98536..96a1ae8 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -63,6 +63,7 @@
boolean removeBond(in BluetoothDevice device);
int getBondState(in BluetoothDevice device);
boolean isBondingInitiatedLocally(in BluetoothDevice device);
+ long getSupportedProfiles();
int getConnectionState(in BluetoothDevice device);
String getRemoteName(in BluetoothDevice device);
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 25cc961..eaf56ac 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7936,6 +7936,9 @@
/** {@hide} */
public static final String
BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_";
+ /** {@hide} */
+ public static final String
+ BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_";
/**
* Device Idle (Doze) specific settings.
@@ -8113,6 +8116,14 @@
}
/**
+ * Get the key that retrieves a bluetooth pan client priority.
+ * @hide
+ */
+ public static final String getBluetoothPanPriorityKey(String address) {
+ return BLUETOOTH_PAN_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
+ }
+
+ /**
* Get the key that retrieves a bluetooth map priority.
* @hide
*/
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 1c307c9..9979b84 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -258,7 +258,7 @@
continue;
}
- Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadClass " + line);
+ Trace.traceBegin(Trace.TRACE_TAG_DALVIK, line);
try {
if (false) {
Log.v(TAG, "Preloading " + line + "...");
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 0201111..a8be8d3 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1290,6 +1290,9 @@
<!-- Whether supported profiles should be reloaded upon enabling bluetooth -->
<bool name="config_bluetooth_reload_supported_profiles_when_enabled">false</bool>
+ <!-- Enabling autoconnect over pan -->
+ <bool name="config_bluetooth_pan_enable_autoconnect">false</bool>
+
<!-- The default data-use polling period. -->
<integer name="config_datause_polling_period_sec">600</integer>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2345885..6f2822b 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -364,6 +364,7 @@
<java-symbol type="integer" name="config_bluetooth_rx_cur_ma" />
<java-symbol type="integer" name="config_bluetooth_tx_cur_ma" />
<java-symbol type="integer" name="config_bluetooth_operating_voltage_mv" />
+ <java-symbol type="bool" name="config_bluetooth_pan_enable_autoconnect" />
<java-symbol type="bool" name="config_bluetooth_reload_supported_profiles_when_enabled" />
<java-symbol type="integer" name="config_cursorWindowSize" />
<java-symbol type="integer" name="config_drawLockTimeoutMillis" />
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 7875cb8..2a5b194 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -221,6 +221,7 @@
mBluetoothLock.readLock().lock();
if (mBluetooth != null) {
mBluetooth.onBrEdrDown();
+ mEnable = false;
mEnableExternal = false;
}
} catch (RemoteException e) {
@@ -436,14 +437,16 @@
class ClientDeathRecipient implements IBinder.DeathRecipient {
public void binderDied() {
- if (DBG) Slog.d(TAG, "Binder is dead - unregister Ble App");
+ if (DBG) Slog.d(TAG, "Binder is dead - unregister Ble App");
if (mBleAppCount > 0) --mBleAppCount;
if (mBleAppCount == 0) {
if (DBG) Slog.d(TAG, "Disabling LE only mode after application crash");
try {
mBluetoothLock.readLock().lock();
- if (mBluetooth != null) {
+ if (mBluetooth != null &&
+ mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
+ mEnable = false;
mBluetooth.onBrEdrDown();
}
} catch (RemoteException e) {
@@ -460,6 +463,9 @@
@Override
public boolean isBleScanAlwaysAvailable() {
+ if (isAirplaneModeOn() && !mEnable) {
+ return false;
+ }
try {
return (Settings.Global.getInt(mContentResolver,
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE)) != 0;
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 4d7c304..66d704b 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -26,6 +26,7 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
+import android.telecom.Logging.Session;
import com.android.internal.os.SomeArgs;
import com.android.internal.telecom.IConnectionService;
@@ -83,6 +84,32 @@
// Flag controlling whether PII is emitted into the logs
private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG);
+ // Session Definitions
+ private static final String SESSION_HANDLER = "H.";
+ private static final String SESSION_ADD_CS_ADAPTER = "CS.aCSA";
+ private static final String SESSION_REMOVE_CS_ADAPTER = "CS.rCSA";
+ private static final String SESSION_CREATE_CONN = "CS.crCo";
+ private static final String SESSION_ABORT = "CS.ab";
+ private static final String SESSION_ANSWER = "CS.an";
+ private static final String SESSION_ANSWER_VIDEO = "CS.anV";
+ private static final String SESSION_REJECT = "CS.r";
+ private static final String SESSION_REJECT_MESSAGE = "CS.rWM";
+ private static final String SESSION_SILENCE = "CS.s";
+ private static final String SESSION_DISCONNECT = "CS.d";
+ private static final String SESSION_HOLD = "CS.h";
+ private static final String SESSION_UNHOLD = "CS.u";
+ private static final String SESSION_CALL_AUDIO_SC = "CS.cASC";
+ private static final String SESSION_PLAY_DTMF = "CS.pDT";
+ private static final String SESSION_STOP_DTMF = "CS.sDT";
+ private static final String SESSION_CONFERENCE = "CS.c";
+ private static final String SESSION_SPLIT_CONFERENCE = "CS.sFC";
+ private static final String SESSION_MERGE_CONFERENCE = "CS.mC";
+ private static final String SESSION_SWAP_CONFERENCE = "CS.sC";
+ private static final String SESSION_POST_DIAL_CONT = "CS.oPDC";
+ private static final String SESSION_PULL_EXTERNAL_CALL = "CS.pEC";
+ private static final String SESSION_SEND_CALL_EVENT = "CS.sCE";
+ private static final String SESSION_EXTRAS_CHANGED = "CS.oEC";
+
private static final int MSG_ADD_CONNECTION_SERVICE_ADAPTER = 1;
private static final int MSG_CREATE_CONNECTION = 2;
private static final int MSG_ABORT = 3;
@@ -125,12 +152,30 @@
private final IBinder mBinder = new IConnectionService.Stub() {
@Override
- public void addConnectionServiceAdapter(IConnectionServiceAdapter adapter) {
- mHandler.obtainMessage(MSG_ADD_CONNECTION_SERVICE_ADAPTER, adapter).sendToTarget();
+ public void addConnectionServiceAdapter(IConnectionServiceAdapter adapter,
+ Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_ADD_CS_ADAPTER);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = adapter;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_ADD_CONNECTION_SERVICE_ADAPTER, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
- public void removeConnectionServiceAdapter(IConnectionServiceAdapter adapter) {
- mHandler.obtainMessage(MSG_REMOVE_CONNECTION_SERVICE_ADAPTER, adapter).sendToTarget();
+ public void removeConnectionServiceAdapter(IConnectionServiceAdapter adapter,
+ Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_REMOVE_CS_ADAPTER);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = adapter;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_REMOVE_CONNECTION_SERVICE_ADAPTER, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
@@ -139,136 +184,292 @@
String id,
ConnectionRequest request,
boolean isIncoming,
- boolean isUnknown) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = connectionManagerPhoneAccount;
- args.arg2 = id;
- args.arg3 = request;
- args.argi1 = isIncoming ? 1 : 0;
- args.argi2 = isUnknown ? 1 : 0;
- mHandler.obtainMessage(MSG_CREATE_CONNECTION, args).sendToTarget();
+ boolean isUnknown,
+ Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_CREATE_CONN);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = connectionManagerPhoneAccount;
+ args.arg2 = id;
+ args.arg3 = request;
+ args.arg4 = Log.createSubsession();
+ args.argi1 = isIncoming ? 1 : 0;
+ args.argi2 = isUnknown ? 1 : 0;
+ mHandler.obtainMessage(MSG_CREATE_CONNECTION, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void abort(String callId) {
- mHandler.obtainMessage(MSG_ABORT, callId).sendToTarget();
+ public void abort(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_ABORT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_ABORT, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void answerVideo(String callId, int videoState) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.argi1 = videoState;
- mHandler.obtainMessage(MSG_ANSWER_VIDEO, args).sendToTarget();
+ public void answerVideo(String callId, int videoState, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_ANSWER_VIDEO);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ args.argi1 = videoState;
+ mHandler.obtainMessage(MSG_ANSWER_VIDEO, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void answer(String callId) {
- mHandler.obtainMessage(MSG_ANSWER, callId).sendToTarget();
+ public void answer(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_ANSWER);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_ANSWER, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void reject(String callId) {
- mHandler.obtainMessage(MSG_REJECT, callId).sendToTarget();
+ public void reject(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_REJECT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_REJECT, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void rejectWithMessage(String callId, String message) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.arg2 = message;
- mHandler.obtainMessage(MSG_REJECT_WITH_MESSAGE, args).sendToTarget();
+ public void rejectWithMessage(String callId, String message, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_REJECT_MESSAGE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = message;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_REJECT_WITH_MESSAGE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void silence(String callId) {
- mHandler.obtainMessage(MSG_SILENCE, callId).sendToTarget();
+ public void silence(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_SILENCE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_SILENCE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void disconnect(String callId) {
- mHandler.obtainMessage(MSG_DISCONNECT, callId).sendToTarget();
+ public void disconnect(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_DISCONNECT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_DISCONNECT, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void hold(String callId) {
- mHandler.obtainMessage(MSG_HOLD, callId).sendToTarget();
+ public void hold(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_HOLD);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_HOLD, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void unhold(String callId) {
- mHandler.obtainMessage(MSG_UNHOLD, callId).sendToTarget();
+ public void unhold(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_UNHOLD);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_UNHOLD, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void onCallAudioStateChanged(String callId, CallAudioState callAudioState) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.arg2 = callAudioState;
- mHandler.obtainMessage(MSG_ON_CALL_AUDIO_STATE_CHANGED, args).sendToTarget();
+ public void onCallAudioStateChanged(String callId, CallAudioState callAudioState,
+ Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_CALL_AUDIO_SC);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = callAudioState;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_ON_CALL_AUDIO_STATE_CHANGED, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void playDtmfTone(String callId, char digit) {
- mHandler.obtainMessage(MSG_PLAY_DTMF_TONE, digit, 0, callId).sendToTarget();
+ public void playDtmfTone(String callId, char digit, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_PLAY_DTMF);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = digit;
+ args.arg2 = callId;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_PLAY_DTMF_TONE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void stopDtmfTone(String callId) {
- mHandler.obtainMessage(MSG_STOP_DTMF_TONE, callId).sendToTarget();
+ public void stopDtmfTone(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_STOP_DTMF);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_STOP_DTMF_TONE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void conference(String callId1, String callId2) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId1;
- args.arg2 = callId2;
- mHandler.obtainMessage(MSG_CONFERENCE, args).sendToTarget();
+ public void conference(String callId1, String callId2, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_CONFERENCE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId1;
+ args.arg2 = callId2;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_CONFERENCE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void splitFromConference(String callId) {
- mHandler.obtainMessage(MSG_SPLIT_FROM_CONFERENCE, callId).sendToTarget();
+ public void splitFromConference(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_SPLIT_CONFERENCE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_SPLIT_FROM_CONFERENCE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void mergeConference(String callId) {
- mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget();
+ public void mergeConference(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_MERGE_CONFERENCE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_MERGE_CONFERENCE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void swapConference(String callId) {
- mHandler.obtainMessage(MSG_SWAP_CONFERENCE, callId).sendToTarget();
+ public void swapConference(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_SWAP_CONFERENCE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_SWAP_CONFERENCE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void onPostDialContinue(String callId, boolean proceed) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.argi1 = proceed ? 1 : 0;
- mHandler.obtainMessage(MSG_ON_POST_DIAL_CONTINUE, args).sendToTarget();
+ public void onPostDialContinue(String callId, boolean proceed, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_POST_DIAL_CONT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ args.argi1 = proceed ? 1 : 0;
+ mHandler.obtainMessage(MSG_ON_POST_DIAL_CONTINUE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void pullExternalCall(String callId) {
- mHandler.obtainMessage(MSG_PULL_EXTERNAL_CALL, callId).sendToTarget();
+ public void pullExternalCall(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_PULL_EXTERNAL_CALL);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_PULL_EXTERNAL_CALL, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void sendCallEvent(String callId, String event, Bundle extras) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.arg2 = event;
- args.arg3 = extras;
- mHandler.obtainMessage(MSG_SEND_CALL_EVENT, args).sendToTarget();
+ public void sendCallEvent(String callId, String event, Bundle extras,
+ Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_SEND_CALL_EVENT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = event;
+ args.arg3 = extras;
+ args.arg4 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_SEND_CALL_EVENT, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
@Override
- public void onExtrasChanged(String callId, Bundle extras) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.arg2 = extras;
- mHandler.obtainMessage(MSG_ON_EXTRAS_CHANGED, args).sendToTarget();
+ public void onExtrasChanged(String callId, Bundle extras, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_EXTRAS_CHANGED);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = extras;
+ args.arg3 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_ON_EXTRAS_CHANGED, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
}
};
@@ -276,15 +477,35 @@
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
- case MSG_ADD_CONNECTION_SERVICE_ADAPTER:
- mAdapter.addAdapter((IConnectionServiceAdapter) msg.obj);
- onAdapterAttached();
+ case MSG_ADD_CONNECTION_SERVICE_ADAPTER: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ IConnectionServiceAdapter adapter = (IConnectionServiceAdapter) args.arg1;
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_ADD_CS_ADAPTER);
+ mAdapter.addAdapter(adapter);
+ onAdapterAttached();
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_REMOVE_CONNECTION_SERVICE_ADAPTER:
- mAdapter.removeAdapter((IConnectionServiceAdapter) msg.obj);
+ }
+ case MSG_REMOVE_CONNECTION_SERVICE_ADAPTER: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_REMOVE_CS_ADAPTER);
+ mAdapter.removeAdapter((IConnectionServiceAdapter) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_CREATE_CONNECTION: {
SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg4, SESSION_HANDLER + SESSION_CREATE_CONN);
try {
final PhoneAccountHandle connectionManagerPhoneAccount =
(PhoneAccountHandle) args.arg1;
@@ -315,122 +536,253 @@
}
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
- case MSG_ABORT:
- abort((String) msg.obj);
+ case MSG_ABORT: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_ABORT);
+ try {
+ abort((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_ANSWER:
- answer((String) msg.obj);
+ }
+ case MSG_ANSWER: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_ANSWER);
+ try {
+ answer((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_ANSWER_VIDEO: {
SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_ANSWER_VIDEO);
try {
String callId = (String) args.arg1;
int videoState = args.argi1;
answerVideo(callId, videoState);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
- case MSG_REJECT:
- reject((String) msg.obj);
+ case MSG_REJECT: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_REJECT);
+ try {
+ reject((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_REJECT_WITH_MESSAGE: {
SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg3,
+ SESSION_HANDLER + SESSION_REJECT_MESSAGE);
try {
reject((String) args.arg1, (String) args.arg2);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
- case MSG_DISCONNECT:
- disconnect((String) msg.obj);
+ case MSG_DISCONNECT: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_DISCONNECT);
+ try {
+ disconnect((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_SILENCE:
- silence((String) msg.obj);
+ }
+ case MSG_SILENCE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_SILENCE);
+ try {
+ silence((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_HOLD:
- hold((String) msg.obj);
+ }
+ case MSG_HOLD: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_REJECT);
+ try {
+ hold((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_UNHOLD:
- unhold((String) msg.obj);
+ }
+ case MSG_UNHOLD: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_UNHOLD);
+ try {
+ unhold((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_ON_CALL_AUDIO_STATE_CHANGED: {
SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg3,
+ SESSION_HANDLER + SESSION_CALL_AUDIO_SC);
try {
String callId = (String) args.arg1;
CallAudioState audioState = (CallAudioState) args.arg2;
onCallAudioStateChanged(callId, new CallAudioState(audioState));
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
- case MSG_PLAY_DTMF_TONE:
- playDtmfTone((String) msg.obj, (char) msg.arg1);
+ case MSG_PLAY_DTMF_TONE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg3,
+ SESSION_HANDLER + SESSION_PLAY_DTMF);
+ playDtmfTone((String) args.arg2, (char) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_STOP_DTMF_TONE:
- stopDtmfTone((String) msg.obj);
+ }
+ case MSG_STOP_DTMF_TONE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_STOP_DTMF);
+ stopDtmfTone((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_CONFERENCE: {
SomeArgs args = (SomeArgs) msg.obj;
try {
+ Log.continueSession((Session) args.arg3,
+ SESSION_HANDLER + SESSION_CONFERENCE);
String callId1 = (String) args.arg1;
String callId2 = (String) args.arg2;
conference(callId1, callId2);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
- case MSG_SPLIT_FROM_CONFERENCE:
- splitFromConference((String) msg.obj);
+ case MSG_SPLIT_FROM_CONFERENCE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_SPLIT_CONFERENCE);
+ splitFromConference((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_MERGE_CONFERENCE:
- mergeConference((String) msg.obj);
+ }
+ case MSG_MERGE_CONFERENCE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_MERGE_CONFERENCE);
+ mergeConference((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
- case MSG_SWAP_CONFERENCE:
- swapConference((String) msg.obj);
+ }
+ case MSG_SWAP_CONFERENCE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_SWAP_CONFERENCE);
+ swapConference((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
+ }
case MSG_ON_POST_DIAL_CONTINUE: {
SomeArgs args = (SomeArgs) msg.obj;
try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_POST_DIAL_CONT);
String callId = (String) args.arg1;
boolean proceed = (args.argi1 == 1);
onPostDialContinue(callId, proceed);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
case MSG_PULL_EXTERNAL_CALL: {
- pullExternalCall((String) msg.obj);
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_PULL_EXTERNAL_CALL);
+ pullExternalCall((String) args.arg1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
break;
}
case MSG_SEND_CALL_EVENT: {
SomeArgs args = (SomeArgs) msg.obj;
try {
+ Log.continueSession((Session) args.arg4,
+ SESSION_HANDLER + SESSION_SEND_CALL_EVENT);
String callId = (String) args.arg1;
String event = (String) args.arg2;
Bundle extras = (Bundle) args.arg3;
sendCallEvent(callId, event, extras);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
case MSG_ON_EXTRAS_CHANGED: {
SomeArgs args = (SomeArgs) msg.obj;
try {
+ Log.continueSession((Session) args.arg3,
+ SESSION_HANDLER + SESSION_EXTRAS_CHANGED);
String callId = (String) args.arg1;
Bundle extras = (Bundle) args.arg2;
handleExtrasChanged(callId, extras);
} finally {
args.recycle();
+ Log.endSession();
}
break;
}
@@ -695,7 +1047,7 @@
mAdapter.putExtras(id, extras);
}
}
-
+
public void onExtrasRemoved(Connection c, List<String> keys) {
String id = mIdByConnection.get(c);
if (id != null) {
@@ -1271,15 +1623,11 @@
* call created using
* {@code TelecomManager#addNewIncomingCall(PhoneAccountHandle, android.os.Bundle)}.
*
- * @param connectionManagerPhoneAccount
- * @param request
- * @return
- *
* @hide
*/
public Connection onCreateUnknownConnection(PhoneAccountHandle connectionManagerPhoneAccount,
ConnectionRequest request) {
- return null;
+ return null;
}
/**
@@ -1492,7 +1840,7 @@
* @return The call ID.
*/
private int getNextCallId() {
- synchronized(mIdSyncRoot) {
+ synchronized (mIdSyncRoot) {
return ++mId;
}
}
diff --git a/telecomm/java/android/telecom/Log.java b/telecomm/java/android/telecom/Log.java
index 1e5769f..446bbbb 100644
--- a/telecomm/java/android/telecom/Log.java
+++ b/telecomm/java/android/telecom/Log.java
@@ -184,6 +184,10 @@
getSessionManager().startSession(shortMethodName, null);
}
+ public static void startSession(Session.Info info, String shortMethodName) {
+ getSessionManager().startSession(info, shortMethodName, null);
+ }
+
public static void startSession(String shortMethodName, String callerIdentification) {
getSessionManager().startSession(shortMethodName, callerIdentification);
}
@@ -193,14 +197,14 @@
getSessionManager().startSession(info, shortMethodName, callerIdentification);
}
- public static void startExternalSession(Session.Info sessionInfo, String shortMethodName) {
- getSessionManager().startExternalSession(sessionInfo, shortMethodName);
- }
-
public static Session createSubsession() {
return getSessionManager().createSubsession();
}
+ public static Session.Info getExternalSession() {
+ return getSessionManager().getExternalSession();
+ }
+
public static void cancelSubsession(Session subsession) {
getSessionManager().cancelSubsession(subsession);
}
diff --git a/telecomm/java/android/telecom/Logging/Session.aidl b/telecomm/java/android/telecom/Logging/Session.aidl
new file mode 100644
index 0000000..68961b6
--- /dev/null
+++ b/telecomm/java/android/telecom/Logging/Session.aidl
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2016 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.telecom.Logging;
+
+/**
+ * {@hide}
+ */
+parcelable Session.Info;
\ No newline at end of file
diff --git a/telecomm/java/android/telecom/Logging/Session.java b/telecomm/java/android/telecom/Logging/Session.java
index 093c0f9..3a7b8c0 100644
--- a/telecomm/java/android/telecom/Logging/Session.java
+++ b/telecomm/java/android/telecom/Logging/Session.java
@@ -281,7 +281,15 @@
parentSession.getFullMethodPath(sb);
sb.append(SUBSESSION_SEPARATION_CHAR);
}
- sb.append(mShortMethodName);
+ // Encapsulate the external session's method name so it is obvious what part of the session
+ // is external.
+ if (isExternal()) {
+ sb.append("(");
+ sb.append(mShortMethodName);
+ sb.append(")");
+ } else {
+ sb.append(mShortMethodName);
+ }
if(isSessionStarted) {
// Cache this value so that we do not have to do this work next time!
diff --git a/telecomm/java/android/telecom/Logging/SessionManager.java b/telecomm/java/android/telecom/Logging/SessionManager.java
index 173e7ee..8ced7f81 100644
--- a/telecomm/java/android/telecom/Logging/SessionManager.java
+++ b/telecomm/java/android/telecom/Logging/SessionManager.java
@@ -229,6 +229,23 @@
}
/**
+ * Retrieve the information of the currently active Session. This information is parcelable and
+ * is used to create an external Session ({@link #startExternalSession(Session.Info, String)}).
+ * If there is no Session active, this method will return null.
+ */
+ public synchronized Session.Info getExternalSession() {
+ int threadId = getCallingThreadId();
+ Session threadSession = mSessionMapper.get(threadId);
+ if (threadSession == null) {
+ Log.d(LOGGING_TAG, "Log.getExternalSession was called with no session " +
+ "active.");
+ return null;
+ }
+
+ return threadSession.getInfo();
+ }
+
+ /**
* Cancels a subsession that had Log.createSubsession() called on it, but will never have
* Log.continueSession(...) called on it due to an error. Allows the subsession to be cleaned
* gracefully instead of being removed by the mSessionCleanupHandler forcefully later.
diff --git a/telecomm/java/android/telecom/RemoteConference.java b/telecomm/java/android/telecom/RemoteConference.java
index bf6038a..6e63621 100644
--- a/telecomm/java/android/telecom/RemoteConference.java
+++ b/telecomm/java/android/telecom/RemoteConference.java
@@ -397,7 +397,7 @@
*/
public void disconnect() {
try {
- mConnectionService.disconnect(mId);
+ mConnectionService.disconnect(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -412,7 +412,7 @@
public void separate(RemoteConnection connection) {
if (mChildConnections.contains(connection)) {
try {
- mConnectionService.splitFromConference(connection.getId());
+ mConnectionService.splitFromConference(connection.getId(), null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -430,7 +430,7 @@
*/
public void merge() {
try {
- mConnectionService.mergeConference(mId);
+ mConnectionService.mergeConference(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -446,7 +446,7 @@
*/
public void swap() {
try {
- mConnectionService.swapConference(mId);
+ mConnectionService.swapConference(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -456,7 +456,7 @@
*/
public void hold() {
try {
- mConnectionService.hold(mId);
+ mConnectionService.hold(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -466,7 +466,7 @@
*/
public void unhold() {
try {
- mConnectionService.unhold(mId);
+ mConnectionService.unhold(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -489,7 +489,7 @@
*/
public void playDtmfTone(char digit) {
try {
- mConnectionService.playDtmfTone(mId, digit);
+ mConnectionService.playDtmfTone(mId, digit, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -501,7 +501,7 @@
*/
public void stopDtmfTone() {
try {
- mConnectionService.stopDtmfTone(mId);
+ mConnectionService.stopDtmfTone(mId, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
@@ -526,7 +526,7 @@
*/
public void setCallAudioState(CallAudioState state) {
try {
- mConnectionService.onCallAudioStateChanged(mId, state);
+ mConnectionService.onCallAudioStateChanged(mId, state, null /*Session.Info*/);
} catch (RemoteException e) {
}
}
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java
index 8e06659db..af61f77 100644
--- a/telecomm/java/android/telecom/RemoteConnection.java
+++ b/telecomm/java/android/telecom/RemoteConnection.java
@@ -845,7 +845,7 @@
public void abort() {
try {
if (mConnected) {
- mConnectionService.abort(mConnectionId);
+ mConnectionService.abort(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -857,7 +857,7 @@
public void answer() {
try {
if (mConnected) {
- mConnectionService.answer(mConnectionId);
+ mConnectionService.answer(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -871,7 +871,7 @@
public void answer(int videoState) {
try {
if (mConnected) {
- mConnectionService.answerVideo(mConnectionId, videoState);
+ mConnectionService.answerVideo(mConnectionId, videoState, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -883,7 +883,7 @@
public void reject() {
try {
if (mConnected) {
- mConnectionService.reject(mConnectionId);
+ mConnectionService.reject(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -895,7 +895,7 @@
public void hold() {
try {
if (mConnected) {
- mConnectionService.hold(mConnectionId);
+ mConnectionService.hold(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -907,7 +907,7 @@
public void unhold() {
try {
if (mConnected) {
- mConnectionService.unhold(mConnectionId);
+ mConnectionService.unhold(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -919,7 +919,7 @@
public void disconnect() {
try {
if (mConnected) {
- mConnectionService.disconnect(mConnectionId);
+ mConnectionService.disconnect(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -937,7 +937,7 @@
public void playDtmfTone(char digit) {
try {
if (mConnected) {
- mConnectionService.playDtmfTone(mConnectionId, digit);
+ mConnectionService.playDtmfTone(mConnectionId, digit, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -953,7 +953,7 @@
public void stopDtmfTone() {
try {
if (mConnected) {
- mConnectionService.stopDtmfTone(mConnectionId);
+ mConnectionService.stopDtmfTone(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -983,7 +983,8 @@
public void postDialContinue(boolean proceed) {
try {
if (mConnected) {
- mConnectionService.onPostDialContinue(mConnectionId, proceed);
+ mConnectionService.onPostDialContinue(mConnectionId, proceed,
+ null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -998,7 +999,7 @@
public void pullExternalCall() {
try {
if (mConnected) {
- mConnectionService.pullExternalCall(mConnectionId);
+ mConnectionService.pullExternalCall(mConnectionId, null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
@@ -1025,7 +1026,8 @@
public void setCallAudioState(CallAudioState state) {
try {
if (mConnected) {
- mConnectionService.onCallAudioStateChanged(mConnectionId, state);
+ mConnectionService.onCallAudioStateChanged(mConnectionId, state,
+ null /*Session.Info*/);
}
} catch (RemoteException ignored) {
}
diff --git a/telecomm/java/android/telecom/RemoteConnectionManager.java b/telecomm/java/android/telecom/RemoteConnectionManager.java
index 0366509..0322218 100644
--- a/telecomm/java/android/telecom/RemoteConnectionManager.java
+++ b/telecomm/java/android/telecom/RemoteConnectionManager.java
@@ -76,7 +76,7 @@
public void conferenceRemoteConnections(RemoteConnection a, RemoteConnection b) {
if (a.getConnectionService() == b.getConnectionService()) {
try {
- a.getConnectionService().conference(a.getId(), b.getId());
+ a.getConnectionService().conference(a.getId(), b.getId(), null /*Session.Info*/);
} catch (RemoteException e) {
}
} else {
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index 21a7706..beb6868 100644
--- a/telecomm/java/android/telecom/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -409,7 +409,8 @@
request.getVideoState());
try {
if (mConnectionById.isEmpty()) {
- mOutgoingConnectionServiceRpc.addConnectionServiceAdapter(mServant.getStub());
+ mOutgoingConnectionServiceRpc.addConnectionServiceAdapter(mServant.getStub(),
+ null /*Session.Info*/);
}
RemoteConnection connection =
new RemoteConnection(id, mOutgoingConnectionServiceRpc, newRequest);
@@ -420,7 +421,8 @@
id,
newRequest,
isIncoming,
- false /* isUnknownCall */);
+ false /* isUnknownCall */,
+ null /*Session.info*/);
connection.registerCallback(new RemoteConnection.Callback() {
@Override
public void onDestroyed(RemoteConnection connection) {
@@ -460,7 +462,8 @@
private void maybeDisconnectAdapter() {
if (mConnectionById.isEmpty() && mConferenceById.isEmpty()) {
try {
- mOutgoingConnectionServiceRpc.removeConnectionServiceAdapter(mServant.getStub());
+ mOutgoingConnectionServiceRpc.removeConnectionServiceAdapter(mServant.getStub(),
+ null /*Session.info*/);
} catch (RemoteException e) {
}
}
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index a4c1798..8a27675 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -19,6 +19,7 @@
import android.os.Bundle;
import android.telecom.CallAudioState;
import android.telecom.ConnectionRequest;
+import android.telecom.Logging.Session;
import android.telecom.PhoneAccountHandle;
import com.android.internal.telecom.IConnectionServiceAdapter;
@@ -31,54 +32,58 @@
* @hide
*/
oneway interface IConnectionService {
- void addConnectionServiceAdapter(in IConnectionServiceAdapter adapter);
+ void addConnectionServiceAdapter(in IConnectionServiceAdapter adapter,
+ in Session.Info sessionInfo);
- void removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter);
+ void removeConnectionServiceAdapter(in IConnectionServiceAdapter adapter,
+ in Session.Info sessionInfo);
void createConnection(
in PhoneAccountHandle connectionManagerPhoneAccount,
String callId,
in ConnectionRequest request,
boolean isIncoming,
- boolean isUnknown);
+ boolean isUnknown,
+ in Session.Info sessionInfo);
- void abort(String callId);
+ void abort(String callId, in Session.Info sessionInfo);
- void answerVideo(String callId, int videoState);
+ void answerVideo(String callId, int videoState, in Session.Info sessionInfo);
- void answer(String callId);
+ void answer(String callId, in Session.Info sessionInfo);
- void reject(String callId);
+ void reject(String callId, in Session.Info sessionInfo);
- void rejectWithMessage(String callId, String message);
+ void rejectWithMessage(String callId, String message, in Session.Info sessionInfo);
- void disconnect(String callId);
+ void disconnect(String callId, in Session.Info sessionInfo);
- void silence(String callId);
+ void silence(String callId, in Session.Info sessionInfo);
- void hold(String callId);
+ void hold(String callId, in Session.Info sessionInfo);
- void unhold(String callId);
+ void unhold(String callId, in Session.Info sessionInfo);
- void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState);
+ void onCallAudioStateChanged(String activeCallId, in CallAudioState callAudioState,
+ in Session.Info sessionInfo);
- void playDtmfTone(String callId, char digit);
+ void playDtmfTone(String callId, char digit, in Session.Info sessionInfo);
- void stopDtmfTone(String callId);
+ void stopDtmfTone(String callId, in Session.Info sessionInfo);
- void conference(String conferenceCallId, String callId);
+ void conference(String conferenceCallId, String callId, in Session.Info sessionInfo);
- void splitFromConference(String callId);
+ void splitFromConference(String callId, in Session.Info sessionInfo);
- void mergeConference(String conferenceCallId);
+ void mergeConference(String conferenceCallId, in Session.Info sessionInfo);
- void swapConference(String conferenceCallId);
+ void swapConference(String conferenceCallId, in Session.Info sessionInfo);
- void onPostDialContinue(String callId, boolean proceed);
+ void onPostDialContinue(String callId, boolean proceed, in Session.Info sessionInfo);
- void pullExternalCall(String callId);
+ void pullExternalCall(String callId, in Session.Info sessionInfo);
- void sendCallEvent(String callId, String event, in Bundle extras);
+ void sendCallEvent(String callId, String event, in Bundle extras, in Session.Info sessionInfo);
- void onExtrasChanged(String callId, in Bundle extras);
+ void onExtrasChanged(String callId, in Bundle extras, in Session.Info sessionInfo);
}