Wrap and carry clicked slot information data for restriction page
Refresh category title by different time slot condition Bug: 177406865 Test: make SettingsRoboTests Test: make SettingsGoogleRoboTests Change-Id: I006f6825fdb471f863c0355c65bfc4ca9d980191
This commit is contained in:
@@ -113,6 +113,7 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
||||
private String mUsagePercent;
|
||||
private String mPackageName;
|
||||
private String mAppLabel;
|
||||
private String mSlotInformation;
|
||||
private int mUid;
|
||||
private int mIconId;
|
||||
private int mConsumedPower;
|
||||
@@ -124,18 +125,22 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
||||
/** Launches battery details page for an individual battery consumer. */
|
||||
public static void startBatteryDetailPage(
|
||||
Activity caller, InstrumentedPreferenceFragment fragment,
|
||||
BatteryDiffEntry diffEntry, String usagePercent) {
|
||||
BatteryDiffEntry diffEntry, String usagePercent,
|
||||
boolean isValidToShowSummary, String slotInformation) {
|
||||
final BatteryHistEntry histEntry = diffEntry.mBatteryHistEntry;
|
||||
final LaunchBatteryDetailPageArgs launchArgs = new LaunchBatteryDetailPageArgs();
|
||||
// configure the launch argument.
|
||||
launchArgs.mUsagePercent = usagePercent;
|
||||
launchArgs.mPackageName = diffEntry.getPackageName();
|
||||
launchArgs.mAppLabel = diffEntry.getAppLabel();
|
||||
launchArgs.mSlotInformation = slotInformation;
|
||||
launchArgs.mUid = (int) histEntry.mUid;
|
||||
launchArgs.mIconId = diffEntry.getAppIconId();
|
||||
launchArgs.mConsumedPower = (int) diffEntry.mConsumePower;
|
||||
launchArgs.mForegroundTimeMs = diffEntry.mForegroundUsageTimeInMs;
|
||||
launchArgs.mBackgroundTimeMs = diffEntry.mBackgroundUsageTimeInMs;
|
||||
launchArgs.mForegroundTimeMs =
|
||||
isValidToShowSummary ? diffEntry.mForegroundUsageTimeInMs : 0;
|
||||
launchArgs.mBackgroundTimeMs =
|
||||
isValidToShowSummary ? diffEntry.mBackgroundUsageTimeInMs : 0;
|
||||
launchArgs.mIsUserEntry = histEntry.isUserEntry();
|
||||
startBatteryDetailPage(caller, fragment, launchArgs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user