Home
last modified time | relevance | path

Searched refs:callingInfo (Results 1 – 12 of 12) sorted by relevance

/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/
DSdkSandboxServiceProviderImpl.java70 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 …]
DSdkSandboxManagerService.java370 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 …]
DSdkSandboxServiceProvider.java68 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 …]
DSdkSandboxStorageManager.java90 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 …]
DSdkSandboxRestrictionManager.java98 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()
DCallingInfo.java69 CallingInfo callingInfo = new CallingInfo(uid, packageNameUnchecked); in fromExternal() local
70 callingInfo.mIsCallFromSdkSandbox = true; in fromExternal()
71 return callingInfo; in fromExternal()
DLoadSdkSession.java172 CallingInfo callingInfo, in LoadSdkSession() argument
180 mCallingInfo = callingInfo; in LoadSdkSession()
/packages/modules/AdServices/sdksandbox/tests/testutils/src/com/android/server/sdksandbox/testutils/
DFakeSdkSandboxProvider.java70 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/
DSdkSandboxShellCommandUnitTest.java167 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 …]
DSdkSandboxServiceProviderImplUnitTest.java240 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()
DSdkSandboxStorageManagerUnitTest.java132 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 …]
DSdkSandboxManagerServiceUnitTest.java1256 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()