show report when the user enables the Send to F-Droid Metrics pref
This commit is contained in:
parent
a207798f5c
commit
d558d396ed
@ -47,6 +47,8 @@ import java.nio.charset.Charset;
|
|||||||
public class InstallHistoryActivity extends AppCompatActivity {
|
public class InstallHistoryActivity extends AppCompatActivity {
|
||||||
public static final String TAG = "InstallHistoryActivity";
|
public static final String TAG = "InstallHistoryActivity";
|
||||||
|
|
||||||
|
public static final String EXTRA_SHOW_FDROID_METRICS = "showFDroidMetrics";
|
||||||
|
|
||||||
private boolean showingInstallHistory;
|
private boolean showingInstallHistory;
|
||||||
private Toolbar toolbar;
|
private Toolbar toolbar;
|
||||||
private MenuItem showMenuItem;
|
private MenuItem showMenuItem;
|
||||||
@ -65,7 +67,12 @@ public class InstallHistoryActivity extends AppCompatActivity {
|
|||||||
textView = findViewById(R.id.text);
|
textView = findViewById(R.id.text);
|
||||||
appName = getString(R.string.app_name);
|
appName = getString(R.string.app_name);
|
||||||
|
|
||||||
showInstallHistory();
|
Intent intent = getIntent();
|
||||||
|
if (intent != null && intent.getBooleanExtra(EXTRA_SHOW_FDROID_METRICS, false)) {
|
||||||
|
showFDroidMetricsReport();
|
||||||
|
} else {
|
||||||
|
showInstallHistory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showInstallHistory() {
|
private void showInstallHistory() {
|
||||||
|
@ -555,6 +555,9 @@ public class PreferencesFragment extends PreferenceFragmentCompat
|
|||||||
getContext().getString(R.string.app_name));
|
getContext().getString(R.string.app_name));
|
||||||
Toast.makeText(getContext(), msg, Toast.LENGTH_LONG).show();
|
Toast.makeText(getContext(), msg, Toast.LENGTH_LONG).show();
|
||||||
installHistoryPref.setTitle(R.string.install_history_and_metrics);
|
installHistoryPref.setTitle(R.string.install_history_and_metrics);
|
||||||
|
Intent intent = new Intent(getActivity(), InstallHistoryActivity.class);
|
||||||
|
intent.putExtra(InstallHistoryActivity.EXTRA_SHOW_FDROID_METRICS, true);
|
||||||
|
startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
installHistoryPref.setTitle(R.string.install_history);
|
installHistoryPref.setTitle(R.string.install_history);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user