Loading services/core/java/com/android/server/telecom/TelecomLoaderService.java +5 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.pm.PackageManagerInternal; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -63,7 +64,10 @@ public class TelecomLoaderService extends SystemService { // as this loader (process="system") that's redundant here. try { ITelecomLoader telecomLoader = ITelecomLoader.Stub.asInterface(service); ITelecomService telecomService = telecomLoader.createTelecomService(mServiceRepo); PackageManagerInternal packageManagerInternal = LocalServices.getService(PackageManagerInternal.class); ITelecomService telecomService = telecomLoader.createTelecomService(mServiceRepo, packageManagerInternal.getSystemUiServiceComponent().getPackageName()); SmsApplication.getDefaultMmsApplication(mContext, false); ServiceManager.addService(Context.TELECOM_SERVICE, telecomService.asBinder()); Loading telecomm/java/android/telecom/TelecomManager.java +8 −1 Original line number Diff line number Diff line Loading @@ -2049,11 +2049,15 @@ public class TelecomManager { /** * Ends the foreground call on the device. * <p> * If there is a ringing call, calling this method rejects the ringing call. Otherwise the * If there is a ringing call, calling this method rejects the ringing call. Otherwise, the * foreground call is ended. * <p> * Note: this method CANNOT be used to end ongoing emergency calls and will return {@code false} * if an attempt is made to end an emergency call. * <p> * Note: If the foreground call on this device is self-managed, this method will only end * the call if the caller of this method is privileged (i.e. system, shell, or root) or system * UI. * * @return {@code true} if there is a call which will be rejected or terminated, {@code false} * otherwise. Loading Loading @@ -2082,6 +2086,9 @@ public class TelecomManager { * the incoming call requests. This means, for example, that an incoming call requesting * {@link VideoProfile#STATE_BIDIRECTIONAL} will be answered, accepting that state. * * If the ringing incoming call is self-managed, this method will only accept the call if the * caller of this method is privileged (i.e. system, shell, or root) or system UI. * * @deprecated Companion apps for wearable devices should use the {@link InCallService} API * instead. */ Loading telecomm/java/com/android/internal/telecom/ITelecomLoader.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,5 +24,5 @@ import com.android.internal.telecom.IInternalServiceRetriever; * Allows the TelecomLoaderService to pass additional dependencies required for creation. */ interface ITelecomLoader { ITelecomService createTelecomService(IInternalServiceRetriever retriever); ITelecomService createTelecomService(IInternalServiceRetriever retriever, String sysUiName); } Loading
services/core/java/com/android/server/telecom/TelecomLoaderService.java +5 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.pm.PackageManagerInternal; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -63,7 +64,10 @@ public class TelecomLoaderService extends SystemService { // as this loader (process="system") that's redundant here. try { ITelecomLoader telecomLoader = ITelecomLoader.Stub.asInterface(service); ITelecomService telecomService = telecomLoader.createTelecomService(mServiceRepo); PackageManagerInternal packageManagerInternal = LocalServices.getService(PackageManagerInternal.class); ITelecomService telecomService = telecomLoader.createTelecomService(mServiceRepo, packageManagerInternal.getSystemUiServiceComponent().getPackageName()); SmsApplication.getDefaultMmsApplication(mContext, false); ServiceManager.addService(Context.TELECOM_SERVICE, telecomService.asBinder()); Loading
telecomm/java/android/telecom/TelecomManager.java +8 −1 Original line number Diff line number Diff line Loading @@ -2049,11 +2049,15 @@ public class TelecomManager { /** * Ends the foreground call on the device. * <p> * If there is a ringing call, calling this method rejects the ringing call. Otherwise the * If there is a ringing call, calling this method rejects the ringing call. Otherwise, the * foreground call is ended. * <p> * Note: this method CANNOT be used to end ongoing emergency calls and will return {@code false} * if an attempt is made to end an emergency call. * <p> * Note: If the foreground call on this device is self-managed, this method will only end * the call if the caller of this method is privileged (i.e. system, shell, or root) or system * UI. * * @return {@code true} if there is a call which will be rejected or terminated, {@code false} * otherwise. Loading Loading @@ -2082,6 +2086,9 @@ public class TelecomManager { * the incoming call requests. This means, for example, that an incoming call requesting * {@link VideoProfile#STATE_BIDIRECTIONAL} will be answered, accepting that state. * * If the ringing incoming call is self-managed, this method will only accept the call if the * caller of this method is privileged (i.e. system, shell, or root) or system UI. * * @deprecated Companion apps for wearable devices should use the {@link InCallService} API * instead. */ Loading
telecomm/java/com/android/internal/telecom/ITelecomLoader.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,5 +24,5 @@ import com.android.internal.telecom.IInternalServiceRetriever; * Allows the TelecomLoaderService to pass additional dependencies required for creation. */ interface ITelecomLoader { ITelecomService createTelecomService(IInternalServiceRetriever retriever); ITelecomService createTelecomService(IInternalServiceRetriever retriever, String sysUiName); }