use of com.android.settings.fuelgauge.batterytip.BatteryTipPreferenceController.BatteryTipListener in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BatteryTipDialogFragment method onClick.
@Override
public void onClick(DialogInterface dialog, int which) {
final BatteryTipListener lsn = (BatteryTipListener) getTargetFragment();
if (lsn == null) {
return;
}
final BatteryTipAction action = BatteryTipUtils.getActionForBatteryTip(mBatteryTip, (SettingsActivity) getActivity(), (InstrumentedPreferenceFragment) getTargetFragment());
if (action != null) {
action.handlePositiveAction(mMetricsKey);
}
lsn.onBatteryTipHandled(mBatteryTip);
}
use of com.android.settings.fuelgauge.batterytip.BatteryTipPreferenceController.BatteryTipListener in project android_packages_apps_Settings by omnirom.
the class BatteryTipDialogFragment method onClick.
@Override
public void onClick(DialogInterface dialog, int which) {
final BatteryTipListener lsn = (BatteryTipListener) getTargetFragment();
if (lsn == null) {
return;
}
final BatteryTipAction action = BatteryTipUtils.getActionForBatteryTip(mBatteryTip, (SettingsActivity) getActivity(), (InstrumentedPreferenceFragment) getTargetFragment());
if (action != null) {
action.handlePositiveAction(mMetricsKey);
}
lsn.onBatteryTipHandled(mBatteryTip);
}
Aggregations