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