Loading AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".testapps.IncomingSelfManagedCallActivity" /> <receiver android:name=".components.PrimaryCallReceiver" android:exported="true" Loading src/com/android/server/telecom/ConnectionServiceWrapper.java +3 −1 Original line number Diff line number Diff line Loading @@ -923,7 +923,9 @@ public class ConnectionServiceWrapper extends ServiceBinder { Log.piiHandle(call.getHandle())); try { logOutgoing("createConnectionFailed %s", callId); mServiceInterface.createConnectionFailed(callId, mServiceInterface.createConnectionFailed( call.getConnectionManagerPhoneAccount(), callId, new ConnectionRequest( call.getTargetPhoneAccount(), call.getHandle(), Loading src/com/android/server/telecom/InCallController.java +4 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,10 @@ public final class InCallController extends CallsManagerListenerBase { continue; } if (call.isSelfManaged() && !info.isSelfManagedCallsSupported()) { continue; } // Only send the RTT call if it's a UI in-call service boolean includeRttCall = info.equals(mInCallServiceConnection.getInfo()); Loading src/com/android/server/telecom/VideoProviderProxy.java +18 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.AppOpsManager; import android.content.Context; import android.net.Uri; import android.os.Binder; import android.os.Build; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; Loading Loading @@ -303,10 +304,12 @@ public class VideoProviderProxy extends Connection.VideoProvider { * @param callingPackage The package calling in. * @param callingUid The UID of the caller. * @param callingPid The PID of the caller. * @param targetSdkVersion The target SDK version of the calling InCallService where the camera * request originated. */ @Override public void onSetCamera(String cameraId, String callingPackage, int callingUid, int callingPid) { int callingPid, int targetSdkVersion) { synchronized (mLock) { logFromInCall("setCamera: " + cameraId + " callingPackage=" + callingPackage + "; callingUid=" + callingUid); Loading @@ -316,15 +319,24 @@ public class VideoProviderProxy extends Connection.VideoProvider { // Calling app is not permitted to use the camera. Ignore the request and send // back a call session event indicating the error. Log.i(this, "onSetCamera: camera permission denied; package=%d, uid=%d, " + "pid=%d", callingPackage, callingUid, callingPid); + "pid=%d, targetSdkVersion=%d", callingPackage, callingUid, callingPid, targetSdkVersion); // API 26 introduces a new camera permission error we can use here since the // caller supports that API version. if (targetSdkVersion > Build.VERSION_CODES.N_MR1) { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_PERMISSION_ERROR); } else { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE); } return; } } try { mConectionServiceVideoProvider.setCamera(cameraId, callingPackage); mConectionServiceVideoProvider.setCamera(cameraId, callingPackage, targetSdkVersion); } catch (RemoteException e) { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE); Loading testapps/AndroidManifest.xml +12 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,14 @@ </intent-filter> </activity> <activity android:name="com.android.server.telecom.testapps.IncomingSelfManagedCallActivity" android:label="@string/selfManagedCallingActivityLabel" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <service android:name="com.android.server.telecom.testapps.SelfManagedConnectionService" android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"> Loading @@ -180,5 +188,9 @@ <action android:name="android.telecom.ConnectionService" /> </intent-filter> </service> <receiver android:exported="false" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp" android:name="com.android.server.telecom.testapps.SelfManagedCallNotificationReceiver" /> </application> </manifest> Loading
AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".testapps.IncomingSelfManagedCallActivity" /> <receiver android:name=".components.PrimaryCallReceiver" android:exported="true" Loading
src/com/android/server/telecom/ConnectionServiceWrapper.java +3 −1 Original line number Diff line number Diff line Loading @@ -923,7 +923,9 @@ public class ConnectionServiceWrapper extends ServiceBinder { Log.piiHandle(call.getHandle())); try { logOutgoing("createConnectionFailed %s", callId); mServiceInterface.createConnectionFailed(callId, mServiceInterface.createConnectionFailed( call.getConnectionManagerPhoneAccount(), callId, new ConnectionRequest( call.getTargetPhoneAccount(), call.getHandle(), Loading
src/com/android/server/telecom/InCallController.java +4 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,10 @@ public final class InCallController extends CallsManagerListenerBase { continue; } if (call.isSelfManaged() && !info.isSelfManagedCallsSupported()) { continue; } // Only send the RTT call if it's a UI in-call service boolean includeRttCall = info.equals(mInCallServiceConnection.getInfo()); Loading
src/com/android/server/telecom/VideoProviderProxy.java +18 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.AppOpsManager; import android.content.Context; import android.net.Uri; import android.os.Binder; import android.os.Build; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; Loading Loading @@ -303,10 +304,12 @@ public class VideoProviderProxy extends Connection.VideoProvider { * @param callingPackage The package calling in. * @param callingUid The UID of the caller. * @param callingPid The PID of the caller. * @param targetSdkVersion The target SDK version of the calling InCallService where the camera * request originated. */ @Override public void onSetCamera(String cameraId, String callingPackage, int callingUid, int callingPid) { int callingPid, int targetSdkVersion) { synchronized (mLock) { logFromInCall("setCamera: " + cameraId + " callingPackage=" + callingPackage + "; callingUid=" + callingUid); Loading @@ -316,15 +319,24 @@ public class VideoProviderProxy extends Connection.VideoProvider { // Calling app is not permitted to use the camera. Ignore the request and send // back a call session event indicating the error. Log.i(this, "onSetCamera: camera permission denied; package=%d, uid=%d, " + "pid=%d", callingPackage, callingUid, callingPid); + "pid=%d, targetSdkVersion=%d", callingPackage, callingUid, callingPid, targetSdkVersion); // API 26 introduces a new camera permission error we can use here since the // caller supports that API version. if (targetSdkVersion > Build.VERSION_CODES.N_MR1) { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_PERMISSION_ERROR); } else { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE); } return; } } try { mConectionServiceVideoProvider.setCamera(cameraId, callingPackage); mConectionServiceVideoProvider.setCamera(cameraId, callingPackage, targetSdkVersion); } catch (RemoteException e) { VideoProviderProxy.this.handleCallSessionEvent( Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE); Loading
testapps/AndroidManifest.xml +12 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,14 @@ </intent-filter> </activity> <activity android:name="com.android.server.telecom.testapps.IncomingSelfManagedCallActivity" android:label="@string/selfManagedCallingActivityLabel" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <service android:name="com.android.server.telecom.testapps.SelfManagedConnectionService" android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp"> Loading @@ -180,5 +188,9 @@ <action android:name="android.telecom.ConnectionService" /> </intent-filter> </service> <receiver android:exported="false" android:process="com.android.server.telecom.testapps.SelfMangingCallingApp" android:name="com.android.server.telecom.testapps.SelfManagedCallNotificationReceiver" /> </application> </manifest>