/developers/build/prebuilts/gradle/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/ |
D | SharedPrefsPackageVerificationRepository.java | 58 public boolean putPackageSignatures(String packageName) { in putPackageSignatures() argument 62 PackageInfo packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_SIGNATURES); in putPackageSignatures() 63 hash = SecurityHelper.getFingerprint(packageInfo, packageName); in putPackageSignatures() 64 logd("Hash for %s: %s", packageName, hash); in putPackageSignatures() 66 logw(e, "Error getting hash for %s.", packageName); in putPackageSignatures() 70 if (!containsSignatureForPackage(packageName)) { in putPackageSignatures() 72 mSharedPrefs.edit().putString(packageName, hash).apply(); in putPackageSignatures() 75 return containsMatchingSignatureForPackage(packageName, hash); in putPackageSignatures() 78 private boolean containsSignatureForPackage(String packageName) { in containsSignatureForPackage() argument 79 return mSharedPrefs.contains(packageName); in containsSignatureForPackage() [all …]
|
D | DigitalAssetLinksRepository.java | 100 String packageName = dalInfo.getPackageName(); in checkValid() local 105 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, in checkValid() 107 fingerprint = SecurityHelper.getFingerprint(packageInfo, packageName); in checkValid() 110 packageName); in checkValid() 114 packageName, fingerprint); in checkValid() 115 mDalService.check(webDomain, PERMISSION_GET_LOGIN_CREDS, packageName, fingerprint).enqueue( in checkValid() 128 packageName, fingerprint).enqueue(new Callback<DalCheck>() { in checkValid() 154 mDalService.check(webDomain, PERMISSION_HANDLE_ALL_URLS, packageName, in checkValid()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/ |
D | SharedPrefsPackageVerificationRepository.java | 58 public boolean putPackageSignatures(String packageName) { in putPackageSignatures() argument 62 PackageInfo packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_SIGNATURES); in putPackageSignatures() 63 hash = SecurityHelper.getFingerprint(packageInfo, packageName); in putPackageSignatures() 64 logd("Hash for %s: %s", packageName, hash); in putPackageSignatures() 66 logw(e, "Error getting hash for %s.", packageName); in putPackageSignatures() 70 if (!containsSignatureForPackage(packageName)) { in putPackageSignatures() 72 mSharedPrefs.edit().putString(packageName, hash).apply(); in putPackageSignatures() 75 return containsMatchingSignatureForPackage(packageName, hash); in putPackageSignatures() 78 private boolean containsSignatureForPackage(String packageName) { in containsSignatureForPackage() argument 79 return mSharedPrefs.contains(packageName); in containsSignatureForPackage() [all …]
|
D | DigitalAssetLinksRepository.java | 100 String packageName = dalInfo.getPackageName(); in checkValid() local 105 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, in checkValid() 107 fingerprint = SecurityHelper.getFingerprint(packageInfo, packageName); in checkValid() 110 packageName); in checkValid() 114 packageName, fingerprint); in checkValid() 115 mDalService.check(webDomain, PERMISSION_GET_LOGIN_CREDS, packageName, fingerprint).enqueue( in checkValid() 128 packageName, fingerprint).enqueue(new Callback<DalCheck>() { in checkValid() 154 mDalService.check(webDomain, PERMISSION_HANDLE_ALL_URLS, packageName, in checkValid()
|
/developers/build/prebuilts/gradle/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/ |
D | PackageVerifier.kt | 35 fun isValidPackage(context: Context, packageName: String): Boolean { in <lambda>() 38 hash = getCertificateHash(context, packageName) in <lambda>() 39 Log.d(TAG, "Hash for $packageName: $hash") in <lambda>() 41 Log.w(TAG, "Error getting hash for $packageName: $e") in <lambda>() 45 return verifyHash(context, packageName, hash) in <lambda>() 48 private fun getCertificateHash(context: Context, packageName: String): String { in <lambda>() 50 val packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_SIGNATURES) in <lambda>() 81 private fun verifyHash(context: Context, packageName: String, hash: String): Boolean { in <lambda>() 84 if (!prefs.contains(packageName)) { in <lambda>() 85 Log.d(TAG, "Creating intial hash for " + packageName) in <lambda>() [all …]
|
D | MyAutofillService.kt | 38 val packageName = structure.activityComponent.packageName in onFillRequest() constant 39 if (!PackageVerifier.isValidPackage(applicationContext, packageName)) { in onFillRequest() 60 ….newRemoteViews(packageName, getString(R.string.autofill_sign_in_prompt), R.drawable.ic_lock_black… in onFillRequest() 76 val packageName = structure.activityComponent.packageName in onSaveRequest() constant 77 if (!PackageVerifier.isValidPackage(applicationContext, packageName)) { in onSaveRequest()
|
D | AutofillHelper.kt | 47 datasetBuilder = Dataset.Builder(newRemoteViews(context.packageName, datasetName, in <lambda>() 52 datasetBuilder = Dataset.Builder(newRemoteViews(context.packageName, datasetName, in <lambda>() 64 fun newRemoteViews(packageName: String, remoteViewsText: String, in <lambda>() 66 val presentation = RemoteViews(packageName, R.layout.multidataset_service_list_item) in <lambda>()
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/ |
D | PackageVerifier.kt | 35 fun isValidPackage(context: Context, packageName: String): Boolean { in <lambda>() 38 hash = getCertificateHash(context, packageName) in <lambda>() 39 Log.d(TAG, "Hash for $packageName: $hash") in <lambda>() 41 Log.w(TAG, "Error getting hash for $packageName: $e") in <lambda>() 45 return verifyHash(context, packageName, hash) in <lambda>() 48 private fun getCertificateHash(context: Context, packageName: String): String { in <lambda>() 50 val packageInfo = pm.getPackageInfo(packageName, PackageManager.GET_SIGNATURES) in <lambda>() 81 private fun verifyHash(context: Context, packageName: String, hash: String): Boolean { in <lambda>() 84 if (!prefs.contains(packageName)) { in <lambda>() 85 Log.d(TAG, "Creating intial hash for " + packageName) in <lambda>() [all …]
|
D | MyAutofillService.kt | 38 val packageName = structure.activityComponent.packageName in onFillRequest() constant 39 if (!PackageVerifier.isValidPackage(applicationContext, packageName)) { in onFillRequest() 60 ….newRemoteViews(packageName, getString(R.string.autofill_sign_in_prompt), R.drawable.ic_lock_black… in onFillRequest() 76 val packageName = structure.activityComponent.packageName in onSaveRequest() constant 77 if (!PackageVerifier.isValidPackage(applicationContext, packageName)) { in onSaveRequest()
|
D | AutofillHelper.kt | 47 datasetBuilder = Dataset.Builder(newRemoteViews(context.packageName, datasetName, in <lambda>() 52 datasetBuilder = Dataset.Builder(newRemoteViews(context.packageName, datasetName, in <lambda>() 64 fun newRemoteViews(packageName: String, remoteViewsText: String, in <lambda>() 66 val presentation = RemoteViews(packageName, R.layout.multidataset_service_list_item) in <lambda>()
|
/developers/build/prebuilts/gradle/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/ |
D | RemoteViewsHelper.java | 28 public static RemoteViews viewsWithAuth(String packageName, String text) { in viewsWithAuth() argument 29 return simpleRemoteViews(packageName, text, R.drawable.ic_lock_black_24dp); in viewsWithAuth() 32 public static RemoteViews viewsWithNoAuth(String packageName, String text) { in viewsWithNoAuth() argument 33 return simpleRemoteViews(packageName, text, R.drawable.ic_person_black_24dp); in viewsWithNoAuth() 36 private static RemoteViews simpleRemoteViews(String packageName, String remoteViewsText, in simpleRemoteViews() argument 38 RemoteViews presentation = new RemoteViews(packageName, in simpleRemoteViews()
|
D | MyAutofillService.java | 123 … String packageName = latestStructure.getActivityComponent().getPackageName(); in onFillRequest() 124 if (!mPackageVerificationRepository.putPackageSignatures(packageName)) { in onFillRequest() 209 … String packageName = latestStructure.getActivityComponent().getPackageName(); in onSaveRequest() 210 if (!mPackageVerificationRepository.putPackageSignatures(packageName)) { in onSaveRequest() 219 checkWebDomainAndBuildAutofillData(packageName, callback); in onSaveRequest() 229 private void checkWebDomainAndBuildAutofillData(String packageName, SaveCallback callback) { in checkWebDomainAndBuildAutofillData() argument 240 mDalRepository.checkValid(req, new DalInfo(webDomain, packageName), in checkWebDomainAndBuildAutofillData() 245 logd("Domain %s is valid for %s", webDomain, packageName); in checkWebDomainAndBuildAutofillData() 249 webDomain, packageName); in checkWebDomainAndBuildAutofillData()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/ |
D | RemoteViewsHelper.java | 28 public static RemoteViews viewsWithAuth(String packageName, String text) { in viewsWithAuth() argument 29 return simpleRemoteViews(packageName, text, R.drawable.ic_lock_black_24dp); in viewsWithAuth() 32 public static RemoteViews viewsWithNoAuth(String packageName, String text) { in viewsWithNoAuth() argument 33 return simpleRemoteViews(packageName, text, R.drawable.ic_person_black_24dp); in viewsWithNoAuth() 36 private static RemoteViews simpleRemoteViews(String packageName, String remoteViewsText, in simpleRemoteViews() argument 38 RemoteViews presentation = new RemoteViews(packageName, in simpleRemoteViews()
|
D | MyAutofillService.java | 123 … String packageName = latestStructure.getActivityComponent().getPackageName(); in onFillRequest() 124 if (!mPackageVerificationRepository.putPackageSignatures(packageName)) { in onFillRequest() 209 … String packageName = latestStructure.getActivityComponent().getPackageName(); in onSaveRequest() 210 if (!mPackageVerificationRepository.putPackageSignatures(packageName)) { in onSaveRequest() 219 checkWebDomainAndBuildAutofillData(packageName, callback); in onSaveRequest() 229 private void checkWebDomainAndBuildAutofillData(String packageName, SaveCallback callback) { in checkWebDomainAndBuildAutofillData() argument 240 mDalRepository.checkValid(req, new DalInfo(webDomain, packageName), in checkWebDomainAndBuildAutofillData() 245 logd("Domain %s is valid for %s", webDomain, packageName); in checkWebDomainAndBuildAutofillData() 249 webDomain, packageName); in checkWebDomainAndBuildAutofillData()
|
/developers/samples/android/admin/DeviceOwner/Application/src/main/java/com/example/android/deviceowner/ |
D | DeviceOwnerFragment.java | 181 String packageName = loadPersistentPreferredLauncher(activity); in retrieveCurrentSettings() local 182 if (packageName == null) { // No preferred launcher is set in retrieveCurrentSettings() 188 if (list.get(i).activityInfo.packageName.equals(packageName)) { in retrieveCurrentSettings() 258 private static void savePersistentPreferredLauncher(Activity activity, String packageName) { in savePersistentPreferredLauncher() argument 261 if (packageName == null) { in savePersistentPreferredLauncher() 264 editor.putString(PREF_LAUNCHER, packageName); in savePersistentPreferredLauncher() 319 map.put(KEY_PACKAGE_NAME, info.activityInfo.packageName); in createData()
|
/developers/build/prebuilts/gradle/DeviceOwner/Application/src/main/java/com/example/android/deviceowner/ |
D | DeviceOwnerFragment.java | 181 String packageName = loadPersistentPreferredLauncher(activity); in retrieveCurrentSettings() local 182 if (packageName == null) { // No preferred launcher is set in retrieveCurrentSettings() 188 if (list.get(i).activityInfo.packageName.equals(packageName)) { in retrieveCurrentSettings() 258 private static void savePersistentPreferredLauncher(Activity activity, String packageName) { in savePersistentPreferredLauncher() argument 261 if (packageName == null) { in savePersistentPreferredLauncher() 264 editor.putString(PREF_LAUNCHER, packageName); in savePersistentPreferredLauncher() 319 map.put(KEY_PACKAGE_NAME, info.activityInfo.packageName); in createData()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/ |
D | ResourceIdHeuristic.java | 42 @NonNull String packageName) { in ResourceIdHeuristic() argument 45 mPackageName = packageName; in ResourceIdHeuristic()
|
D | DalInfo.java | 25 public DalInfo(String webDomain, String packageName) { in DalInfo() argument 36 mPackageName = packageName; in DalInfo()
|
/developers/build/prebuilts/gradle/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/ |
D | ResourceIdHeuristic.java | 42 @NonNull String packageName) { in ResourceIdHeuristic() argument 45 mPackageName = packageName; in ResourceIdHeuristic()
|
D | DalInfo.java | 25 public DalInfo(String webDomain, String packageName) { in DalInfo() argument 36 mPackageName = packageName; in DalInfo()
|
D | AutofillDataset.java | 38 @NonNull String packageName) { in AutofillDataset() argument 41 mPackageName = packageName; in AutofillDataset()
|
/developers/build/prebuilts/gradle/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ |
D | ImageKeyboard.java | 119 editorInfo.packageName, contentUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); in doCommitContent() 121 Log.e(TAG, "grantUriPermission failed packageName=" + editorInfo.packageName in doCommitContent() 139 final String packageName = editorInfo.packageName; in validatePackageName() local 140 if (packageName == null) { in validatePackageName() 170 appOpsManager.checkPackage(packageUid, packageName); in validatePackageName() 180 if (packageName.equals(possiblePackageName)) { in validatePackageName()
|
/developers/samples/android/input/keyboard/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ |
D | ImageKeyboard.java | 119 editorInfo.packageName, contentUri, Intent.FLAG_GRANT_READ_URI_PERMISSION); in doCommitContent() 121 Log.e(TAG, "grantUriPermission failed packageName=" + editorInfo.packageName in doCommitContent() 139 final String packageName = editorInfo.packageName; in validatePackageName() local 140 if (packageName == null) { in validatePackageName() 170 appOpsManager.checkPackage(packageUid, packageName); in validatePackageName() 180 if (packageName.equals(possiblePackageName)) { in validatePackageName()
|
/developers/build/prebuilts/gradle/BasicManagedProfile/Application/src/main/java/com/example/android/basicmanagedprofile/ |
D | BasicManagedProfileFragment.java | 113 private boolean isApplicationEnabled(String packageName) { in isApplicationEnabled() argument 125 packageName, packageFlags); in isApplicationEnabled() 134 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in isApplicationEnabled() 211 private void setAppEnabled(String packageName, boolean enabled) { in setAppEnabled() argument 227 ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, in setAppEnabled() 236 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in setAppEnabled() local 239 Log.e(TAG, "Cannot disable this app: " + packageName); in setAppEnabled() 246 BasicDeviceAdminReceiver.getComponentName(activity), packageName, !enabled); in setAppEnabled() local 251 Log.e(TAG, "The app cannot be found: " + packageName, e); in setAppEnabled()
|
/developers/samples/android/admin/BasicManagedProfile/Application/src/main/java/com/example/android/basicmanagedprofile/ |
D | BasicManagedProfileFragment.java | 113 private boolean isApplicationEnabled(String packageName) { in isApplicationEnabled() argument 125 packageName, packageFlags); in isApplicationEnabled() 134 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in isApplicationEnabled() 211 private void setAppEnabled(String packageName, boolean enabled) { in setAppEnabled() argument 227 ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, in setAppEnabled() 236 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in setAppEnabled() local 239 Log.e(TAG, "Cannot disable this app: " + packageName); in setAppEnabled() 246 BasicDeviceAdminReceiver.getComponentName(activity), packageName, !enabled); in setAppEnabled() local 251 Log.e(TAG, "The app cannot be found: " + packageName, e); in setAppEnabled()
|