package com.wakatime.android;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.marcoscg.easylicensesdialog.EasyLicensesDialog;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AboutActivity extends AppCompatActivity {

    @BindView(R.id.text_view_version)
    TextView mTextViewVersion;

    @BindView(R.id.btn_license)
    Button mBtnLicense;
    private EasyLicensesDialog easyLicensesDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);

        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

        easyLicensesDialog = new EasyLicensesDialog(this);
        setVersion();
    }

    private void setVersion() {
        try {
            PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0);
            mTextViewVersion.setText(getString(R.string.version, info.versionName));
        } catch (PackageManager.NameNotFoundException e) {
            mTextViewVersion.setText(R.string.unknown_version);
        }
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        finish(); // remove from backstack and go back to dashboard below it
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (easyLicensesDialog != null) {
            easyLicensesDialog = null; // remove reference since it leaks
        }
    }

    @OnClick(R.id.btn_license)
    void openLicenseDialog(View button) {
        easyLicensesDialog.setTitle(getString(R.string.licenses));
        easyLicensesDialog.setCancelable(true);
        easyLicensesDialog.show();
    }
}

@@ -310,16 +310,118 @@
 tView;%0A%0A
+import com.google.android.gms.analytics.HitBuilders;%0Aimport com.google.android.gms.analytics.Tracker;%0A
 import c
@@ -471,16 +471,16 @@
 Dialog;%0A
-
 %0Aimport 
@@ -744,16 +744,17 @@
 icense;%0A
+%0A
     priv
@@ -797,16 +797,47 @@
 ialog;%0A%0A
+    private Tracker mTracker;%0A%0A
     @Ove
@@ -1257,16 +1257,96 @@
 rsion();
+%0A%0A        mTracker = ((WakatimeApplication) this.getApplication()).getTracker();
 %0A    %7D%0A%0A
@@ -1779,24 +1779,24 @@
 kPressed();%0A
-
         fini
@@ -1859,32 +1859,220 @@
 below it%0A    %7D%0A%0A
+    @Override%0A    protected void onResume() %7B%0A        super.onResume();%0A        mTracker.setScreenName(%22About%22);%0A        mTracker.send(new HitBuilders.ScreenViewBuilder().build());%0A    %7D%0A%0A
     @Override%0A  

Add tracking on about activity