enable lint PackageManagerGetSignatures as error

This commit is contained in:
Hans-Christoph Steiner 2018-08-10 11:10:21 +02:00
parent 4a684182ca
commit 896d4a788f
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,7 @@
<issue id="StringFormatCount" severity="error"/> <issue id="StringFormatCount" severity="error"/>
<issue id="UnsafeProtectedBroadcastReceiver" severity="error"/> <issue id="UnsafeProtectedBroadcastReceiver" severity="error"/>
<issue id="GetInstance" severity="error"/> <issue id="GetInstance" severity="error"/>
<issue id="PackageManagerGetSignatures" severity="error"/>
<issue id="PluralsCandidate" severity="error"/> <issue id="PluralsCandidate" severity="error"/>
<issue id="HardcodedText" severity="error"/> <issue id="HardcodedText" severity="error"/>

View File

@ -273,7 +273,13 @@ public class InstalledAppProviderService extends JobIntentService {
* <p> * <p>
* Can still return null, as there is potentially race conditions to do with uninstalling apps * Can still return null, as there is potentially race conditions to do with uninstalling apps
* such that querying the {@link PackageManager} for a given package may throw an exception. * such that querying the {@link PackageManager} for a given package may throw an exception.
* <p>
* The {@code PackageManagerGetSignatures} lint check is not relevant here since this is doing
* nothing related to verifying the signature. The APK signatures are just processed to
* produce the unique ID of the signer to determine compatibility. This {@code Service} does
* nothing related to checking valid APK signatures.
*/ */
@SuppressWarnings("PackageManagerGetSignatures")
@Nullable @Nullable
private PackageInfo getPackageInfo(Intent intent, String packageName) { private PackageInfo getPackageInfo(Intent intent, String packageName) {
PackageInfo packageInfo = intent.getParcelableExtra(EXTRA_PACKAGE_INFO); PackageInfo packageInfo = intent.getParcelableExtra(EXTRA_PACKAGE_INFO);