add simple tracking (no opt-in yet!)
This commit is contained in:
@@ -53,6 +53,8 @@ import org.openintents.openpgp.OpenPgpSignatureResult.AutocryptPeerResult;
|
||||
import org.openintents.openpgp.util.OpenPgpApi;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.model.SubKey.UnifiedKeyInfo;
|
||||
import org.sufficientlysecure.keychain.KeychainApplication;
|
||||
import org.sufficientlysecure.keychain.TrackingManager;
|
||||
import org.sufficientlysecure.keychain.operations.BackupOperation;
|
||||
import org.sufficientlysecure.keychain.operations.results.DecryptVerifyResult;
|
||||
import org.sufficientlysecure.keychain.operations.results.ExportResult;
|
||||
@@ -99,6 +101,7 @@ public class OpenPgpService extends Service {
|
||||
private ApiAppDao mApiAppDao;
|
||||
private OpenPgpServiceKeyIdExtractor mKeyIdExtractor;
|
||||
private ApiPendingIntentFactory mApiPendingIntentFactory;
|
||||
private TrackingManager trackingManager;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
@@ -108,6 +111,8 @@ public class OpenPgpService extends Service {
|
||||
mApiPermissionHelper = new ApiPermissionHelper(this, mApiAppDao);
|
||||
mApiPendingIntentFactory = new ApiPendingIntentFactory(getBaseContext());
|
||||
mKeyIdExtractor = OpenPgpServiceKeyIdExtractor.getInstance(getContentResolver(), mApiPendingIntentFactory);
|
||||
|
||||
trackingManager = ((KeychainApplication) getApplication()).getTrackingManager();
|
||||
}
|
||||
|
||||
private Intent signImpl(Intent data, InputStream inputStream,
|
||||
@@ -1025,6 +1030,8 @@ public class OpenPgpService extends Service {
|
||||
return errorResult;
|
||||
}
|
||||
|
||||
trackingManager.trackApiServiceCall(data.getAction(), mApiPermissionHelper.getCurrentCallingPackage());
|
||||
|
||||
Progressable progressable = null;
|
||||
if (data.hasExtra(OpenPgpApi.EXTRA_PROGRESS_MESSENGER)) {
|
||||
Messenger messenger = data.getParcelableExtra(OpenPgpApi.EXTRA_PROGRESS_MESSENGER);
|
||||
|
||||
Reference in New Issue
Block a user