Merge "Re-introduce ActivityTaskManager in CdmService" into tm-dev
This commit is contained in:
@@ -100,6 +100,7 @@ import com.android.server.LocalServices;
|
||||
import com.android.server.SystemService;
|
||||
import com.android.server.companion.presence.CompanionDevicePresenceMonitor;
|
||||
import com.android.server.pm.UserManagerInternal;
|
||||
import com.android.server.wm.ActivityTaskManagerInternal;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileDescriptor;
|
||||
@@ -135,6 +136,7 @@ public class CompanionDeviceManagerService extends SystemService {
|
||||
private CompanionDevicePresenceMonitor mDevicePresenceMonitor;
|
||||
private CompanionApplicationController mCompanionAppController;
|
||||
|
||||
private final ActivityTaskManagerInternal mAtmInternal;
|
||||
private final ActivityManagerInternal mAmInternal;
|
||||
private final IAppOpsService mAppOpsManager;
|
||||
private final PowerWhitelistManager mPowerWhitelistManager;
|
||||
@@ -159,6 +161,7 @@ public class CompanionDeviceManagerService extends SystemService {
|
||||
mPowerWhitelistManager = context.getSystemService(PowerWhitelistManager.class);
|
||||
mAppOpsManager = IAppOpsService.Stub.asInterface(
|
||||
ServiceManager.getService(Context.APP_OPS_SERVICE));
|
||||
mAtmInternal = LocalServices.getService(ActivityTaskManagerInternal.class);
|
||||
mAmInternal = LocalServices.getService(ActivityManagerInternal.class);
|
||||
mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class);
|
||||
mUserManager = context.getSystemService(UserManager.class);
|
||||
@@ -969,6 +972,9 @@ public class CompanionDeviceManagerService extends SystemService {
|
||||
companionAppUids.add(uid);
|
||||
}
|
||||
}
|
||||
if (mAtmInternal != null) {
|
||||
mAtmInternal.setCompanionAppUids(userId, companionAppUids);
|
||||
}
|
||||
if (mAmInternal != null) {
|
||||
// Make a copy of the set and send it to ActivityManager.
|
||||
mAmInternal.setCompanionAppUids(userId, new ArraySet<>(companionAppUids));
|
||||
|
||||
Reference in New Issue
Block a user