Loading flags/telecom_profile_user_flags.aconfig +0 −11 Original line number Diff line number Diff line package: "com.android.server.telecom.flags" container: "system" # OWNER=huiwang TARGET=24Q3 flag { name: "profile_user_support" namespace: "telecom" description: "Fix issues related to the profile user like private profile" bug: "326270861" metadata { purpose: PURPOSE_BUGFIX } } src/com/android/server/telecom/InCallController.java +3 −20 Original line number Diff line number Diff line Loading @@ -2124,13 +2124,7 @@ public class InCallController extends CallsManagerListenerBase implements ? getUserFromCall(call) : userHandle; UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userToBind) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userToBind.getIdentifier())) { parentUser = um.getProfileParent(userToBind); } UserHandle parentUser = um.getProfileParent(userToBind); // Track the call if we don't already know about it. addCall(call); Loading Loading @@ -2175,12 +2169,7 @@ public class InCallController extends CallsManagerListenerBase implements public void bindToServices(Call call) { UserHandle userFromCall = getUserFromCall(call); UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userFromCall) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userFromCall.getIdentifier())) { parentUser = um.getProfileParent(userFromCall); } UserHandle parentUser = um.getProfileParent(userFromCall); Log.i(this, "child:%s parent:%s", userFromCall, parentUser); if (!mInCallServiceConnections.containsKey(userFromCall)) { Loading Loading @@ -2262,13 +2251,7 @@ public class InCallController extends CallsManagerListenerBase implements UserHandle userFromCall = getUserFromCall(call); UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userFromCall) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userFromCall.getIdentifier())) { parentUser = um.getProfileParent(userFromCall); } UserHandle parentUser = um.getProfileParent(userFromCall); List<InCallServiceInfo> nonUIInCallComponents = getInCallServiceComponents(userFromCall, IN_CALL_SERVICE_TYPE_NON_UI); Loading tests/src/com/android/server/telecom/tests/InCallControllerTests.java +0 −3 Original line number Diff line number Diff line Loading @@ -329,7 +329,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mFeatureFlags.separatelyBindToBtIncallService()).thenReturn(false); when(mFeatureFlags.telecomResolveHiddenDependencies()).thenReturn(true); when(mMockCurrentUserManager.isManagedProfile()).thenReturn(true); when(mFeatureFlags.profileUserSupport()).thenReturn(false); when(mFeatureFlags.resolveHiddenDependenciesTwo()).thenReturn(true); } Loading Loading @@ -1945,7 +1944,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockChildUserCall.getAssociatedUser()).thenReturn(mChildUserHandle); when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mParentUserHandle); when(mMockUserManager.getProfileParent(mChildUserHandle)).thenReturn(mParentUserHandle); when(mFeatureFlags.profileUserSupport()).thenReturn(true); } /** Loading @@ -1959,7 +1957,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockChildUserCall.getAssociatedUser()).thenReturn(mChildUserHandle); when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mParentUserHandle); when(mMockUserManager.getProfileParent(mChildUserHandle)).thenReturn(mParentUserHandle); when(mFeatureFlags.profileUserSupport()).thenReturn(true); when(mMockContext.getSystemService(eq(UserManager.class))) .thenReturn(mMockUserManager); // verify a NullPointerException is not thrown Loading Loading
flags/telecom_profile_user_flags.aconfig +0 −11 Original line number Diff line number Diff line package: "com.android.server.telecom.flags" container: "system" # OWNER=huiwang TARGET=24Q3 flag { name: "profile_user_support" namespace: "telecom" description: "Fix issues related to the profile user like private profile" bug: "326270861" metadata { purpose: PURPOSE_BUGFIX } }
src/com/android/server/telecom/InCallController.java +3 −20 Original line number Diff line number Diff line Loading @@ -2124,13 +2124,7 @@ public class InCallController extends CallsManagerListenerBase implements ? getUserFromCall(call) : userHandle; UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userToBind) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userToBind.getIdentifier())) { parentUser = um.getProfileParent(userToBind); } UserHandle parentUser = um.getProfileParent(userToBind); // Track the call if we don't already know about it. addCall(call); Loading Loading @@ -2175,12 +2169,7 @@ public class InCallController extends CallsManagerListenerBase implements public void bindToServices(Call call) { UserHandle userFromCall = getUserFromCall(call); UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userFromCall) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userFromCall.getIdentifier())) { parentUser = um.getProfileParent(userFromCall); } UserHandle parentUser = um.getProfileParent(userFromCall); Log.i(this, "child:%s parent:%s", userFromCall, parentUser); if (!mInCallServiceConnections.containsKey(userFromCall)) { Loading Loading @@ -2262,13 +2251,7 @@ public class InCallController extends CallsManagerListenerBase implements UserHandle userFromCall = getUserFromCall(call); UserManager um = mContext.getSystemService(UserManager.class); UserHandle parentUser = mFeatureFlags.profileUserSupport() ? um.getProfileParent(userFromCall) : null; if (!mFeatureFlags.profileUserSupport() && um.isManagedProfile(userFromCall.getIdentifier())) { parentUser = um.getProfileParent(userFromCall); } UserHandle parentUser = um.getProfileParent(userFromCall); List<InCallServiceInfo> nonUIInCallComponents = getInCallServiceComponents(userFromCall, IN_CALL_SERVICE_TYPE_NON_UI); Loading
tests/src/com/android/server/telecom/tests/InCallControllerTests.java +0 −3 Original line number Diff line number Diff line Loading @@ -329,7 +329,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mFeatureFlags.separatelyBindToBtIncallService()).thenReturn(false); when(mFeatureFlags.telecomResolveHiddenDependencies()).thenReturn(true); when(mMockCurrentUserManager.isManagedProfile()).thenReturn(true); when(mFeatureFlags.profileUserSupport()).thenReturn(false); when(mFeatureFlags.resolveHiddenDependenciesTwo()).thenReturn(true); } Loading Loading @@ -1945,7 +1944,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockChildUserCall.getAssociatedUser()).thenReturn(mChildUserHandle); when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mParentUserHandle); when(mMockUserManager.getProfileParent(mChildUserHandle)).thenReturn(mParentUserHandle); when(mFeatureFlags.profileUserSupport()).thenReturn(true); } /** Loading @@ -1959,7 +1957,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockChildUserCall.getAssociatedUser()).thenReturn(mChildUserHandle); when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mParentUserHandle); when(mMockUserManager.getProfileParent(mChildUserHandle)).thenReturn(mParentUserHandle); when(mFeatureFlags.profileUserSupport()).thenReturn(true); when(mMockContext.getSystemService(eq(UserManager.class))) .thenReturn(mMockUserManager); // verify a NullPointerException is not thrown Loading