diff options
-rw-r--r-- | cmds/statsd/src/atoms.proto | 12 | ||||
-rw-r--r-- | cmds/statsd/src/external/StatsCompanionServicePuller.cpp | 2 | ||||
-rw-r--r-- | cmds/statsd/src/external/StatsPullerManager.cpp | 3 | ||||
-rw-r--r-- | core/java/android/os/StatsLogEventWrapper.java | 23 | ||||
-rw-r--r-- | core/java/com/android/internal/os/PowerProfile.java | 178 | ||||
-rw-r--r-- | core/proto/android/internal/powerprofile.proto | 111 | ||||
-rw-r--r-- | libs/services/include/android/os/StatsLogEventWrapper.h | 5 | ||||
-rw-r--r-- | libs/services/src/os/StatsLogEventWrapper.cpp | 3 | ||||
-rw-r--r-- | services/core/java/com/android/server/stats/StatsCompanionService.java | 53 |
9 files changed, 378 insertions, 12 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 988ffc4d95b7..8ab67e32cd59 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -31,6 +31,7 @@ import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; import "frameworks/base/proto/src/stats_enums.proto"; import "frameworks/base/core/proto/android/service/procstats.proto"; +import "frameworks/base/core/proto/android/internal/powerprofile.proto"; /** * The master atom class. This message defines all of the available @@ -175,10 +176,11 @@ message Atom { DirectoryUsage directory_usage = 10026; AppSize app_size = 10027; CategorySize category_size = 10028; + ProcStats proc_stats = 10029; BatteryVoltage battery_voltage = 10030; NumFingerprints num_fingerprints = 10031; - ProcStats proc_stats = 10029; DiskIo disk_io = 10032; + PowerProfile power_profile = 10033; } // DO NOT USE field numbers above 100,000 in AOSP. @@ -2665,3 +2667,11 @@ message NumFingerprints { message ProcStats { optional android.service.procstats.ProcessStatsSectionProto proc_stats_section = 1; } + +/** + * power_profile.xml and other constants for power model calculations. + * Pulled from PowerProfile.java + */ +message PowerProfile { + optional com.android.internal.os.PowerProfileProto power_profile_proto = 1; +}
\ No newline at end of file diff --git a/cmds/statsd/src/external/StatsCompanionServicePuller.cpp b/cmds/statsd/src/external/StatsCompanionServicePuller.cpp index 6d7bba028974..3eb05a90e3b4 100644 --- a/cmds/statsd/src/external/StatsCompanionServicePuller.cpp +++ b/cmds/statsd/src/external/StatsCompanionServicePuller.cpp @@ -54,7 +54,7 @@ bool StatsCompanionServicePuller::PullInternal(vector<shared_ptr<LogEvent> >* da vector<StatsLogEventWrapper> returned_value; Status status = statsCompanionServiceCopy->pullData(mTagId, &returned_value); if (!status.isOk()) { - ALOGW("StatsCompanionServicePuller::pull failed to pull for %d", mTagId); + ALOGW("StatsCompanionServicePuller::pull failed for %d", mTagId); return false; } data->clear(); diff --git a/cmds/statsd/src/external/StatsPullerManager.cpp b/cmds/statsd/src/external/StatsPullerManager.cpp index fd8671406051..cd215b4bd705 100644 --- a/cmds/statsd/src/external/StatsPullerManager.cpp +++ b/cmds/statsd/src/external/StatsPullerManager.cpp @@ -217,6 +217,9 @@ const std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = { {}, 3 * NS_PER_SEC, new StatsCompanionServicePuller(android::util::DISK_IO)}}, + // PowerProfile constants for power model calculations. + {android::util::POWER_PROFILE, + {{}, {}, 1 * NS_PER_SEC, new StatsCompanionServicePuller(android::util::POWER_PROFILE)}}, }; StatsPullerManager::StatsPullerManager() : mNextPullTimeNs(NO_ALARM_UPDATE) { diff --git a/core/java/android/os/StatsLogEventWrapper.java b/core/java/android/os/StatsLogEventWrapper.java index 051ab75c857c..72e1ab972846 100644 --- a/core/java/android/os/StatsLogEventWrapper.java +++ b/core/java/android/os/StatsLogEventWrapper.java @@ -70,11 +70,17 @@ public final class StatsLogEventWrapper implements Parcelable { } }; + /** + * Write a int value. + */ public void writeInt(int val) { mTypes.add(EVENT_TYPE_INT); mValues.add(val); } + /** + * Write a long value. + */ public void writeLong(long val) { mTypes.add(EVENT_TYPE_LONG); mValues.add(val); @@ -89,12 +95,23 @@ public final class StatsLogEventWrapper implements Parcelable { mValues.add(val == null ? "" : val); } + /** + * Write a float value. + */ public void writeFloat(float val) { mTypes.add(EVENT_TYPE_FLOAT); mValues.add(val); } /** + * Write a double value. + */ + public void writeDouble(double val) { + mTypes.add(EVENT_TYPE_DOUBLE); + mValues.add(val); + } + + /** * Write a storage value. */ public void writeStorage(byte[] val) { @@ -102,6 +119,9 @@ public final class StatsLogEventWrapper implements Parcelable { mValues.add(val); } + /** + * Write a boolean value. + */ public void writeBoolean(boolean val) { mTypes.add(EVENT_TYPE_INT); mValues.add(val ? 1 : 0); @@ -134,6 +154,9 @@ public final class StatsLogEventWrapper implements Parcelable { case EVENT_TYPE_FLOAT: out.writeFloat((float) mValues.get(i)); break; + case EVENT_TYPE_DOUBLE: + out.writeDouble((double) mValues.get(i)); + break; case EVENT_TYPE_STRING: out.writeString((String) mValues.get(i)); break; diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java index 997b722681ba..8338d78af3a1 100644 --- a/core/java/com/android/internal/os/PowerProfile.java +++ b/core/java/com/android/internal/os/PowerProfile.java @@ -21,6 +21,7 @@ import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.res.Resources; import android.content.res.XmlResourceParser; +import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.XmlUtils; @@ -501,4 +502,181 @@ public class PowerProfile { public double getBatteryCapacity() { return getAveragePower(POWER_BATTERY_CAPACITY); } + + /** + * Dump power constants into PowerProfileProto + */ + public void writeToProto(ProtoOutputStream proto) { + // cpu.suspend + writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND); + + // cpu.idle + writePowerConstantToProto(proto, POWER_CPU_IDLE, PowerProfileProto.CPU_IDLE); + + // cpu.active + writePowerConstantToProto(proto, POWER_CPU_ACTIVE, PowerProfileProto.CPU_ACTIVE); + + // cpu.clusters.cores + // cpu.cluster_power.cluster + // cpu.core_speeds.cluster + // cpu.core_power.cluster + for (int cluster = 0; cluster < mCpuClusters.length; cluster++) { + final long token = proto.start(PowerProfileProto.CPU_CLUSTER); + proto.write(PowerProfileProto.CpuCluster.ID, cluster); + proto.write(PowerProfileProto.CpuCluster.CLUSTER_POWER, + sPowerItemMap.get(mCpuClusters[cluster].clusterPowerKey)); + proto.write(PowerProfileProto.CpuCluster.CORES, mCpuClusters[cluster].numCpus); + for (Double speed : sPowerArrayMap.get(mCpuClusters[cluster].freqKey)) { + proto.write(PowerProfileProto.CpuCluster.SPEED, speed); + } + for (Double corePower : sPowerArrayMap.get(mCpuClusters[cluster].corePowerKey)) { + proto.write(PowerProfileProto.CpuCluster.CORE_POWER, corePower); + } + proto.end(token); + } + + // wifi.scan + writePowerConstantToProto(proto, POWER_WIFI_SCAN, PowerProfileProto.WIFI_SCAN); + + // wifi.on + writePowerConstantToProto(proto, POWER_WIFI_ON, PowerProfileProto.WIFI_ON); + + // wifi.active + writePowerConstantToProto(proto, POWER_WIFI_ACTIVE, PowerProfileProto.WIFI_ACTIVE); + + // wifi.controller.idle + writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_IDLE, + PowerProfileProto.WIFI_CONTROLLER_IDLE); + + // wifi.controller.rx + writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_RX, + PowerProfileProto.WIFI_CONTROLLER_RX); + + // wifi.controller.tx + writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_TX, + PowerProfileProto.WIFI_CONTROLLER_TX); + + // wifi.controller.tx_levels + writePowerConstantArrayToProto(proto, POWER_WIFI_CONTROLLER_TX_LEVELS, + PowerProfileProto.WIFI_CONTROLLER_TX_LEVELS); + + // wifi.controller.voltage + writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE, + PowerProfileProto.WIFI_CONTROLLER_OPERATING_VOLTAGE); + + // bluetooth.controller.idle + writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_IDLE, + PowerProfileProto.BLUETOOTH_CONTROLLER_IDLE); + + // bluetooth.controller.rx + writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_RX, + PowerProfileProto.BLUETOOTH_CONTROLLER_RX); + + // bluetooth.controller.tx + writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_TX, + PowerProfileProto.BLUETOOTH_CONTROLLER_TX); + + // bluetooth.controller.voltage + writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE, + PowerProfileProto.BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE); + + // modem.controller.sleep + writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_SLEEP, + PowerProfileProto.MODEM_CONTROLLER_SLEEP); + + // modem.controller.idle + writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_IDLE, + PowerProfileProto.MODEM_CONTROLLER_IDLE); + + // modem.controller.rx + writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_RX, + PowerProfileProto.MODEM_CONTROLLER_RX); + + // modem.controller.tx + writePowerConstantArrayToProto(proto, POWER_MODEM_CONTROLLER_TX, + PowerProfileProto.MODEM_CONTROLLER_TX); + + // modem.controller.voltage + writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE, + PowerProfileProto.MODEM_CONTROLLER_OPERATING_VOLTAGE); + + // gps.on + writePowerConstantToProto(proto, POWER_GPS_ON, PowerProfileProto.GPS_ON); + + // gps.signalqualitybased + writePowerConstantArrayToProto(proto, POWER_GPS_SIGNAL_QUALITY_BASED, + PowerProfileProto.GPS_SIGNAL_QUALITY_BASED); + + // gps.voltage + writePowerConstantToProto(proto, POWER_GPS_OPERATING_VOLTAGE, + PowerProfileProto.GPS_OPERATING_VOLTAGE); + + // bluetooth.on + writePowerConstantToProto(proto, POWER_BLUETOOTH_ON, PowerProfileProto.BLUETOOTH_ON); + + // bluetooth.active + writePowerConstantToProto(proto, POWER_BLUETOOTH_ACTIVE, + PowerProfileProto.BLUETOOTH_ACTIVE); + + // bluetooth.at + writePowerConstantToProto(proto, POWER_BLUETOOTH_AT_CMD, + PowerProfileProto.BLUETOOTH_AT_CMD); + + // ambient.on + writePowerConstantToProto(proto, POWER_AMBIENT_DISPLAY, PowerProfileProto.AMBIENT_DISPLAY); + + // screen.on + writePowerConstantToProto(proto, POWER_SCREEN_ON, PowerProfileProto.SCREEN_ON); + + // radio.on + writePowerConstantToProto(proto, POWER_RADIO_ON, PowerProfileProto.RADIO_ON); + + // radio.scanning + writePowerConstantToProto(proto, POWER_RADIO_SCANNING, PowerProfileProto.RADIO_SCANNING); + + // radio.active + writePowerConstantToProto(proto, POWER_RADIO_ACTIVE, PowerProfileProto.RADIO_ACTIVE); + + // screen.full + writePowerConstantToProto(proto, POWER_SCREEN_FULL, PowerProfileProto.SCREEN_FULL); + + // audio + writePowerConstantToProto(proto, POWER_AUDIO, PowerProfileProto.AUDIO); + + // video + writePowerConstantToProto(proto, POWER_VIDEO, PowerProfileProto.VIDEO); + + // camera.flashlight + writePowerConstantToProto(proto, POWER_FLASHLIGHT, PowerProfileProto.FLASHLIGHT); + + // memory.bandwidths + writePowerConstantToProto(proto, POWER_MEMORY, PowerProfileProto.MEMORY); + + // camera.avg + writePowerConstantToProto(proto, POWER_CAMERA, PowerProfileProto.CAMERA); + + // wifi.batchedscan + writePowerConstantToProto(proto, POWER_WIFI_BATCHED_SCAN, + PowerProfileProto.WIFI_BATCHED_SCAN); + + // battery.capacity + writePowerConstantToProto(proto, POWER_BATTERY_CAPACITY, + PowerProfileProto.BATTERY_CAPACITY); + } + + // Writes items in sPowerItemMap to proto if exists. + private void writePowerConstantToProto(ProtoOutputStream proto, String key, long fieldId) { + if (sPowerItemMap.containsKey(key)) { + proto.write(fieldId, sPowerItemMap.get(key)); + } + } + + // Writes items in sPowerArrayMap to proto if exists. + private void writePowerConstantArrayToProto(ProtoOutputStream proto, String key, long fieldId) { + if (sPowerArrayMap.containsKey(key)) { + for (Double d : sPowerArrayMap.get(key)) { + proto.write(fieldId, d); + } + } + } } diff --git a/core/proto/android/internal/powerprofile.proto b/core/proto/android/internal/powerprofile.proto new file mode 100644 index 000000000000..9dd5e7ee556c --- /dev/null +++ b/core/proto/android/internal/powerprofile.proto @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto2"; +package com.android.internal.os; + +option java_multiple_files = true; + +// next: 41 +message PowerProfileProto { + optional double cpu_suspend = 1; + + optional double cpu_idle = 2; + + optional double cpu_active = 3; + + message CpuCluster { + optional int32 id = 1; + optional double cluster_power = 2; + optional int32 cores = 3; + repeated int64 speed = 4; + repeated double core_power = 5; + } + + repeated CpuCluster cpu_cluster = 41; + + optional double wifi_scan = 4; + + optional double wifi_on = 5; + + optional double wifi_active = 6; + + optional double wifi_controller_idle = 7; + + optional double wifi_controller_rx = 8; + + optional double wifi_controller_tx = 9; + + repeated double wifi_controller_tx_levels = 10; + + optional double wifi_controller_operating_voltage = 11; + + optional double bluetooth_controller_idle = 12; + + optional double bluetooth_controller_rx = 13; + + optional double bluetooth_controller_tx = 14; + + optional double bluetooth_controller_operating_voltage = 15; + + optional double modem_controller_sleep = 16; + + optional double modem_controller_idle = 17; + + optional double modem_controller_rx = 18; + + repeated double modem_controller_tx = 19; + + optional double modem_controller_operating_voltage = 20; + + optional double gps_on = 21; + + repeated double gps_signal_quality_based = 22; + + optional double gps_operating_voltage = 23; + + optional double bluetooth_on = 24; + + optional double bluetooth_active = 25; + + optional double bluetooth_at_cmd = 26; + + optional double ambient_display = 27; + + optional double screen_on = 29; + + optional double radio_on = 30; + + optional double radio_scanning = 31; + + optional double radio_active = 32; + + optional double screen_full = 33; + + optional double audio = 34; + + optional double video = 35; + + optional double flashlight = 36; + + optional double memory = 37; + + optional double camera = 38; + + optional double wifi_batched_scan = 39; + + optional double battery_capacity = 40; +} diff --git a/libs/services/include/android/os/StatsLogEventWrapper.h b/libs/services/include/android/os/StatsLogEventWrapper.h index 52cb75e8e639..f60c338bf9c4 100644 --- a/libs/services/include/android/os/StatsLogEventWrapper.h +++ b/libs/services/include/android/os/StatsLogEventWrapper.h @@ -58,6 +58,11 @@ struct StatsLogValue { type = FLOAT; } + StatsLogValue(double v) { + double_value = v; + type = DOUBLE; + } + StatsLogValue(const std::string& v) { str_value = v; type = STRING; diff --git a/libs/services/src/os/StatsLogEventWrapper.cpp b/libs/services/src/os/StatsLogEventWrapper.cpp index 04c4629b5432..a1a6d9fe0e22 100644 --- a/libs/services/src/os/StatsLogEventWrapper.cpp +++ b/libs/services/src/os/StatsLogEventWrapper.cpp @@ -85,6 +85,9 @@ status_t StatsLogEventWrapper::readFromParcel(const Parcel* in) { case StatsLogValue::FLOAT: mElements.push_back(StatsLogValue(in->readFloat())); break; + case StatsLogValue::DOUBLE: + mElements.push_back(StatsLogValue(in->readDouble())); + break; case StatsLogValue::STORAGE: mElements.push_back(StatsLogValue()); mElements.back().setType(StatsLogValue::STORAGE); diff --git a/services/core/java/com/android/server/stats/StatsCompanionService.java b/services/core/java/com/android/server/stats/StatsCompanionService.java index d0de9409c49e..97992cf1232b 100644 --- a/services/core/java/com/android/server/stats/StatsCompanionService.java +++ b/services/core/java/com/android/server/stats/StatsCompanionService.java @@ -15,6 +15,8 @@ */ package com.android.server.stats; +import static com.android.internal.util.Preconditions.checkNotNull; + import android.annotation.Nullable; import android.app.ActivityManagerInternal; import android.app.AlarmManager; @@ -67,6 +69,7 @@ import android.util.ArrayMap; import android.util.Log; import android.util.Slog; import android.util.StatsLog; +import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.GuardedBy; import com.android.internal.app.procstats.IProcessStats; @@ -1336,12 +1339,28 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } } + private void pullPowerProfile( + int tagId, long elapsedNanos, long wallClockNanos, + List<StatsLogEventWrapper> pulledData) { + PowerProfile powerProfile = new PowerProfile(mContext); + checkNotNull(powerProfile); + + StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, + wallClockNanos); + ProtoOutputStream proto = new ProtoOutputStream(); + powerProfile.writeToProto(proto); + proto.flush(); + e.writeStorage(proto.getBytes()); + pulledData.add(e); + } + private void pullDiskIo(int tagId, long elapsedNanos, final long wallClockNanos, List<StatsLogEventWrapper> pulledData) { mStoragedUidIoStatsReader.readAbsolute((uid, fgCharsRead, fgCharsWrite, fgBytesRead, fgBytesWrite, bgCharsRead, bgCharsWrite, bgBytesRead, bgBytesWrite, fgFsync, bgFsync) -> { - StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos); + StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, + wallClockNanos); e.writeInt(uid); e.writeLong(fgCharsRead); e.writeLong(fgCharsWrite); @@ -1478,6 +1497,10 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { pullDiskIo(tagId, elapsedNanos, wallClockNanos, ret); break; } + case StatsLog.POWER_PROFILE: { + pullPowerProfile(tagId, elapsedNanos, wallClockNanos, ret); + break; + } default: Slog.w(TAG, "No such tagId data as " + tagId); return null; @@ -1539,7 +1562,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { public void onStart() { mStatsCompanionService = new StatsCompanionService(getContext()); try { - publishBinderService(Context.STATS_COMPANION_SERVICE, mStatsCompanionService); + publishBinderService(Context.STATS_COMPANION_SERVICE, + mStatsCompanionService); if (DEBUG) Slog.d(TAG, "Published " + Context.STATS_COMPANION_SERVICE); } catch (Exception e) { Slog.e(TAG, "Failed to publishBinderService", e); @@ -1564,18 +1588,22 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { } /** - * Tells statsd that statscompanion is ready. If the binder call returns, link to statsd. + * Tells statsd that statscompanion is ready. If the binder call returns, link to + * statsd. */ private void sayHiToStatsd() { synchronized (sStatsdLock) { if (sStatsd != null) { Slog.e(TAG, "Trying to fetch statsd, but it was already fetched", - new IllegalStateException("sStatsd is not null when being fetched")); + new IllegalStateException( + "sStatsd is not null when being fetched")); return; } sStatsd = fetchStatsdService(); if (sStatsd == null) { - Slog.i(TAG, "Could not yet find statsd to tell it that StatsCompanion is alive."); + Slog.i(TAG, + "Could not yet find statsd to tell it that StatsCompanion is " + + "alive."); return; } if (DEBUG) Slog.d(TAG, "Saying hi to statsd"); @@ -1593,10 +1621,12 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { filter.addAction(Intent.ACTION_PACKAGE_ADDED); filter.addAction(Intent.ACTION_PACKAGE_REMOVED); filter.addDataScheme("package"); - mContext.registerReceiverAsUser(mAppUpdateReceiver, UserHandle.ALL, filter, null, + mContext.registerReceiverAsUser(mAppUpdateReceiver, UserHandle.ALL, filter, + null, null); - // Setup receiver for user initialize (which happens once for a new user) and + // Setup receiver for user initialize (which happens once for a new user) + // and // if a user is removed. filter = new IntentFilter(Intent.ACTION_USER_INITIALIZE); filter.addAction(Intent.ACTION_USER_REMOVED); @@ -1610,7 +1640,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { mShutdownEventReceiver, UserHandle.ALL, filter, null, null); final long token = Binder.clearCallingIdentity(); try { - // Pull the latest state of UID->app name, version mapping when statsd starts. + // Pull the latest state of UID->app name, version mapping when + // statsd starts. informAllUidsLocked(mContext); } finally { restoreCallingIdentity(token); @@ -1672,7 +1703,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { if (!DumpUtils.checkDumpPermission(mContext, TAG, writer)) return; synchronized (sStatsdLock) { - writer.println("Number of configuration files deleted: " + mDeletedFiles.size()); + writer.println( + "Number of configuration files deleted: " + mDeletedFiles.size()); if (mDeletedFiles.size() > 0) { writer.println(" timestamp, deleted file name"); } @@ -1680,7 +1712,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub { SystemClock.currentThreadTimeMillis() - SystemClock.elapsedRealtime(); for (Long elapsedMillis : mDeletedFiles.keySet()) { long deletionMillis = lastBootMillis + elapsedMillis; - writer.println(" " + deletionMillis + ", " + mDeletedFiles.get(elapsedMillis)); + writer.println( + " " + deletionMillis + ", " + mDeletedFiles.get(elapsedMillis)); } } } |