Search in sources :

Example 1 with AnomalySummaryPreferenceController

use of com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController in project android_packages_apps_Settings by omnirom.

the class AdvancedPowerUsageDetail method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    mPackageName = getArguments().getString(EXTRA_PACKAGE_NAME);
    mAnomalySummaryPreferenceController = new AnomalySummaryPreferenceController((SettingsActivity) getActivity(), this, MetricsEvent.FUELGAUGE_POWER_USAGE_DETAIL);
    mForegroundPreference = findPreference(KEY_PREF_FOREGROUND);
    mBackgroundPreference = findPreference(KEY_PREF_BACKGROUND);
    mPowerUsagePreference = findPreference(KEY_PREF_POWER_USAGE);
    mHeaderPreference = (LayoutPreference) findPreference(KEY_PREF_HEADER);
    if (mPackageName != null) {
        mAppEntry = mState.getEntry(mPackageName, UserHandle.myUserId());
        initAnomalyInfo();
    }
}
Also used : AnomalySummaryPreferenceController(com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController) SettingsActivity(com.android.settings.SettingsActivity)

Example 2 with AnomalySummaryPreferenceController

use of com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController in project android_packages_apps_Settings by omnirom.

the class PowerUsageSummary method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setAnimationAllowed(true);
    initFeatureProvider();
    mBatteryLayoutPref = (LayoutPreference) findPreference(KEY_BATTERY_HEADER);
    mAppListGroup = (PreferenceGroup) findPreference(KEY_APP_LIST);
    mScreenUsagePref = (PowerGaugePreference) findPreference(KEY_SCREEN_USAGE);
    mLastFullChargePref = (PowerGaugePreference) findPreference(KEY_TIME_SINCE_LAST_FULL_CHARGE);
    mFooterPreferenceMixin.createFooterPreference().setTitle(R.string.battery_footer_summary);
    mAnomalySummaryPreferenceController = new AnomalySummaryPreferenceController((SettingsActivity) getActivity(), this, MetricsEvent.FUELGAUGE_POWER_USAGE_SUMMARY);
    mBatteryUtils = BatteryUtils.getInstance(getContext());
    mAnomalySparseArray = new SparseArray<>();
    restartBatteryInfoLoader();
    restoreSavedInstance(icicle);
}
Also used : AnomalySummaryPreferenceController(com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController) SettingsActivity(com.android.settings.SettingsActivity)

Example 3 with AnomalySummaryPreferenceController

use of com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController in project android_packages_apps_Settings by crdroidandroid.

the class AdvancedPowerUsageDetail method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    mPackageName = getArguments().getString(EXTRA_PACKAGE_NAME);
    mAnomalySummaryPreferenceController = new AnomalySummaryPreferenceController((SettingsActivity) getActivity(), this, MetricsEvent.FUELGAUGE_POWER_USAGE_DETAIL);
    mForegroundPreference = findPreference(KEY_PREF_FOREGROUND);
    mBackgroundPreference = findPreference(KEY_PREF_BACKGROUND);
    mPowerUsagePreference = findPreference(KEY_PREF_POWER_USAGE);
    mHeaderPreference = (LayoutPreference) findPreference(KEY_PREF_HEADER);
    if (mPackageName != null) {
        mAppEntry = mState.getEntry(mPackageName, UserHandle.myUserId());
        initAnomalyInfo();
    }
}
Also used : AnomalySummaryPreferenceController(com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController) SettingsActivity(com.android.settings.SettingsActivity)

Example 4 with AnomalySummaryPreferenceController

use of com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController in project android_packages_apps_Settings by SudaMod.

the class PowerUsageSummary method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setAnimationAllowed(true);
    initFeatureProvider();
    mBatteryLayoutPref = (LayoutPreference) findPreference(KEY_BATTERY_HEADER);
    mAppListGroup = (PreferenceGroup) findPreference(KEY_APP_LIST);
    mScreenUsagePref = (PowerGaugePreference) findPreference(KEY_SCREEN_USAGE);
    mLastFullChargePref = (PowerGaugePreference) findPreference(KEY_TIME_SINCE_LAST_FULL_CHARGE);
    mFooterPreferenceMixin.createFooterPreference().setTitle(R.string.battery_footer_summary);
    mAnomalySummaryPreferenceController = new AnomalySummaryPreferenceController((SettingsActivity) getActivity(), this, MetricsEvent.FUELGAUGE_POWER_USAGE_SUMMARY);
    mBatteryUtils = BatteryUtils.getInstance(getContext());
    mAnomalySparseArray = new SparseArray<>();
    restartBatteryInfoLoader();
    restoreSavedInstance(icicle);
}
Also used : AnomalySummaryPreferenceController(com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController) SettingsActivity(com.android.settings.SettingsActivity)

Example 5 with AnomalySummaryPreferenceController

use of com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController in project android_packages_apps_Settings by DirtyUnicorns.

the class AdvancedPowerUsageDetail method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    mPackageName = getArguments().getString(EXTRA_PACKAGE_NAME);
    mAnomalySummaryPreferenceController = new AnomalySummaryPreferenceController((SettingsActivity) getActivity(), this, MetricsEvent.FUELGAUGE_POWER_USAGE_DETAIL);
    mForegroundPreference = findPreference(KEY_PREF_FOREGROUND);
    mBackgroundPreference = findPreference(KEY_PREF_BACKGROUND);
    mPowerUsagePreference = findPreference(KEY_PREF_POWER_USAGE);
    mHeaderPreference = (LayoutPreference) findPreference(KEY_PREF_HEADER);
    if (mPackageName != null) {
        mAppEntry = mState.getEntry(mPackageName, UserHandle.myUserId());
        initAnomalyInfo();
    }
}
Also used : AnomalySummaryPreferenceController(com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController) SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

SettingsActivity (com.android.settings.SettingsActivity)12 AnomalySummaryPreferenceController (com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController)12