Loading core/api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -13732,6 +13732,7 @@ package android.telecom { method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage(); method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); method @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") @RequiresPermission(allOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.INTERACT_ACROSS_USERS}) public boolean isInSelfManagedCall(@NonNull String, @NonNull android.os.UserHandle, boolean); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED"; field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED"; services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -7955,8 +7955,8 @@ public class NotificationManagerService extends SystemService { && mTelecomManager != null) { && mTelecomManager != null) { try { try { return mTelecomManager.isInManagedCall() return mTelecomManager.isInManagedCall() || mTelecomManager.isInSelfManagedCall( || mTelecomManager.isInSelfManagedCall(pkg, pkg, UserHandle.getUserHandleForUid(uid)); UserHandle.getUserHandleForUid(uid), /* hasCrossUserAccess */ true); } catch (IllegalStateException ise) { } catch (IllegalStateException ise) { // Telecom is not ready (this is likely early boot), so there are no calls. // Telecom is not ready (this is likely early boot), so there are no calls. return false; return false; Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -11686,7 +11686,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { // style + self managed call - bypasses block // style + self managed call - bypasses block when(mTelecomManager.isInSelfManagedCall( when(mTelecomManager.isInSelfManagedCall( r.getSbn().getPackageName(), r.getUser())).thenReturn(true); r.getSbn().getPackageName(), r.getUser(), true)).thenReturn(true); assertThat(mService.checkDisqualifyingFeatures(r.getUserId(), r.getUid(), assertThat(mService.checkDisqualifyingFeatures(r.getUserId(), r.getUid(), r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue(); r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue(); Loading Loading @@ -11769,7 +11769,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { // style + self managed call - bypasses block // style + self managed call - bypasses block mService.clearNotifications(); mService.clearNotifications(); reset(mUsageStats); reset(mUsageStats); when(mTelecomManager.isInSelfManagedCall(r.getSbn().getPackageName(), r.getUser())) when(mTelecomManager.isInSelfManagedCall(r.getSbn().getPackageName(), r.getUser(), true)) .thenReturn(true); .thenReturn(true); mService.addEnqueuedNotification(r); mService.addEnqueuedNotification(r); telecomm/java/android/telecom/TelecomManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -2752,17 +2752,23 @@ public class TelecomManager { * * * @param packageName the package name of the app to check calls for. * @param packageName the package name of the app to check calls for. * @param userHandle the user handle on which to check for calls. * @param userHandle the user handle on which to check for calls. * @param hasCrossUserAccess indicates if calls should be detected across all users. * @return {@code true} if there are ongoing calls, {@code false} otherwise. * @return {@code true} if there are ongoing calls, {@code false} otherwise. * @hide * @hide */ */ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @SystemApi @FlaggedApi(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES) @RequiresPermission(allOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Manifest.permission.INTERACT_ACROSS_USERS }) public boolean isInSelfManagedCall(@NonNull String packageName, public boolean isInSelfManagedCall(@NonNull String packageName, @NonNull UserHandle userHandle) { @NonNull UserHandle userHandle, boolean hasCrossUserAccess) { ITelecomService service = getTelecomService(); ITelecomService service = getTelecomService(); if (service != null) { if (service != null) { try { try { return service.isInSelfManagedCall(packageName, userHandle, return service.isInSelfManagedCall(packageName, userHandle, mContext.getOpPackageName()); mContext.getOpPackageName(), hasCrossUserAccess); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "RemoteException isInSelfManagedCall: " + e); Log.e(TAG, "RemoteException isInSelfManagedCall: " + e); e.rethrowFromSystemServer(); e.rethrowFromSystemServer(); Loading telecomm/java/com/android/internal/telecom/ITelecomService.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -395,7 +395,7 @@ interface ITelecomService { * @see TelecomServiceImpl#isInSelfManagedCall * @see TelecomServiceImpl#isInSelfManagedCall */ */ boolean isInSelfManagedCall(String packageName, in UserHandle userHandle, boolean isInSelfManagedCall(String packageName, in UserHandle userHandle, String callingPackage); String callingPackage, boolean hasCrossUserAccess); /** /** * @see TelecomServiceImpl#addCall * @see TelecomServiceImpl#addCall Loading Loading
core/api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -13732,6 +13732,7 @@ package android.telecom { method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage(); method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); method @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") @RequiresPermission(allOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.INTERACT_ACROSS_USERS}) public boolean isInSelfManagedCall(@NonNull String, @NonNull android.os.UserHandle, boolean); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED"; field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED";
services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -7955,8 +7955,8 @@ public class NotificationManagerService extends SystemService { && mTelecomManager != null) { && mTelecomManager != null) { try { try { return mTelecomManager.isInManagedCall() return mTelecomManager.isInManagedCall() || mTelecomManager.isInSelfManagedCall( || mTelecomManager.isInSelfManagedCall(pkg, pkg, UserHandle.getUserHandleForUid(uid)); UserHandle.getUserHandleForUid(uid), /* hasCrossUserAccess */ true); } catch (IllegalStateException ise) { } catch (IllegalStateException ise) { // Telecom is not ready (this is likely early boot), so there are no calls. // Telecom is not ready (this is likely early boot), so there are no calls. return false; return false; Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -11686,7 +11686,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { // style + self managed call - bypasses block // style + self managed call - bypasses block when(mTelecomManager.isInSelfManagedCall( when(mTelecomManager.isInSelfManagedCall( r.getSbn().getPackageName(), r.getUser())).thenReturn(true); r.getSbn().getPackageName(), r.getUser(), true)).thenReturn(true); assertThat(mService.checkDisqualifyingFeatures(r.getUserId(), r.getUid(), assertThat(mService.checkDisqualifyingFeatures(r.getUserId(), r.getUid(), r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue(); r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue(); Loading Loading @@ -11769,7 +11769,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { // style + self managed call - bypasses block // style + self managed call - bypasses block mService.clearNotifications(); mService.clearNotifications(); reset(mUsageStats); reset(mUsageStats); when(mTelecomManager.isInSelfManagedCall(r.getSbn().getPackageName(), r.getUser())) when(mTelecomManager.isInSelfManagedCall(r.getSbn().getPackageName(), r.getUser(), true)) .thenReturn(true); .thenReturn(true); mService.addEnqueuedNotification(r); mService.addEnqueuedNotification(r);
telecomm/java/android/telecom/TelecomManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -2752,17 +2752,23 @@ public class TelecomManager { * * * @param packageName the package name of the app to check calls for. * @param packageName the package name of the app to check calls for. * @param userHandle the user handle on which to check for calls. * @param userHandle the user handle on which to check for calls. * @param hasCrossUserAccess indicates if calls should be detected across all users. * @return {@code true} if there are ongoing calls, {@code false} otherwise. * @return {@code true} if there are ongoing calls, {@code false} otherwise. * @hide * @hide */ */ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @SystemApi @FlaggedApi(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES) @RequiresPermission(allOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Manifest.permission.INTERACT_ACROSS_USERS }) public boolean isInSelfManagedCall(@NonNull String packageName, public boolean isInSelfManagedCall(@NonNull String packageName, @NonNull UserHandle userHandle) { @NonNull UserHandle userHandle, boolean hasCrossUserAccess) { ITelecomService service = getTelecomService(); ITelecomService service = getTelecomService(); if (service != null) { if (service != null) { try { try { return service.isInSelfManagedCall(packageName, userHandle, return service.isInSelfManagedCall(packageName, userHandle, mContext.getOpPackageName()); mContext.getOpPackageName(), hasCrossUserAccess); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "RemoteException isInSelfManagedCall: " + e); Log.e(TAG, "RemoteException isInSelfManagedCall: " + e); e.rethrowFromSystemServer(); e.rethrowFromSystemServer(); Loading
telecomm/java/com/android/internal/telecom/ITelecomService.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -395,7 +395,7 @@ interface ITelecomService { * @see TelecomServiceImpl#isInSelfManagedCall * @see TelecomServiceImpl#isInSelfManagedCall */ */ boolean isInSelfManagedCall(String packageName, in UserHandle userHandle, boolean isInSelfManagedCall(String packageName, in UserHandle userHandle, String callingPackage); String callingPackage, boolean hasCrossUserAccess); /** /** * @see TelecomServiceImpl#addCall * @see TelecomServiceImpl#addCall Loading