am 9f8cc518
: Merge "Adjust activity manager process OOM adj." into kraken
Merge commit '9f8cc518e14c7a34bc52da712afbf02d84585f67' into gingerbread-plus-aosp * commit '9f8cc518e14c7a34bc52da712afbf02d84585f67': Adjust activity manager process OOM adj.
This commit is contained in:
@ -21763,7 +21763,18 @@
|
|||||||
type="int"
|
type="int"
|
||||||
transient="false"
|
transient="false"
|
||||||
volatile="false"
|
volatile="false"
|
||||||
value="150"
|
value="170"
|
||||||
|
static="true"
|
||||||
|
final="true"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
</field>
|
||||||
|
<field name="IMPORTANCE_PERCEPTIBLE"
|
||||||
|
type="int"
|
||||||
|
transient="false"
|
||||||
|
volatile="false"
|
||||||
|
value="130"
|
||||||
static="true"
|
static="true"
|
||||||
final="true"
|
final="true"
|
||||||
deprecated="not deprecated"
|
deprecated="not deprecated"
|
||||||
|
@ -726,16 +726,24 @@ public class ActivityManager {
|
|||||||
public static final int IMPORTANCE_FOREGROUND = 100;
|
public static final int IMPORTANCE_FOREGROUND = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for {@link #importance}: this process is running a
|
* Constant for {@link #importance}: this process is running something
|
||||||
* heavy-weight application and thus should not be killed.
|
* that is actively visible to the user, though not in the immediate
|
||||||
|
* foreground.
|
||||||
*/
|
*/
|
||||||
public static final int IMPORTANCE_HEAVY_WEIGHT = 150;
|
public static final int IMPORTANCE_VISIBLE = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for {@link #importance}: this process is running something
|
* Constant for {@link #importance}: this process is running something
|
||||||
* that is considered to be actively visible to the user.
|
* that is considered to be actively perceptible to the user. An
|
||||||
|
* example would be an application performing background music playback.
|
||||||
*/
|
*/
|
||||||
public static final int IMPORTANCE_VISIBLE = 200;
|
public static final int IMPORTANCE_PERCEPTIBLE = 130;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constant for {@link #importance}: this process is running a
|
||||||
|
* heavy-weight application and thus should not be killed.
|
||||||
|
*/
|
||||||
|
public static final int IMPORTANCE_HEAVY_WEIGHT = 170;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant for {@link #importance}: this process is contains services
|
* Constant for {@link #importance}: this process is contains services
|
||||||
|
@ -51,50 +51,36 @@ public abstract class BatteryStats implements Parcelable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a sensor timer.
|
* A constant indicating a sensor timer.
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int SENSOR = 3;
|
public static final int SENSOR = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a a wifi turn on timer
|
* A constant indicating a a wifi turn on timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int WIFI_TURNED_ON = 4;
|
public static final int WIFI_TURNED_ON = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a full wifi lock timer
|
* A constant indicating a full wifi lock timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int FULL_WIFI_LOCK = 5;
|
public static final int FULL_WIFI_LOCK = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a scan wifi lock timer
|
* A constant indicating a scan wifi lock timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int SCAN_WIFI_LOCK = 6;
|
public static final int SCAN_WIFI_LOCK = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a wifi multicast timer
|
* A constant indicating a wifi multicast timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int WIFI_MULTICAST_ENABLED = 7;
|
public static final int WIFI_MULTICAST_ENABLED = 7;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating an audio turn on timer
|
* A constant indicating an audio turn on timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int AUDIO_TURNED_ON = 7;
|
public static final int AUDIO_TURNED_ON = 7;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constant indicating a video turn on timer
|
* A constant indicating a video turn on timer
|
||||||
*
|
|
||||||
* {@hide}
|
|
||||||
*/
|
*/
|
||||||
public static final int VIDEO_TURNED_ON = 8;
|
public static final int VIDEO_TURNED_ON = 8;
|
||||||
|
|
||||||
@ -391,6 +377,61 @@ public abstract class BatteryStats implements Parcelable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class BatteryHistoryRecord implements Parcelable {
|
||||||
|
public BatteryHistoryRecord next;
|
||||||
|
|
||||||
|
public long time;
|
||||||
|
public byte batteryLevel;
|
||||||
|
|
||||||
|
public static final int STATE_SCREEN_MASK = 0x000000f;
|
||||||
|
public static final int STATE_SCREEN_SHIFT = 0;
|
||||||
|
public static final int STATE_SIGNAL_STRENGTH_MASK = 0x00000f0;
|
||||||
|
public static final int STATE_SIGNAL_STRENGTH_SHIFT = 4;
|
||||||
|
public static final int STATE_PHONE_STATE_MASK = 0x0000f00;
|
||||||
|
public static final int STATE_PHONE_STATE_SHIFT = 8;
|
||||||
|
public static final int STATE_DATA_CONNECTION_MASK = 0x000f000;
|
||||||
|
public static final int STATE_DATA_CONNECTION_SHIFT = 12;
|
||||||
|
|
||||||
|
public static final int STATE_BATTERY_PLUGGED_FLAG = 1<<30;
|
||||||
|
public static final int STATE_SCREEN_ON_FLAG = 1<<29;
|
||||||
|
public static final int STATE_GPS_ON_FLAG = 1<<28;
|
||||||
|
public static final int STATE_PHONE_ON_FLAG = 1<<27;
|
||||||
|
public static final int STATE_WIFI_ON_FLAG = 1<<26;
|
||||||
|
public static final int STATE_WIFI_RUNNING_FLAG = 1<<25;
|
||||||
|
public static final int STATE_WIFI_FULL_LOCK_FLAG = 1<<24;
|
||||||
|
public static final int STATE_WIFI_SCAN_LOCK_FLAG = 1<<23;
|
||||||
|
public static final int STATE_WIFI_MULTICAST_ON_FLAG = 1<<22;
|
||||||
|
public static final int STATE_BLUETOOTH_ON_FLAG = 1<<21;
|
||||||
|
public static final int STATE_AUDIO_ON_FLAG = 1<<20;
|
||||||
|
public static final int STATE_VIDEO_ON_FLAG = 1<<19;
|
||||||
|
|
||||||
|
public int states;
|
||||||
|
|
||||||
|
public BatteryHistoryRecord() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public BatteryHistoryRecord(long time, Parcel src) {
|
||||||
|
this.time = time;
|
||||||
|
batteryLevel = (byte)src.readInt();
|
||||||
|
states = src.readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
dest.writeLong(time);
|
||||||
|
dest.writeInt(batteryLevel);
|
||||||
|
dest.writeInt(states);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current history of battery state changes.
|
||||||
|
*/
|
||||||
|
public abstract BatteryHistoryRecord getHistory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of times the device has been started.
|
* Returns the number of times the device has been started.
|
||||||
*/
|
*/
|
||||||
@ -1443,6 +1484,20 @@ public abstract class BatteryStats implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public void dumpLocked(PrintWriter pw) {
|
public void dumpLocked(PrintWriter pw) {
|
||||||
|
BatteryHistoryRecord rec = getHistory();
|
||||||
|
if (rec != null) {
|
||||||
|
pw.println("Battery History:");
|
||||||
|
while (rec != null) {
|
||||||
|
pw.print(" ");
|
||||||
|
pw.print(rec.time);
|
||||||
|
pw.print(" ");
|
||||||
|
pw.print(rec.batteryLevel);
|
||||||
|
pw.print(" ");
|
||||||
|
pw.println(Integer.toHexString(rec.states));
|
||||||
|
rec = rec.next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pw.println("Total Statistics (Current and Historic):");
|
pw.println("Total Statistics (Current and Historic):");
|
||||||
pw.println(" System starts: " + getStartCount()
|
pw.println(" System starts: " + getStartCount()
|
||||||
+ ", currently on battery: " + getIsOnBattery());
|
+ ", currently on battery: " + getIsOnBattery());
|
||||||
|
@ -56,12 +56,13 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
public final class BatteryStatsImpl extends BatteryStats {
|
public final class BatteryStatsImpl extends BatteryStats {
|
||||||
private static final String TAG = "BatteryStatsImpl";
|
private static final String TAG = "BatteryStatsImpl";
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
|
private static final boolean DEBUG_HISTORY = false;
|
||||||
|
|
||||||
// In-memory Parcel magic number, used to detect attempts to unmarshall bad data
|
// In-memory Parcel magic number, used to detect attempts to unmarshall bad data
|
||||||
private static final int MAGIC = 0xBA757475; // 'BATSTATS'
|
private static final int MAGIC = 0xBA757475; // 'BATSTATS'
|
||||||
|
|
||||||
// Current on-disk Parcel version
|
// Current on-disk Parcel version
|
||||||
private static final int VERSION = 43;
|
private static final int VERSION = 44;
|
||||||
|
|
||||||
// The maximum number of names wakelocks we will keep track of
|
// The maximum number of names wakelocks we will keep track of
|
||||||
// per uid; once the limit is reached, we batch the remaining wakelocks
|
// per uid; once the limit is reached, we batch the remaining wakelocks
|
||||||
@ -94,6 +95,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
// is unplugged from power.
|
// is unplugged from power.
|
||||||
final ArrayList<Unpluggable> mUnpluggables = new ArrayList<Unpluggable>();
|
final ArrayList<Unpluggable> mUnpluggables = new ArrayList<Unpluggable>();
|
||||||
|
|
||||||
|
BatteryHistoryRecord mHistory;
|
||||||
|
BatteryHistoryRecord mHistoryEnd;
|
||||||
|
BatteryHistoryRecord mHistoryCache;
|
||||||
|
final BatteryHistoryRecord mHistoryCur = new BatteryHistoryRecord();
|
||||||
|
|
||||||
int mStartCount;
|
int mStartCount;
|
||||||
|
|
||||||
long mBatteryUptime;
|
long mBatteryUptime;
|
||||||
@ -1042,6 +1048,37 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
mBtHeadset = headset;
|
mBtHeadset = headset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addHistoryRecord(long curTime) {
|
||||||
|
BatteryHistoryRecord rec = mHistoryCache;
|
||||||
|
if (rec != null) {
|
||||||
|
mHistoryCache = rec.next;
|
||||||
|
} else {
|
||||||
|
rec = new BatteryHistoryRecord();
|
||||||
|
}
|
||||||
|
rec.time = curTime;
|
||||||
|
rec.batteryLevel = mHistoryCur.batteryLevel;
|
||||||
|
rec.states = mHistoryCur.states;
|
||||||
|
addHistoryRecord(rec);
|
||||||
|
}
|
||||||
|
|
||||||
|
void addHistoryRecord(BatteryHistoryRecord rec) {
|
||||||
|
rec.next = null;
|
||||||
|
if (mHistoryEnd != null) {
|
||||||
|
mHistoryEnd.next = rec;
|
||||||
|
mHistoryEnd = rec;
|
||||||
|
} else {
|
||||||
|
mHistory = mHistoryEnd = rec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearHistory() {
|
||||||
|
if (mHistory != null) {
|
||||||
|
mHistoryEnd.next = mHistoryCache;
|
||||||
|
mHistoryCache = mHistory;
|
||||||
|
mHistory = mHistoryEnd = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void doUnplug(long batteryUptime, long batteryRealtime) {
|
public void doUnplug(long batteryUptime, long batteryRealtime) {
|
||||||
for (int iu = mUidStats.size() - 1; iu >= 0; iu--) {
|
for (int iu = mUidStats.size() - 1; iu >= 0; iu--) {
|
||||||
Uid u = mUidStats.valueAt(iu);
|
Uid u = mUidStats.valueAt(iu);
|
||||||
@ -1094,16 +1131,37 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
mBluetoothPingStart = -1;
|
mBluetoothPingStart = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mGpsNesting;
|
||||||
|
|
||||||
public void noteStartGps(int uid) {
|
public void noteStartGps(int uid) {
|
||||||
|
if (mGpsNesting == 0) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_GPS_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Start GPS to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
|
mGpsNesting++;
|
||||||
getUidStatsLocked(uid).noteStartGps();
|
getUidStatsLocked(uid).noteStartGps();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noteStopGps(int uid) {
|
public void noteStopGps(int uid) {
|
||||||
|
mGpsNesting--;
|
||||||
|
if (mGpsNesting == 0) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_GPS_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Stop GPS to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
getUidStatsLocked(uid).noteStopGps();
|
getUidStatsLocked(uid).noteStopGps();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noteScreenOnLocked() {
|
public void noteScreenOnLocked() {
|
||||||
if (!mScreenOn) {
|
if (!mScreenOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_SCREEN_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Screen on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
mGpsNesting++;
|
||||||
mScreenOn = true;
|
mScreenOn = true;
|
||||||
mScreenOnTimer.startRunningLocked(this);
|
mScreenOnTimer.startRunningLocked(this);
|
||||||
if (mScreenBrightnessBin >= 0) {
|
if (mScreenBrightnessBin >= 0) {
|
||||||
@ -1114,6 +1172,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteScreenOffLocked() {
|
public void noteScreenOffLocked() {
|
||||||
if (mScreenOn) {
|
if (mScreenOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_SCREEN_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Screen off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mScreenOn = false;
|
mScreenOn = false;
|
||||||
mScreenOnTimer.stopRunningLocked(this);
|
mScreenOnTimer.stopRunningLocked(this);
|
||||||
if (mScreenBrightnessBin >= 0) {
|
if (mScreenBrightnessBin >= 0) {
|
||||||
@ -1128,6 +1190,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
if (bin < 0) bin = 0;
|
if (bin < 0) bin = 0;
|
||||||
else if (bin >= NUM_SCREEN_BRIGHTNESS_BINS) bin = NUM_SCREEN_BRIGHTNESS_BINS-1;
|
else if (bin >= NUM_SCREEN_BRIGHTNESS_BINS) bin = NUM_SCREEN_BRIGHTNESS_BINS-1;
|
||||||
if (mScreenBrightnessBin != bin) {
|
if (mScreenBrightnessBin != bin) {
|
||||||
|
mHistoryCur.states = (mHistoryCur.states&~BatteryHistoryRecord.STATE_SCREEN_MASK)
|
||||||
|
| (bin << BatteryHistoryRecord.STATE_SCREEN_SHIFT);
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Screen brightness " + bin + " to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
if (mScreenOn) {
|
if (mScreenOn) {
|
||||||
if (mScreenBrightnessBin >= 0) {
|
if (mScreenBrightnessBin >= 0) {
|
||||||
mScreenBrightnessTimer[mScreenBrightnessBin].stopRunningLocked(this);
|
mScreenBrightnessTimer[mScreenBrightnessBin].stopRunningLocked(this);
|
||||||
@ -1148,6 +1215,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void notePhoneOnLocked() {
|
public void notePhoneOnLocked() {
|
||||||
if (!mPhoneOn) {
|
if (!mPhoneOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_PHONE_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Phone on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mPhoneOn = true;
|
mPhoneOn = true;
|
||||||
mPhoneOnTimer.startRunningLocked(this);
|
mPhoneOnTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1155,6 +1226,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void notePhoneOffLocked() {
|
public void notePhoneOffLocked() {
|
||||||
if (mPhoneOn) {
|
if (mPhoneOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_PHONE_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Phone off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mPhoneOn = false;
|
mPhoneOn = false;
|
||||||
mPhoneOnTimer.stopRunningLocked(this);
|
mPhoneOnTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1195,8 +1270,16 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
mPhoneSignalScanningTimer.startRunningLocked(this);
|
mPhoneSignalScanningTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mPhoneServiceState != state) {
|
||||||
|
mHistoryCur.states = (mHistoryCur.states&~BatteryHistoryRecord.STATE_PHONE_STATE_MASK)
|
||||||
|
| (state << BatteryHistoryRecord.STATE_PHONE_STATE_SHIFT);
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Phone state " + bin + " to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mPhoneServiceState = state;
|
mPhoneServiceState = state;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) {
|
public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) {
|
||||||
// Bin the strength.
|
// Bin the strength.
|
||||||
@ -1222,6 +1305,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
else bin = SIGNAL_STRENGTH_POOR;
|
else bin = SIGNAL_STRENGTH_POOR;
|
||||||
}
|
}
|
||||||
if (mPhoneSignalStrengthBin != bin) {
|
if (mPhoneSignalStrengthBin != bin) {
|
||||||
|
mHistoryCur.states = (mHistoryCur.states&~BatteryHistoryRecord.STATE_SIGNAL_STRENGTH_MASK)
|
||||||
|
| (bin << BatteryHistoryRecord.STATE_SIGNAL_STRENGTH_SHIFT);
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Signal strength " + bin + " to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
if (mPhoneSignalStrengthBin >= 0) {
|
if (mPhoneSignalStrengthBin >= 0) {
|
||||||
mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].stopRunningLocked(this);
|
mPhoneSignalStrengthsTimer[mPhoneSignalStrengthBin].stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1250,6 +1338,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
}
|
}
|
||||||
if (DEBUG) Log.i(TAG, "Phone Data Connection -> " + dataType + " = " + hasData);
|
if (DEBUG) Log.i(TAG, "Phone Data Connection -> " + dataType + " = " + hasData);
|
||||||
if (mPhoneDataConnectionType != bin) {
|
if (mPhoneDataConnectionType != bin) {
|
||||||
|
mHistoryCur.states = (mHistoryCur.states&~BatteryHistoryRecord.STATE_DATA_CONNECTION_MASK)
|
||||||
|
| (bin << BatteryHistoryRecord.STATE_DATA_CONNECTION_SHIFT);
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Data connection " + bin + " to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
if (mPhoneDataConnectionType >= 0) {
|
if (mPhoneDataConnectionType >= 0) {
|
||||||
mPhoneDataConnectionsTimer[mPhoneDataConnectionType].stopRunningLocked(this);
|
mPhoneDataConnectionsTimer[mPhoneDataConnectionType].stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1260,6 +1353,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteWifiOnLocked(int uid) {
|
public void noteWifiOnLocked(int uid) {
|
||||||
if (!mWifiOn) {
|
if (!mWifiOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_WIFI_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mWifiOn = true;
|
mWifiOn = true;
|
||||||
mWifiOnTimer.startRunningLocked(this);
|
mWifiOnTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1274,6 +1371,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteWifiOffLocked(int uid) {
|
public void noteWifiOffLocked(int uid) {
|
||||||
if (mWifiOn) {
|
if (mWifiOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_WIFI_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mWifiOn = false;
|
mWifiOn = false;
|
||||||
mWifiOnTimer.stopRunningLocked(this);
|
mWifiOnTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1285,6 +1386,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteAudioOnLocked(int uid) {
|
public void noteAudioOnLocked(int uid) {
|
||||||
if (!mAudioOn) {
|
if (!mAudioOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_AUDIO_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Audio on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mAudioOn = true;
|
mAudioOn = true;
|
||||||
mAudioOnTimer.startRunningLocked(this);
|
mAudioOnTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1293,6 +1398,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteAudioOffLocked(int uid) {
|
public void noteAudioOffLocked(int uid) {
|
||||||
if (mAudioOn) {
|
if (mAudioOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_AUDIO_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Audio off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mAudioOn = false;
|
mAudioOn = false;
|
||||||
mAudioOnTimer.stopRunningLocked(this);
|
mAudioOnTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1301,6 +1410,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteVideoOnLocked(int uid) {
|
public void noteVideoOnLocked(int uid) {
|
||||||
if (!mVideoOn) {
|
if (!mVideoOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_VIDEO_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Video on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mVideoOn = true;
|
mVideoOn = true;
|
||||||
mVideoOnTimer.startRunningLocked(this);
|
mVideoOnTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1309,6 +1422,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteVideoOffLocked(int uid) {
|
public void noteVideoOffLocked(int uid) {
|
||||||
if (mVideoOn) {
|
if (mVideoOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_VIDEO_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Video off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mVideoOn = false;
|
mVideoOn = false;
|
||||||
mVideoOnTimer.stopRunningLocked(this);
|
mVideoOnTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1317,6 +1434,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteWifiRunningLocked() {
|
public void noteWifiRunningLocked() {
|
||||||
if (!mWifiRunning) {
|
if (!mWifiRunning) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_WIFI_RUNNING_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI running to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mWifiRunning = true;
|
mWifiRunning = true;
|
||||||
mWifiRunningTimer.startRunningLocked(this);
|
mWifiRunningTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1324,6 +1445,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteWifiStoppedLocked() {
|
public void noteWifiStoppedLocked() {
|
||||||
if (mWifiRunning) {
|
if (mWifiRunning) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_WIFI_RUNNING_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI stopped to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mWifiRunning = false;
|
mWifiRunning = false;
|
||||||
mWifiRunningTimer.stopRunningLocked(this);
|
mWifiRunningTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1331,6 +1456,10 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteBluetoothOnLocked() {
|
public void noteBluetoothOnLocked() {
|
||||||
if (!mBluetoothOn) {
|
if (!mBluetoothOn) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_BLUETOOTH_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Bluetooth on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mBluetoothOn = true;
|
mBluetoothOn = true;
|
||||||
mBluetoothOnTimer.startRunningLocked(this);
|
mBluetoothOnTimer.startRunningLocked(this);
|
||||||
}
|
}
|
||||||
@ -1338,32 +1467,84 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void noteBluetoothOffLocked() {
|
public void noteBluetoothOffLocked() {
|
||||||
if (mBluetoothOn) {
|
if (mBluetoothOn) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_BLUETOOTH_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Bluetooth off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
mBluetoothOn = false;
|
mBluetoothOn = false;
|
||||||
mBluetoothOnTimer.stopRunningLocked(this);
|
mBluetoothOnTimer.stopRunningLocked(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mWifiFullLockNesting = 0;
|
||||||
|
|
||||||
public void noteFullWifiLockAcquiredLocked(int uid) {
|
public void noteFullWifiLockAcquiredLocked(int uid) {
|
||||||
|
if (mWifiFullLockNesting == 0) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_WIFI_FULL_LOCK_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI full lock on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
|
mWifiFullLockNesting++;
|
||||||
getUidStatsLocked(uid).noteFullWifiLockAcquiredLocked();
|
getUidStatsLocked(uid).noteFullWifiLockAcquiredLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noteFullWifiLockReleasedLocked(int uid) {
|
public void noteFullWifiLockReleasedLocked(int uid) {
|
||||||
|
mWifiFullLockNesting--;
|
||||||
|
if (mWifiFullLockNesting == 0) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_WIFI_FULL_LOCK_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI full lock off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
getUidStatsLocked(uid).noteFullWifiLockReleasedLocked();
|
getUidStatsLocked(uid).noteFullWifiLockReleasedLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mWifiScanLockNesting = 0;
|
||||||
|
|
||||||
public void noteScanWifiLockAcquiredLocked(int uid) {
|
public void noteScanWifiLockAcquiredLocked(int uid) {
|
||||||
|
if (mWifiScanLockNesting == 0) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_WIFI_SCAN_LOCK_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI scan lock on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
|
mWifiScanLockNesting++;
|
||||||
getUidStatsLocked(uid).noteScanWifiLockAcquiredLocked();
|
getUidStatsLocked(uid).noteScanWifiLockAcquiredLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noteScanWifiLockReleasedLocked(int uid) {
|
public void noteScanWifiLockReleasedLocked(int uid) {
|
||||||
|
mWifiScanLockNesting--;
|
||||||
|
if (mWifiScanLockNesting == 0) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_WIFI_SCAN_LOCK_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI scan lock off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
getUidStatsLocked(uid).noteScanWifiLockReleasedLocked();
|
getUidStatsLocked(uid).noteScanWifiLockReleasedLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mWifiMulticastNesting = 0;
|
||||||
|
|
||||||
public void noteWifiMulticastEnabledLocked(int uid) {
|
public void noteWifiMulticastEnabledLocked(int uid) {
|
||||||
|
if (mWifiMulticastNesting == 0) {
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_WIFI_MULTICAST_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI multicast on to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
|
mWifiMulticastNesting++;
|
||||||
getUidStatsLocked(uid).noteWifiMulticastEnabledLocked();
|
getUidStatsLocked(uid).noteWifiMulticastEnabledLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noteWifiMulticastDisabledLocked(int uid) {
|
public void noteWifiMulticastDisabledLocked(int uid) {
|
||||||
|
mWifiMulticastNesting--;
|
||||||
|
if (mWifiMulticastNesting == 0) {
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_WIFI_MULTICAST_ON_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "WIFI multicast off to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
getUidStatsLocked(uid).noteWifiMulticastDisabledLocked();
|
getUidStatsLocked(uid).noteWifiMulticastDisabledLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2765,6 +2946,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BatteryHistoryRecord getHistory() {
|
||||||
|
return mHistory;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getStartCount() {
|
public int getStartCount() {
|
||||||
return mStartCount;
|
return mStartCount;
|
||||||
@ -2784,6 +2970,12 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
long mSecRealtime = SystemClock.elapsedRealtime();
|
long mSecRealtime = SystemClock.elapsedRealtime();
|
||||||
long realtime = mSecRealtime * 1000;
|
long realtime = mSecRealtime * 1000;
|
||||||
if (onBattery) {
|
if (onBattery) {
|
||||||
|
clearHistory();
|
||||||
|
mHistoryCur.batteryLevel = (byte)level;
|
||||||
|
mHistoryCur.states &= ~BatteryHistoryRecord.STATE_BATTERY_PLUGGED_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Battery unplugged to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(mSecRealtime);
|
||||||
mTrackBatteryUptimeStart = uptime;
|
mTrackBatteryUptimeStart = uptime;
|
||||||
mTrackBatteryRealtimeStart = realtime;
|
mTrackBatteryRealtimeStart = realtime;
|
||||||
mUnpluggedBatteryUptime = getBatteryUptimeLocked(uptime);
|
mUnpluggedBatteryUptime = getBatteryUptimeLocked(uptime);
|
||||||
@ -2791,6 +2983,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
mDischargeCurrentLevel = mDischargeStartLevel = level;
|
mDischargeCurrentLevel = mDischargeStartLevel = level;
|
||||||
doUnplug(mUnpluggedBatteryUptime, mUnpluggedBatteryRealtime);
|
doUnplug(mUnpluggedBatteryUptime, mUnpluggedBatteryRealtime);
|
||||||
} else {
|
} else {
|
||||||
|
mHistoryCur.batteryLevel = (byte)level;
|
||||||
|
mHistoryCur.states |= BatteryHistoryRecord.STATE_BATTERY_PLUGGED_FLAG;
|
||||||
|
if (DEBUG_HISTORY) Slog.v(TAG, "Battery plugged to: "
|
||||||
|
+ Integer.toHexString(mHistoryCur.states));
|
||||||
|
addHistoryRecord(mSecRealtime);
|
||||||
mTrackBatteryPastUptime += uptime - mTrackBatteryUptimeStart;
|
mTrackBatteryPastUptime += uptime - mTrackBatteryUptimeStart;
|
||||||
mTrackBatteryPastRealtime += realtime - mTrackBatteryRealtimeStart;
|
mTrackBatteryPastRealtime += realtime - mTrackBatteryRealtimeStart;
|
||||||
mDischargeCurrentLevel = level;
|
mDischargeCurrentLevel = level;
|
||||||
@ -2806,7 +3003,11 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void recordCurrentLevel(int level) {
|
public void recordCurrentLevel(int level) {
|
||||||
|
if (mDischargeCurrentLevel != level) {
|
||||||
mDischargeCurrentLevel = level;
|
mDischargeCurrentLevel = level;
|
||||||
|
mHistoryCur.batteryLevel = (byte)level;
|
||||||
|
addHistoryRecord(SystemClock.elapsedRealtime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateKernelWakelocksLocked() {
|
public void updateKernelWakelocksLocked() {
|
||||||
@ -3146,6 +3347,24 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void readHistory(Parcel in) {
|
||||||
|
mHistory = mHistoryEnd = mHistoryCache = null;
|
||||||
|
long time;
|
||||||
|
while ((time=in.readLong()) >= 0) {
|
||||||
|
BatteryHistoryRecord rec = new BatteryHistoryRecord(time, in);
|
||||||
|
addHistoryRecord(rec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeHistory(Parcel out) {
|
||||||
|
BatteryHistoryRecord rec = mHistory;
|
||||||
|
while (rec != null) {
|
||||||
|
if (rec.time >= 0) rec.writeToParcel(out, 0);
|
||||||
|
rec = rec.next;
|
||||||
|
}
|
||||||
|
out.writeLong(-1);
|
||||||
|
}
|
||||||
|
|
||||||
private void readSummaryFromParcel(Parcel in) {
|
private void readSummaryFromParcel(Parcel in) {
|
||||||
final int version = in.readInt();
|
final int version = in.readInt();
|
||||||
if (version != VERSION) {
|
if (version != VERSION) {
|
||||||
@ -3154,6 +3373,8 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readHistory(in);
|
||||||
|
|
||||||
mStartCount = in.readInt();
|
mStartCount = in.readInt();
|
||||||
mBatteryUptime = in.readLong();
|
mBatteryUptime = in.readLong();
|
||||||
mBatteryLastUptime = in.readLong();
|
mBatteryLastUptime = in.readLong();
|
||||||
@ -3325,6 +3546,8 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
out.writeInt(VERSION);
|
out.writeInt(VERSION);
|
||||||
|
|
||||||
|
writeHistory(out);
|
||||||
|
|
||||||
out.writeInt(mStartCount);
|
out.writeInt(mStartCount);
|
||||||
out.writeLong(computeBatteryUptime(NOW_SYS, STATS_TOTAL));
|
out.writeLong(computeBatteryUptime(NOW_SYS, STATS_TOTAL));
|
||||||
out.writeLong(computeBatteryUptime(NOW_SYS, STATS_CURRENT));
|
out.writeLong(computeBatteryUptime(NOW_SYS, STATS_CURRENT));
|
||||||
@ -3493,6 +3716,8 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
throw new ParcelFormatException("Bad magic number");
|
throw new ParcelFormatException("Bad magic number");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readHistory(in);
|
||||||
|
|
||||||
mStartCount = in.readInt();
|
mStartCount = in.readInt();
|
||||||
mBatteryUptime = in.readLong();
|
mBatteryUptime = in.readLong();
|
||||||
mBatteryLastUptime = in.readLong();
|
mBatteryLastUptime = in.readLong();
|
||||||
@ -3591,6 +3816,9 @@ public final class BatteryStatsImpl extends BatteryStats {
|
|||||||
final long batteryRealtime = getBatteryRealtimeLocked(uSecRealtime);
|
final long batteryRealtime = getBatteryRealtimeLocked(uSecRealtime);
|
||||||
|
|
||||||
out.writeInt(MAGIC);
|
out.writeInt(MAGIC);
|
||||||
|
|
||||||
|
writeHistory(out);
|
||||||
|
|
||||||
out.writeInt(mStartCount);
|
out.writeInt(mStartCount);
|
||||||
out.writeLong(mBatteryUptime);
|
out.writeLong(mBatteryUptime);
|
||||||
out.writeLong(mBatteryLastUptime);
|
out.writeLong(mBatteryLastUptime);
|
||||||
|
@ -288,6 +288,17 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
// system/rootdir/init.rc on startup.
|
// system/rootdir/init.rc on startup.
|
||||||
static final int SECONDARY_SERVER_ADJ;
|
static final int SECONDARY_SERVER_ADJ;
|
||||||
|
|
||||||
|
// This is a process with a heavy-weight application. It is in the
|
||||||
|
// background, but we want to try to avoid killing it. Value set in
|
||||||
|
// system/rootdir/init.rc on startup.
|
||||||
|
static final int HEAVY_WEIGHT_APP_ADJ;
|
||||||
|
|
||||||
|
// This is a process only hosting components that are perceptible to the
|
||||||
|
// user, and we really want to avoid killing them, but they are not
|
||||||
|
// immediately visible. An example is background music playback. Value set in
|
||||||
|
// system/rootdir/init.rc on startup.
|
||||||
|
static final int PERCEPTIBLE_APP_ADJ;
|
||||||
|
|
||||||
// This is a process only hosting activities that are visible to the
|
// This is a process only hosting activities that are visible to the
|
||||||
// user, so we'd prefer they don't disappear. Value set in
|
// user, so we'd prefer they don't disappear. Value set in
|
||||||
// system/rootdir/init.rc on startup.
|
// system/rootdir/init.rc on startup.
|
||||||
@ -313,6 +324,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
static final int HOME_APP_MEM;
|
static final int HOME_APP_MEM;
|
||||||
static final int BACKUP_APP_MEM;
|
static final int BACKUP_APP_MEM;
|
||||||
static final int SECONDARY_SERVER_MEM;
|
static final int SECONDARY_SERVER_MEM;
|
||||||
|
static final int HEAVY_WEIGHT_APP_MEM;
|
||||||
|
static final int PERCEPTIBLE_APP_MEM;
|
||||||
static final int VISIBLE_APP_MEM;
|
static final int VISIBLE_APP_MEM;
|
||||||
static final int FOREGROUND_APP_MEM;
|
static final int FOREGROUND_APP_MEM;
|
||||||
|
|
||||||
@ -333,37 +346,40 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
// been idle for less than 120 seconds.
|
// been idle for less than 120 seconds.
|
||||||
static final long EMPTY_APP_IDLE_OFFSET = 120*1000;
|
static final long EMPTY_APP_IDLE_OFFSET = 120*1000;
|
||||||
|
|
||||||
|
static int getIntProp(String name, boolean allowZero) {
|
||||||
|
String str = SystemProperties.get(name);
|
||||||
|
if (str == null) {
|
||||||
|
throw new IllegalArgumentException("Property not defined: " + name);
|
||||||
|
}
|
||||||
|
int val = Integer.valueOf(str);
|
||||||
|
if (val == 0 && !allowZero) {
|
||||||
|
throw new IllegalArgumentException("Property must not be zero: " + name);
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// These values are set in system/rootdir/init.rc on startup.
|
// These values are set in system/rootdir/init.rc on startup.
|
||||||
FOREGROUND_APP_ADJ =
|
FOREGROUND_APP_ADJ = getIntProp("ro.FOREGROUND_APP_ADJ", true);
|
||||||
Integer.valueOf(SystemProperties.get("ro.FOREGROUND_APP_ADJ"));
|
VISIBLE_APP_ADJ = getIntProp("ro.VISIBLE_APP_ADJ", true);
|
||||||
VISIBLE_APP_ADJ =
|
PERCEPTIBLE_APP_ADJ = getIntProp("ro.PERCEPTIBLE_APP_ADJ", true);
|
||||||
Integer.valueOf(SystemProperties.get("ro.VISIBLE_APP_ADJ"));
|
HEAVY_WEIGHT_APP_ADJ = getIntProp("ro.HEAVY_WEIGHT_APP_ADJ", true);
|
||||||
SECONDARY_SERVER_ADJ =
|
SECONDARY_SERVER_ADJ = getIntProp("ro.SECONDARY_SERVER_ADJ", true);
|
||||||
Integer.valueOf(SystemProperties.get("ro.SECONDARY_SERVER_ADJ"));
|
BACKUP_APP_ADJ = getIntProp("ro.BACKUP_APP_ADJ", true);
|
||||||
BACKUP_APP_ADJ =
|
HOME_APP_ADJ = getIntProp("ro.HOME_APP_ADJ", true);
|
||||||
Integer.valueOf(SystemProperties.get("ro.BACKUP_APP_ADJ"));
|
HIDDEN_APP_MIN_ADJ = getIntProp("ro.HIDDEN_APP_MIN_ADJ", true);
|
||||||
HOME_APP_ADJ =
|
EMPTY_APP_ADJ = getIntProp("ro.EMPTY_APP_ADJ", true);
|
||||||
Integer.valueOf(SystemProperties.get("ro.HOME_APP_ADJ"));
|
// These days we use the last empty slot for hidden apps as well.
|
||||||
HIDDEN_APP_MIN_ADJ =
|
HIDDEN_APP_MAX_ADJ = EMPTY_APP_ADJ;
|
||||||
Integer.valueOf(SystemProperties.get("ro.HIDDEN_APP_MIN_ADJ"));
|
FOREGROUND_APP_MEM = getIntProp("ro.FOREGROUND_APP_MEM", false)*PAGE_SIZE;
|
||||||
EMPTY_APP_ADJ =
|
VISIBLE_APP_MEM = getIntProp("ro.VISIBLE_APP_MEM", false)*PAGE_SIZE;
|
||||||
Integer.valueOf(SystemProperties.get("ro.EMPTY_APP_ADJ"));
|
PERCEPTIBLE_APP_MEM = getIntProp("ro.PERCEPTIBLE_APP_MEM", false)*PAGE_SIZE;
|
||||||
HIDDEN_APP_MAX_ADJ = EMPTY_APP_ADJ-1;
|
HEAVY_WEIGHT_APP_MEM = getIntProp("ro.HEAVY_WEIGHT_APP_MEM", false)*PAGE_SIZE;
|
||||||
FOREGROUND_APP_MEM =
|
SECONDARY_SERVER_MEM = getIntProp("ro.SECONDARY_SERVER_MEM", false)*PAGE_SIZE;
|
||||||
Integer.valueOf(SystemProperties.get("ro.FOREGROUND_APP_MEM"))*PAGE_SIZE;
|
BACKUP_APP_MEM = getIntProp("ro.BACKUP_APP_MEM", false)*PAGE_SIZE;
|
||||||
VISIBLE_APP_MEM =
|
HOME_APP_MEM = getIntProp("ro.HOME_APP_MEM", false)*PAGE_SIZE;
|
||||||
Integer.valueOf(SystemProperties.get("ro.VISIBLE_APP_MEM"))*PAGE_SIZE;
|
HIDDEN_APP_MEM = getIntProp("ro.HIDDEN_APP_MEM", false)*PAGE_SIZE;
|
||||||
SECONDARY_SERVER_MEM =
|
EMPTY_APP_MEM = getIntProp("ro.EMPTY_APP_MEM", false)*PAGE_SIZE;
|
||||||
Integer.valueOf(SystemProperties.get("ro.SECONDARY_SERVER_MEM"))*PAGE_SIZE;
|
|
||||||
BACKUP_APP_MEM =
|
|
||||||
Integer.valueOf(SystemProperties.get("ro.BACKUP_APP_MEM"))*PAGE_SIZE;
|
|
||||||
HOME_APP_MEM =
|
|
||||||
Integer.valueOf(SystemProperties.get("ro.HOME_APP_MEM"))*PAGE_SIZE;
|
|
||||||
HIDDEN_APP_MEM =
|
|
||||||
Integer.valueOf(SystemProperties.get("ro.HIDDEN_APP_MEM"))*PAGE_SIZE;
|
|
||||||
EMPTY_APP_MEM =
|
|
||||||
Integer.valueOf(SystemProperties.get("ro.EMPTY_APP_MEM"))*PAGE_SIZE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static final int MY_PID = Process.myPid();
|
static final int MY_PID = Process.myPid();
|
||||||
@ -4974,8 +4990,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
(rec.lastLowMemory+GC_MIN_INTERVAL) <= now) {
|
(rec.lastLowMemory+GC_MIN_INTERVAL) <= now) {
|
||||||
// The low memory report is overriding any current
|
// The low memory report is overriding any current
|
||||||
// state for a GC request. Make sure to do
|
// state for a GC request. Make sure to do
|
||||||
// visible/foreground processes first.
|
// heavy/important/visible/foreground processes first.
|
||||||
if (rec.setAdj <= VISIBLE_APP_ADJ) {
|
if (rec.setAdj <= HEAVY_WEIGHT_APP_ADJ) {
|
||||||
rec.lastRequestedGc = 0;
|
rec.lastRequestedGc = 0;
|
||||||
} else {
|
} else {
|
||||||
rec.lastRequestedGc = rec.lastLowMemory;
|
rec.lastRequestedGc = rec.lastLowMemory;
|
||||||
@ -8102,8 +8118,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
r.conProviders.put(cpr, new Integer(cnt.intValue()+1));
|
r.conProviders.put(cpr, new Integer(cnt.intValue()+1));
|
||||||
}
|
}
|
||||||
cpr.clients.add(r);
|
cpr.clients.add(r);
|
||||||
if (cpr.app != null && r.setAdj >= VISIBLE_APP_ADJ) {
|
if (cpr.app != null && r.setAdj <= PERCEPTIBLE_APP_ADJ) {
|
||||||
// If this is a visible app accessing the provider,
|
// If this is a perceptible app accessing the provider,
|
||||||
// make sure to count it as being accessed and thus
|
// make sure to count it as being accessed and thus
|
||||||
// back up on the LRU list. This is good because
|
// back up on the LRU list. This is good because
|
||||||
// content providers are often expensive to start.
|
// content providers are often expensive to start.
|
||||||
@ -9741,10 +9757,12 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
currApp.lru = 0;
|
currApp.lru = 0;
|
||||||
} else if (adj >= SECONDARY_SERVER_ADJ) {
|
} else if (adj >= SECONDARY_SERVER_ADJ) {
|
||||||
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE;
|
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE;
|
||||||
|
} else if (adj >= HEAVY_WEIGHT_APP_ADJ) {
|
||||||
|
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_HEAVY_WEIGHT;
|
||||||
|
} else if (adj >= PERCEPTIBLE_APP_ADJ) {
|
||||||
|
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_PERCEPTIBLE;
|
||||||
} else if (adj >= VISIBLE_APP_ADJ) {
|
} else if (adj >= VISIBLE_APP_ADJ) {
|
||||||
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_VISIBLE;
|
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_VISIBLE;
|
||||||
} else if (app == mHeavyWeightProcess) {
|
|
||||||
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_HEAVY_WEIGHT;
|
|
||||||
} else {
|
} else {
|
||||||
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
|
currApp.importance = ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
|
||||||
}
|
}
|
||||||
@ -10006,7 +10024,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
needSep = true;
|
needSep = true;
|
||||||
pw.println(" Running processes (most recent first):");
|
pw.println(" Running processes (most recent first):");
|
||||||
dumpProcessList(pw, this, mLruProcesses, " ",
|
dumpProcessList(pw, this, mLruProcesses, " ",
|
||||||
"App ", "PERS", true);
|
"Proc", "PERS", true);
|
||||||
needSep = true;
|
needSep = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10502,7 +10520,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
String prefix, String normalLabel, String persistentLabel,
|
String prefix, String normalLabel, String persistentLabel,
|
||||||
boolean inclOomAdj) {
|
boolean inclOomAdj) {
|
||||||
int numPers = 0;
|
int numPers = 0;
|
||||||
for (int i=list.size()-1; i>=0; i--) {
|
final int N = list.size()-1;
|
||||||
|
for (int i=N; i>=0; i--) {
|
||||||
ProcessRecord r = (ProcessRecord)list.get(i);
|
ProcessRecord r = (ProcessRecord)list.get(i);
|
||||||
if (false) {
|
if (false) {
|
||||||
pw.println(prefix + (r.persistent ? persistentLabel : normalLabel)
|
pw.println(prefix + (r.persistent ? persistentLabel : normalLabel)
|
||||||
@ -10520,6 +10539,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
oomAdj = buildOomTag("svc", " ", r.setAdj, SECONDARY_SERVER_ADJ);
|
oomAdj = buildOomTag("svc", " ", r.setAdj, SECONDARY_SERVER_ADJ);
|
||||||
} else if (r.setAdj >= BACKUP_APP_ADJ) {
|
} else if (r.setAdj >= BACKUP_APP_ADJ) {
|
||||||
oomAdj = buildOomTag("bckup", null, r.setAdj, BACKUP_APP_ADJ);
|
oomAdj = buildOomTag("bckup", null, r.setAdj, BACKUP_APP_ADJ);
|
||||||
|
} else if (r.setAdj >= HEAVY_WEIGHT_APP_ADJ) {
|
||||||
|
oomAdj = buildOomTag("hvy ", null, r.setAdj, HEAVY_WEIGHT_APP_ADJ);
|
||||||
|
} else if (r.setAdj >= PERCEPTIBLE_APP_ADJ) {
|
||||||
|
oomAdj = buildOomTag("prcp ", null, r.setAdj, PERCEPTIBLE_APP_ADJ);
|
||||||
} else if (r.setAdj >= VISIBLE_APP_ADJ) {
|
} else if (r.setAdj >= VISIBLE_APP_ADJ) {
|
||||||
oomAdj = buildOomTag("vis ", null, r.setAdj, VISIBLE_APP_ADJ);
|
oomAdj = buildOomTag("vis ", null, r.setAdj, VISIBLE_APP_ADJ);
|
||||||
} else if (r.setAdj >= FOREGROUND_APP_ADJ) {
|
} else if (r.setAdj >= FOREGROUND_APP_ADJ) {
|
||||||
@ -10545,10 +10568,27 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
}
|
}
|
||||||
pw.println(String.format("%s%s #%2d: adj=%s/%s %s (%s)",
|
pw.println(String.format("%s%s #%2d: adj=%s/%s %s (%s)",
|
||||||
prefix, (r.persistent ? persistentLabel : normalLabel),
|
prefix, (r.persistent ? persistentLabel : normalLabel),
|
||||||
i, oomAdj, schedGroup, r.toShortString(), r.adjType));
|
N-i, oomAdj, schedGroup, r.toShortString(), r.adjType));
|
||||||
if (r.adjSource != null || r.adjTarget != null) {
|
if (r.adjSource != null || r.adjTarget != null) {
|
||||||
pw.println(prefix + " " + r.adjTarget
|
pw.print(prefix);
|
||||||
+ "<=" + r.adjSource);
|
pw.print(" ");
|
||||||
|
if (r.adjTarget instanceof ComponentName) {
|
||||||
|
pw.print(((ComponentName)r.adjTarget).flattenToShortString());
|
||||||
|
} else if (r.adjTarget != null) {
|
||||||
|
pw.print(r.adjTarget.toString());
|
||||||
|
} else {
|
||||||
|
pw.print("{null}");
|
||||||
|
}
|
||||||
|
pw.print("<=");
|
||||||
|
if (r.adjSource instanceof ProcessRecord) {
|
||||||
|
pw.print("Proc{");
|
||||||
|
pw.print(((ProcessRecord)r.adjSource).toShortString());
|
||||||
|
pw.println("}");
|
||||||
|
} else if (r.adjSource != null) {
|
||||||
|
pw.println(r.adjSource.toString());
|
||||||
|
} else {
|
||||||
|
pw.println("{null}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pw.println(String.format("%s%s #%2d: %s",
|
pw.println(String.format("%s%s #%2d: %s",
|
||||||
@ -14092,11 +14132,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
adj = FOREGROUND_APP_ADJ;
|
adj = FOREGROUND_APP_ADJ;
|
||||||
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
||||||
app.adjType = "instrumentation";
|
app.adjType = "instrumentation";
|
||||||
} else if (app == mHeavyWeightProcess) {
|
|
||||||
// We don't want to kill the current heavy-weight process.
|
|
||||||
adj = FOREGROUND_APP_ADJ;
|
|
||||||
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
|
||||||
app.adjType = "heavy";
|
|
||||||
} else if (app.persistentActivities > 0) {
|
} else if (app.persistentActivities > 0) {
|
||||||
// Special persistent activities... shouldn't be used these days.
|
// Special persistent activities... shouldn't be used these days.
|
||||||
adj = FOREGROUND_APP_ADJ;
|
adj = FOREGROUND_APP_ADJ;
|
||||||
@ -14117,15 +14152,20 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
app.adjType = "exec-service";
|
app.adjType = "exec-service";
|
||||||
} else if (app.foregroundServices) {
|
} else if (app.foregroundServices) {
|
||||||
// The user is aware of this app, so make it visible.
|
// The user is aware of this app, so make it visible.
|
||||||
adj = VISIBLE_APP_ADJ;
|
adj = PERCEPTIBLE_APP_ADJ;
|
||||||
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
||||||
app.adjType = "foreground-service";
|
app.adjType = "foreground-service";
|
||||||
} else if (app.forcingToForeground != null) {
|
} else if (app.forcingToForeground != null) {
|
||||||
// The user is aware of this app, so make it visible.
|
// The user is aware of this app, so make it visible.
|
||||||
adj = VISIBLE_APP_ADJ;
|
adj = PERCEPTIBLE_APP_ADJ;
|
||||||
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
||||||
app.adjType = "force-foreground";
|
app.adjType = "force-foreground";
|
||||||
app.adjSource = app.forcingToForeground;
|
app.adjSource = app.forcingToForeground;
|
||||||
|
} else if (app == mHeavyWeightProcess) {
|
||||||
|
// We don't want to kill the current heavy-weight process.
|
||||||
|
adj = HEAVY_WEIGHT_APP_ADJ;
|
||||||
|
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
||||||
|
app.adjType = "heavy";
|
||||||
} else if (app == mHomeProcess) {
|
} else if (app == mHomeProcess) {
|
||||||
// This process is hosting what we currently consider to be the
|
// This process is hosting what we currently consider to be the
|
||||||
// home app, so we don't want to let it go into the background.
|
// home app, so we don't want to let it go into the background.
|
||||||
@ -14220,7 +14260,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
ProcessRecord client = cr.binding.client;
|
ProcessRecord client = cr.binding.client;
|
||||||
int myHiddenAdj = hiddenAdj;
|
int myHiddenAdj = hiddenAdj;
|
||||||
if (myHiddenAdj > client.hiddenAdj) {
|
if (myHiddenAdj > client.hiddenAdj) {
|
||||||
if (client.hiddenAdj > VISIBLE_APP_ADJ) {
|
if (client.hiddenAdj >= VISIBLE_APP_ADJ) {
|
||||||
myHiddenAdj = client.hiddenAdj;
|
myHiddenAdj = client.hiddenAdj;
|
||||||
} else {
|
} else {
|
||||||
myHiddenAdj = VISIBLE_APP_ADJ;
|
myHiddenAdj = VISIBLE_APP_ADJ;
|
||||||
@ -14229,7 +14269,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
int clientAdj = computeOomAdjLocked(
|
int clientAdj = computeOomAdjLocked(
|
||||||
client, myHiddenAdj, TOP_APP, true);
|
client, myHiddenAdj, TOP_APP, true);
|
||||||
if (adj > clientAdj) {
|
if (adj > clientAdj) {
|
||||||
adj = clientAdj > VISIBLE_APP_ADJ
|
adj = clientAdj >= VISIBLE_APP_ADJ
|
||||||
? clientAdj : VISIBLE_APP_ADJ;
|
? clientAdj : VISIBLE_APP_ADJ;
|
||||||
if (!client.hidden) {
|
if (!client.hidden) {
|
||||||
app.hidden = false;
|
app.hidden = false;
|
||||||
@ -14340,7 +14380,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
// " adj=" + adj + " curAdj=" + app.curAdj + " maxAdj=" + app.maxAdj);
|
// " adj=" + adj + " curAdj=" + app.curAdj + " maxAdj=" + app.maxAdj);
|
||||||
if (adj > app.maxAdj) {
|
if (adj > app.maxAdj) {
|
||||||
adj = app.maxAdj;
|
adj = app.maxAdj;
|
||||||
if (app.maxAdj <= VISIBLE_APP_ADJ) {
|
if (app.maxAdj <= PERCEPTIBLE_APP_ADJ) {
|
||||||
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
schedGroup = Process.THREAD_GROUP_DEFAULT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14392,7 +14432,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
if (canGcNowLocked()) {
|
if (canGcNowLocked()) {
|
||||||
while (mProcessesToGc.size() > 0) {
|
while (mProcessesToGc.size() > 0) {
|
||||||
ProcessRecord proc = mProcessesToGc.remove(0);
|
ProcessRecord proc = mProcessesToGc.remove(0);
|
||||||
if (proc.curRawAdj > VISIBLE_APP_ADJ || proc.reportLowMemory) {
|
if (proc.curRawAdj > PERCEPTIBLE_APP_ADJ || proc.reportLowMemory) {
|
||||||
if ((proc.lastRequestedGc+GC_MIN_INTERVAL)
|
if ((proc.lastRequestedGc+GC_MIN_INTERVAL)
|
||||||
<= SystemClock.uptimeMillis()) {
|
<= SystemClock.uptimeMillis()) {
|
||||||
// To avoid spamming the system, we will GC processes one
|
// To avoid spamming the system, we will GC processes one
|
||||||
|
@ -96,6 +96,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
|
|||||||
public void noteStartWakelock(int uid, String name, int type) {
|
public void noteStartWakelock(int uid, String name, int type) {
|
||||||
enforceCallingPermission();
|
enforceCallingPermission();
|
||||||
synchronized (mStats) {
|
synchronized (mStats) {
|
||||||
|
Slog.i("battery", "Start wake lock: " + uid + " " + name);
|
||||||
mStats.getUidStatsLocked(uid).noteStartWakeLocked(name, type);
|
mStats.getUidStatsLocked(uid).noteStartWakeLocked(name, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,6 +104,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
|
|||||||
public void noteStopWakelock(int uid, String name, int type) {
|
public void noteStopWakelock(int uid, String name, int type) {
|
||||||
enforceCallingPermission();
|
enforceCallingPermission();
|
||||||
synchronized (mStats) {
|
synchronized (mStats) {
|
||||||
|
Slog.i("battery", "Stop wake lock: " + uid + " " + name);
|
||||||
mStats.getUidStatsLocked(uid).noteStopWakeLocked(name, type);
|
mStats.getUidStatsLocked(uid).noteStopWakeLocked(name, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user