summaryrefslogtreecommitdiffstats
path: root/src/com/android/packageinstaller/InstallAppProgress.java
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2013-09-04 11:20:31 -0700
committerAlex Klyubin <klyubin@google.com>2013-09-09 17:48:25 -0700
commit7b30bc34492a0c53b02cec2fee7d0993da407fc4 (patch)
tree13c59ea09096398079a7a631c5e2d6d1bf7dfccb /src/com/android/packageinstaller/InstallAppProgress.java
parent4196137c30528703b2dcbcf7e61e89693ef65616 (diff)
downloadandroid_packages_apps_PackageInstaller-7b30bc34492a0c53b02cec2fee7d0993da407fc4.tar.gz
android_packages_apps_PackageInstaller-7b30bc34492a0c53b02cec2fee7d0993da407fc4.tar.bz2
android_packages_apps_PackageInstaller-7b30bc34492a0c53b02cec2fee7d0993da407fc4.zip
Record analytics about package install attempts to Event Log.
The purpose of this change is to provide analytics about the various stages of the install flow. Recorded information does not contain user-, device-, or package/app-identifying information. Examples of recorded information are: * duration of the flow (start to finish) * duration of the flow until the moment the user clicks Install * whether the attempt is an update or a new install. * whether app verification is enabled. * whether Unknown Sources is enabled. * whether the attempt was blocked by Unknown Sources. * whether permissions were displayed. * error code (if any) returned by PackageManager when installing the package. Bug: 10605940 Change-Id: I9bc009223a365a558cdf02bd91cf4315b82564c2
Diffstat (limited to 'src/com/android/packageinstaller/InstallAppProgress.java')
-rwxr-xr-xsrc/com/android/packageinstaller/InstallAppProgress.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java
index 71c792ee..f5282cfd 100755
--- a/src/com/android/packageinstaller/InstallAppProgress.java
+++ b/src/com/android/packageinstaller/InstallAppProgress.java
@@ -57,8 +57,11 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
private boolean localLOGV = false;
static final String EXTRA_MANIFEST_DIGEST =
"com.android.packageinstaller.extras.manifest_digest";
+ static final String EXTRA_INSTALL_FLOW_ANALYTICS =
+ "com.android.packageinstaller.extras.install_flow_analytics";
private ApplicationInfo mAppInfo;
private Uri mPackageURI;
+ private InstallFlowAnalytics mInstallFlowAnalytics;
private ProgressBar mProgressBar;
private View mOkPanel;
private TextView mStatusTextView;
@@ -74,6 +77,7 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
public void handleMessage(Message msg) {
switch (msg.what) {
case INSTALL_COMPLETE:
+ mInstallFlowAnalytics.setFlowFinishedWithPackageManagerResult(msg.arg1);
if (getIntent().getBooleanExtra(Intent.EXTRA_RETURN_RESULT, false)) {
Intent result = new Intent();
result.putExtra(Intent.EXTRA_INSTALL_RESULT, msg.arg1);
@@ -163,10 +167,13 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
super.onCreate(icicle);
Intent intent = getIntent();
mAppInfo = intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
+ mInstallFlowAnalytics = intent.getParcelableExtra(EXTRA_INSTALL_FLOW_ANALYTICS);
mPackageURI = intent.getData();
final String scheme = mPackageURI.getScheme();
if (scheme != null && !"file".equals(scheme) && !"package".equals(scheme)) {
+ mInstallFlowAnalytics.setFlowFinished(
+ InstallFlowAnalytics.RESULT_FAILED_UNSUPPORTED_SCHEME);
throw new IllegalArgumentException("unexpected scheme " + scheme);
}