Send package installer

This commit is contained in:
M66B 2016-07-09 08:30:25 +02:00
parent d27295d084
commit 29bc7d1628
2 changed files with 3 additions and 1 deletions

2
FAQ.md
View File

@ -374,7 +374,7 @@ The following data will be shared:
* The [SHA256](https://en.wikipedia.org/wiki/SHA-2) hashed [Android ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)
* The [Android version](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html)
* The application name and version
* The application name, version and installer
* Whether Wi-Fi and mobile connections will be blocked or allowed and which conditions apply (when screen on, roaming)
* Whether access attempts will be notified
* Which internet addresses (protocol, version, host, port) will be allowed and blocked

View File

@ -70,6 +70,7 @@ public class ServiceJob extends JobService {
json.put("device", Util.sha256(android_id, ""));
json.put("sdk", Build.VERSION.SDK_INT);
json.put("netguard", Util.getSelfVersionCode(ServiceJob.this));
json.put("store", getPackageManager().getInstallerPackageName(getPackageName()));
for (String name : params[0].getExtras().keySet())
json.put(name, params[0].getExtras().get(name));
@ -177,6 +178,7 @@ public class ServiceJob extends JobService {
bundle.putInt("version_code", rule.info.versionCode);
bundle.putString("version_name", rule.info.versionName);
bundle.putString("label", rule.info.applicationInfo.loadLabel(pm).toString());
bundle.putString("installer", pm.getInstallerPackageName(rule.info.packageName));
// Cancel overlapping jobs
for (JobInfo pending : scheduler.getAllPendingJobs()) {