/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/ |
D | SdkSandboxServiceProviderImpl.java | 70 public void bindService(CallingInfo callingInfo, ServiceConnection serviceConnection) { in bindService() argument 72 SdkSandboxConnection sdkSandboxConnection = getSdkSandboxConnectionLocked(callingInfo); in bindService() 77 Log.i(TAG, "SDK sandbox for " + callingInfo + " is already created"); in bindService() 81 Log.i(TAG, "Binding sdk sandbox for " + callingInfo); in bindService() 91 String callingPackageName = callingInfo.getPackageName(); in bindService() 94 sandboxProcessName = toSandboxProcessName(callingInfo); in bindService() 96 Log.e(TAG, "bindService failed for: " + callingInfo.toString(), e); in bindService() 109 callingInfo.getUid(), in bindService() 120 callingInfo.getUid(), in bindService() 121 callingInfo.getAppProcessToken(), in bindService() [all …]
|
D | SdkSandboxManagerService.java | 370 final CallingInfo callingInfo = new CallingInfo(uid, packageName); in registerPackageUpdateBroadcastReceiver() 374 callingInfo)); in registerPackageUpdateBroadcastReceiver() 407 CallingInfo callingInfo; in getSandboxedSdks() local 409 callingInfo = in getSandboxedSdks() 415 callingInfo = CallingInfo.fromBinder(mContext, callingPackageName); in getSandboxedSdks() 420 ArrayList<LoadSdkSession> loadedSdks = getLoadedSdksForApp(callingInfo); in getSandboxedSdks() 451 CallingInfo callingInfo) { in getRegisteredAppOwnedSdkSandboxInterfacesForApp() argument 453 if (!mHeldInterfaces.containsKey(callingInfo)) { in getRegisteredAppOwnedSdkSandboxInterfacesForApp() 456 return new ArrayList<>(mHeldInterfaces.get(callingInfo).values()); in getRegisteredAppOwnedSdkSandboxInterfacesForApp() 460 private ArrayList<LoadSdkSession> getLoadedSdksForApp(CallingInfo callingInfo) { in getLoadedSdksForApp() argument [all …]
|
D | SdkSandboxServiceProvider.java | 68 void bindService(CallingInfo callingInfo, ServiceConnection serviceConnection); in bindService() argument 75 void unbindService(CallingInfo callingInfo); in unbindService() argument 82 void stopSandboxService(CallingInfo callingInfo); in stopSandboxService() argument 89 ISdkSandboxService getSdkSandboxServiceForApp(CallingInfo callingInfo); in getSdkSandboxServiceForApp() argument 97 void onServiceConnected(CallingInfo callingInfo, @NonNull ISdkSandboxService service); in onServiceConnected() argument 104 void onServiceDisconnected(CallingInfo callingInfo); in onServiceDisconnected() argument 111 void onAppDeath(CallingInfo callingInfo); in onAppDeath() argument 118 void onSandboxDeath(CallingInfo callingInfo); in onSandboxDeath() argument 125 boolean isSandboxBoundForApp(CallingInfo callingInfo); in isSandboxBoundForApp() argument 133 int getSandboxStatusForApp(CallingInfo callingInfo); in getSandboxStatusForApp() argument [all …]
|
D | SdkSandboxStorageManager.java | 90 public void notifyInstrumentationStarted(CallingInfo callingInfo) { in notifyInstrumentationStarted() argument 92 reconcileSdkDataSubDirs(callingInfo, /*forInstrumentation=*/true); in notifyInstrumentationStarted() 102 public void onPackageAddedOrUpdated(CallingInfo callingInfo) { in onPackageAddedOrUpdated() argument 103 LogUtil.d(TAG, "Preparing SDK data on package added or update for: " + callingInfo); in onPackageAddedOrUpdated() 105 reconcileSdkDataSubDirs(callingInfo, /*forInstrumentation=*/false); in onPackageAddedOrUpdated() 121 public void prepareSdkDataOnLoad(CallingInfo callingInfo) { in prepareSdkDataOnLoad() argument 122 LogUtil.d(TAG, "Preparing SDK data on load for: " + callingInfo); in prepareSdkDataOnLoad() 124 reconcileSdkDataSubDirs(callingInfo, /*forInstrumentation=*/false); in prepareSdkDataOnLoad() 128 public StorageDirInfo getSdkStorageDirInfo(CallingInfo callingInfo, String sdkName) { in getSdkStorageDirInfo() argument 129 final StorageDirInfo packageDirInfo = getSdkDataPackageDirInfo(callingInfo); in getSdkStorageDirInfo() [all …]
|
D | SdkSandboxRestrictionManager.java | 98 CallingInfo callingInfo, PackageManagerHelper packageManagerHelper) in getEffectiveTargetSdkVersion() argument 103 mEffectiveTargetSdkVersions.put(callingInfo, DEFAULT_TARGET_SDK_VERSION); in getEffectiveTargetSdkVersion() 104 return mEffectiveTargetSdkVersions.get(callingInfo); in getEffectiveTargetSdkVersion() 109 packageManagerHelper.getSdkSharedLibraryInfo(callingInfo.getPackageName()); in getEffectiveTargetSdkVersion() 130 callingInfo, Integer.max(targetSdkVersion, DEFAULT_TARGET_SDK_VERSION)); in getEffectiveTargetSdkVersion() 131 return mEffectiveTargetSdkVersions.get(callingInfo); in getEffectiveTargetSdkVersion()
|
D | CallingInfo.java | 69 CallingInfo callingInfo = new CallingInfo(uid, packageNameUnchecked); in fromExternal() local 70 callingInfo.mIsCallFromSdkSandbox = true; in fromExternal() 71 return callingInfo; in fromExternal()
|
D | LoadSdkSession.java | 172 CallingInfo callingInfo, in LoadSdkSession() argument 180 mCallingInfo = callingInfo; in LoadSdkSession()
|
/packages/modules/AdServices/sdksandbox/tests/testutils/src/com/android/server/sdksandbox/testutils/ |
D | FakeSdkSandboxProvider.java | 70 public void bindService(CallingInfo callingInfo, ServiceConnection serviceConnection) { in bindService() argument 76 if (mService.containsKey(callingInfo)) { in bindService() 79 mService.put(callingInfo, mSdkSandboxService); in bindService() 85 public void unbindService(CallingInfo callingInfo) { in unbindService() argument 86 mService.remove(callingInfo); in unbindService() 90 public void stopSandboxService(CallingInfo callingInfo) { in stopSandboxService() argument 91 mService.remove(callingInfo); in stopSandboxService() 96 public ISdkSandboxService getSdkSandboxServiceForApp(CallingInfo callingInfo) { in getSdkSandboxServiceForApp() argument 97 return mService.get(callingInfo); in getSdkSandboxServiceForApp() 101 public void onServiceConnected(CallingInfo callingInfo, @NonNull ISdkSandboxService service) { in onServiceConnected() argument [all …]
|
/packages/modules/AdServices/sdksandbox/tests/unittest/src/com/android/server/sdksandbox/ |
D | SdkSandboxShellCommandUnitTest.java | 167 final CallingInfo callingInfo = new CallingInfo(UID, DEBUGGABLE_PACKAGE); in testStartFailsWhenSdkSandboxDisabled() local 168 Mockito.doReturn(false).when(mService).isSdkSandboxServiceRunning(callingInfo); in testStartFailsWhenSdkSandboxDisabled() 213 final CallingInfo callingInfo = new CallingInfo(UID, DEBUGGABLE_PACKAGE); in testStartFailsWhenSandboxAlreadyRunning() local 214 Mockito.doReturn(true).when(mService).isSdkSandboxServiceRunning(callingInfo); in testStartFailsWhenSandboxAlreadyRunning() 228 Mockito.verify(mService).isSdkSandboxServiceRunning(callingInfo); in testStartFailsWhenSandboxAlreadyRunning() 239 final CallingInfo callingInfo = new CallingInfo(UID, DEBUGGABLE_PACKAGE); in testStartSucceedsForDebuggablePackageWhenNotAlreadyRunning() local 240 Mockito.doReturn(false).when(mService).isSdkSandboxServiceRunning(callingInfo); in testStartSucceedsForDebuggablePackageWhenNotAlreadyRunning() 254 Mockito.verify(mService).isSdkSandboxServiceRunning(callingInfo); in testStartSucceedsForDebuggablePackageWhenNotAlreadyRunning() 258 Mockito.eq(callingInfo), in testStartSucceedsForDebuggablePackageWhenNotAlreadyRunning() 267 final CallingInfo callingInfo = new CallingInfo(UID, DEBUGGABLE_PACKAGE); in testStartFailsWhenBindingSandboxFails() local [all …]
|
D | SdkSandboxServiceProviderImplUnitTest.java | 240 private void bindService(CallingInfo callingInfo, FakeServiceConnection serviceConnection) in bindService() argument 242 bindService(callingInfo, serviceConnection, true); in bindService() 246 CallingInfo callingInfo, in bindService() argument 284 mServiceProvider.bindService(callingInfo, serviceConnection); in bindService() 287 private void unbindService(CallingInfo callingInfo) { in unbindService() argument 289 mServiceProvider.unbindService(callingInfo); in unbindService() 326 FakeServiceConnection(CallingInfo callingInfo) { in FakeServiceConnection() argument 327 mCallingInfo = callingInfo; in FakeServiceConnection()
|
D | SdkSandboxStorageManagerUnitTest.java | 132 final CallingInfo callingInfo = new CallingInfo(CLIENT_UID, CLIENT_PKG_NAME); in test_getSdkStorageDirInfo_nonExistingStorage() local 134 mSdkSandboxStorageManager.getSdkStorageDirInfo(callingInfo, SDK_NAME); in test_getSdkStorageDirInfo_nonExistingStorage() 152 final CallingInfo callingInfo = new CallingInfo(CLIENT_UID, CLIENT_PKG_NAME); in test_getSdkStorageDirInfo_storageExists() local 154 mSdkSandboxStorageManager.getSdkStorageDirInfo(callingInfo, SDK_NAME); in test_getSdkStorageDirInfo_storageExists() 164 final CallingInfo callingInfo = new CallingInfo(CLIENT_UID, CLIENT_PKG_NAME); in test_getInernalStorageDirInfo_nonExistingStorage() local 166 mSdkSandboxStorageManager.getInternalStorageDirInfo(callingInfo, SDK_NAME); in test_getInernalStorageDirInfo_nonExistingStorage() 186 final CallingInfo callingInfo = new CallingInfo(CLIENT_UID, CLIENT_PKG_NAME); in test_getInternalStorageDirInfo_storageExists() local 189 callingInfo, SubDirectories.SANDBOX_DIR); in test_getInternalStorageDirInfo_storageExists() 447 final CallingInfo callingInfo = new CallingInfo(CLIENT_UID, CLIENT_PKG_NAME); in test_getSdkStorageDirInfo() local 450 mSdkSandboxStorageManager.getSdkStorageDirInfo(callingInfo); in test_getSdkStorageDirInfo() [all …]
|
D | SdkSandboxManagerServiceUnitTest.java | 1256 final CallingInfo callingInfo = new CallingInfo(mClientAppUid, TEST_PACKAGE); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk() local 1259 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isNotNull(); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk() 1262 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isNull(); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk() 1290 final CallingInfo callingInfo = new CallingInfo(mClientAppUid, TEST_PACKAGE); in testNotifyInstrumentationFinished_canLoadSdk() local 1291 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isNull(); in testNotifyInstrumentationFinished_canLoadSdk() 1322 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isNotNull(); in testNotifyInstrumentationFinished_canLoadSdk() 1506 final CallingInfo callingInfo = new CallingInfo(callingUid, TEST_PACKAGE); in testStopSdkSandbox() local 1507 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isEqualTo(null); in testStopSdkSandbox() 1698 final CallingInfo callingInfo = new CallingInfo(callingUid, TEST_PACKAGE); in testKillswitchStopsSandbox() local 1699 assertThat(sProvider.getSdkSandboxServiceForApp(callingInfo)).isEqualTo(null); in testKillswitchStopsSandbox()
|