Search in sources :

Example 6 with AnomalyDialogFragment

use of com.android.settings.fuelgauge.anomaly.AnomalyDialogFragment in project platform_packages_apps_Settings by BlissRoms.

the class PowerUsageAnomalyDetails method onPreferenceTreeClick.

@Override
public boolean onPreferenceTreeClick(Preference preference) {
    if (preference instanceof AnomalyPreference) {
        AnomalyPreference anomalyPreference = (AnomalyPreference) preference;
        final Anomaly anomaly = anomalyPreference.getAnomaly();
        AnomalyDialogFragment dialogFragment = AnomalyDialogFragment.newInstance(anomaly, MetricsProto.MetricsEvent.FUELGAUGE_ANOMALY_DETAIL);
        dialogFragment.setTargetFragment(this, REQUEST_ANOMALY_ACTION);
        dialogFragment.show(getFragmentManager(), TAG);
        return true;
    }
    return super.onPreferenceTreeClick(preference);
}
Also used : AnomalyPreference(com.android.settings.fuelgauge.anomaly.AnomalyPreference) AnomalyDialogFragment(com.android.settings.fuelgauge.anomaly.AnomalyDialogFragment) Anomaly(com.android.settings.fuelgauge.anomaly.Anomaly)

Aggregations

Anomaly (com.android.settings.fuelgauge.anomaly.Anomaly)6 AnomalyDialogFragment (com.android.settings.fuelgauge.anomaly.AnomalyDialogFragment)6 AnomalyPreference (com.android.settings.fuelgauge.anomaly.AnomalyPreference)6