Home
last modified time | relevance | path

Searched refs:PackageManager (Results 1 – 25 of 108) sorted by relevance

12345

/external/libchrome/base/android/java/src/org/chromium/base/
DPackageUtils.java9 import android.content.pm.PackageManager;
27 PackageManager pm = context.getPackageManager(); in getPackageVersion()
31 } catch (PackageManager.NameNotFoundException e) { in getPackageVersion()
44 PackageManager packageManager = ContextUtils.getApplicationContext().getPackageManager(); in decodeImageResource()
48 } catch (PackageManager.NameNotFoundException e) { in decodeImageResource()
DSysUtils.java10 import android.content.pm.PackageManager;
148 final PackageManager pm = context.getPackageManager(); in hasCamera()
150 boolean hasCamera = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); in hasCamera()
152 hasCamera |= pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY); in hasCamera()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowSliceManager.java7 import android.content.pm.PackageManager;
8 import android.content.pm.PackageManager.NameNotFoundException;
58 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission()
62 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission()
64 return PackageManager.PERMISSION_DENIED; in checkSlicePermission()
68 PackageManager packageManager = context.getPackageManager(); in getUidForPackage()
DShadowPackageManager.java3 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
4 import static android.content.pm.PackageManager.GET_ACTIVITIES;
5 import static android.content.pm.PackageManager.GET_CONFIGURATIONS;
6 import static android.content.pm.PackageManager.GET_GIDS;
7 import static android.content.pm.PackageManager.GET_INSTRUMENTATION;
8 import static android.content.pm.PackageManager.GET_INTENT_FILTERS;
9 import static android.content.pm.PackageManager.GET_META_DATA;
10 import static android.content.pm.PackageManager.GET_PERMISSIONS;
11 import static android.content.pm.PackageManager.GET_PROVIDERS;
12 import static android.content.pm.PackageManager.GET_RECEIVERS;
[all …]
DShadowActivityThread.java8 import android.content.pm.PackageManager;
55 } catch (PackageManager.NameNotFoundException e) { in getPackageManager()
66 } catch (PackageManager.NameNotFoundException e) { in getPackageManager()
77 } catch (PackageManager.NameNotFoundException e) { in getPackageManager()
DShadowApplicationPackageManager.java5 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
6 import static android.content.pm.PackageManager.GET_META_DATA;
7 import static android.content.pm.PackageManager.GET_SIGNATURES;
8 import static android.content.pm.PackageManager.MATCH_ALL;
9 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
10 import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
11 import static android.content.pm.PackageManager.SIGNATURE_UNKNOWN_PACKAGE;
54 import android.content.pm.PackageManager;
55 import android.content.pm.PackageManager.NameNotFoundException;
221 return state != null ? state.newState : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; in getComponentEnabledSetting()
[all …]
DShadowCrossProfileApps.java19 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE;
20 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
41 import android.content.pm.PackageManager;
87 private PackageManager packageManager;
243 != PackageManager.PERMISSION_GRANTED) { in verifyHasInteractAcrossProfilesPermission()
356 } catch (PackageManager.NameNotFoundException e) { in canUserAttemptToConfigureInteractAcrossProfiles()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowSliceManagerTest.java7 import android.content.pm.PackageManager;
33 PackageManager packageManager = RuntimeEnvironment.application.getPackageManager(); in setUp()
47 .isEqualTo(PackageManager.PERMISSION_GRANTED); in testGrantSlicePermission_grantsPermissionToPackage()
54 .isEqualTo(PackageManager.PERMISSION_DENIED); in testGrantSlicePermission_doesNotGrantPermissionToOtherPackage()
61 .isEqualTo(PackageManager.PERMISSION_DENIED); in testGrantSlicePermission_doesNotGrantPermissionToOtherSliceUri()
69 .isEqualTo(PackageManager.PERMISSION_DENIED); in testRevokeSlicePermission_revokesPermissionToPackage()
DShadowPackageManagerTest.java15 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
16 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
17 import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
18 import static android.content.pm.PackageManager.PERMISSION_DENIED;
19 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
20 import static android.content.pm.PackageManager.SIGNATURE_FIRST_NOT_SIGNED;
21 import static android.content.pm.PackageManager.SIGNATURE_MATCH;
22 import static android.content.pm.PackageManager.SIGNATURE_NEITHER_SIGNED;
23 import static android.content.pm.PackageManager.SIGNATURE_NO_MATCH;
24 import static android.content.pm.PackageManager.SIGNATURE_SECOND_NOT_SIGNED;
[all …]
DShadowContextWrapperTest.java3 import static android.content.pm.PackageManager.PERMISSION_DENIED;
4 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
24 import android.content.pm.PackageManager;
476 .isEqualTo(PackageManager.PERMISSION_DENIED); in checkSelfPermission()
481 .isEqualTo(PackageManager.PERMISSION_GRANTED); in checkSelfPermission()
483 .isEqualTo(PackageManager.PERMISSION_DENIED); in checkSelfPermission()
489 .isEqualTo(PackageManager.PERMISSION_DENIED); in checkPermissionUidPid()
494 .isEqualTo(PackageManager.PERMISSION_DENIED); in checkPermissionUidPid()
497 .isEqualTo(PackageManager.PERMISSION_GRANTED); in checkPermissionUidPid()
505 .isEqualTo(PackageManager.PERMISSION_GRANTED); in checkAdditionalSelfPermission()
[all …]
/external/connectedappssdk/sdk/src/main/java/com/google/android/enterprise/connectedapps/
DAbstractProfileBinder.java26 import android.content.pm.PackageManager;
27 import android.content.pm.PackageManager.NameNotFoundException;
98 == PackageManager.PERMISSION_GRANTED) { in hasPermissionToBind()
103 == PackageManager.PERMISSION_GRANTED) { in hasPermissionToBind()
115 PackageManager packageManager = context.getPackageManager(); in cachePermissionRequests()
118 packageManager.getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS); in cachePermissionRequests()
/external/setupdesign/main/src/com/google/android/setupdesign/util/
DPartner.java22 import android.content.pm.PackageManager;
23 import android.content.pm.PackageManager.NameNotFoundException;
185 PackageManager pm = context.getPackageManager(); in get()
192 PackageManager.MATCH_SYSTEM_ONLY in get()
193 | PackageManager.MATCH_DIRECT_BOOT_AWARE in get()
194 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE in get()
195 | PackageManager.MATCH_DISABLED_COMPONENTS); in get()
199 receivers = pm.queryBroadcastReceivers(intent, PackageManager.GET_DISABLED_COMPONENTS); in get()
/external/libchrome/base/android/java/src/org/chromium/base/multidex/
DChromiumMultiDexInstaller.java9 import android.content.pm.PackageManager;
67 PackageManager packageManager = context.getPackageManager(); in shouldInstallMultiDex()
70 PackageManager.GET_META_DATA); in shouldInstallMultiDex()
73 } catch (PackageManager.NameNotFoundException e) { in shouldInstallMultiDex()
/external/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/
DDeviceReportActivity.java22 import android.content.pm.PackageManager;
145 + getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_PRO)); in reportExtraDeviceInfo()
147 + getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY)); in reportExtraDeviceInfo()
149 + getPackageManager().hasSystemFeature(PackageManager.FEATURE_MIDI)); in reportExtraDeviceInfo()
151 + getPackageManager().hasSystemFeature(PackageManager.FEATURE_USB_HOST)); in reportExtraDeviceInfo()
153 + getPackageManager().hasSystemFeature(PackageManager.FEATURE_USB_ACCESSORY)); in reportExtraDeviceInfo()
/external/setupcompat/partnerconfig/java/com/google/android/setupcompat/partnerconfig/
DResourceEntry.java20 import android.content.pm.PackageManager;
21 import android.content.pm.PackageManager.NameNotFoundException;
140 PackageManager manager = context.getPackageManager(); in getResourcesByPackageName()
143 manager.getApplicationInfo(packageName, PackageManager.MATCH_DISABLED_COMPONENTS)); in getResourcesByPackageName()
146 manager.getApplicationInfo(packageName, PackageManager.GET_DISABLED_COMPONENTS)); in getResourcesByPackageName()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/controller/
DContentProviderController.java6 import android.content.pm.PackageManager;
36 .getProviderInfo(componentName, PackageManager.MATCH_DISABLED_COMPONENTS); in create()
37 } catch (PackageManager.NameNotFoundException e) { in create()
70 componentName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0); in create()
/external/skia/platform_tools/android/apps/androidkitdemo/src/main/java/org/skia/androidkitdemo1/
DNavigationSpinner.java7 import android.content.pm.PackageManager;
66 … private ArrayList<String> getActivityList(Context c) throws PackageManager.NameNotFoundException { in getActivityList()
67 PackageManager pm = c.getPackageManager(); in getActivityList()
68 PackageInfo info = pm.getPackageInfo(c.getPackageName(), PackageManager.GET_ACTIVITIES); in getActivityList()
/external/libtextclassifier/java/src/com/android/textclassifier/common/intent/
DLabeledIntent.java24 import android.content.pm.PackageManager;
94 final PackageManager pm = context.getPackageManager(); in resolve()
187 @Nullable ResolveInfo resolveInfo, PackageManager packageManager) { in resolveDescription()
204 } catch (PackageManager.NameNotFoundException e) { in createIconFromPackage()
221 @Nullable ResolveInfo resolveInfo, PackageManager packageManager) { in getApplicationName()
242 == PackageManager.PERMISSION_GRANTED; in hasPermission()
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/testing/
DFakeContextBuilder.java30 import android.content.pm.PackageManager;
46 private final PackageManager packageManager;
53 packageManager = mock(PackageManager.class); in FakeContextBuilder()
58 public PackageManager getPackageManager() { in FakeContextBuilder()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DConnectivityMonitorFactory.java4 import android.content.pm.PackageManager;
14 final boolean hasPermission = res == PackageManager.PERMISSION_GRANTED; in build()
/external/sl4a/Common/src/com/googlecode/android_scripting/
DVersion.java21 import android.content.pm.PackageManager;
33 } catch (PackageManager.NameNotFoundException e) { in getVersion()
/external/libchrome/base/android/java/src/org/chromium/base/process_launcher/
DChildConnectionAllocator.java10 import android.content.pm.PackageManager;
82 PackageManager packageManager = context.getPackageManager(); in create()
85 packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA); in create()
89 } catch (PackageManager.NameNotFoundException e) { in create()
102 } catch (PackageManager.NameNotFoundException e) { in create()
/external/oboe/apps/fxlab/app/src/main/java/com/mobileer/androidfxlab/
DMainActivity.kt21 import android.content.pm.PackageManager in <lambda>()
61 != PackageManager.PERMISSION_GRANTED in <lambda>()
121 == PackageManager.PERMISSION_GRANTED in <lambda>()
136 … if ((grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED)) { in <lambda>()
/external/lottie/LottieSample/src/main/kotlin/com/airbnb/lottie/samples/
DTypeExtensions.kt6 import android.content.pm.PackageManager
36 ContextCompat.checkSelfPermission(context, this) == PackageManager.PERMISSION_GRANTED in urlIntent()
65 return ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED in Float()
DFilmStripSnapshotActivity.kt4 import android.content.pm.PackageManager in <lambda>()
55 …on: String) = ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRA… in <lambda>()
64 RC_PERMISSION -> if (grantResults.firstOrNull() == PackageManager.PERMISSION_GRANTED) { in <lambda>()

12345