diff options
| author | 2016-06-22 19:50:47 +0000 | |
|---|---|---|
| committer | 2016-06-22 19:50:48 +0000 | |
| commit | 335387a1df8a79060bf2f99a27502cf545227aa8 (patch) | |
| tree | f0898ed1f5ab61a5315e167740367175c40cc30c | |
| parent | 0bf31c3fa6263f595022d8f3addfd4d28f70db99 (diff) | |
| parent | cbd2a140c1150845c279fa109fbc9b028ebf1a4c (diff) | |
Merge "Added more logs to track WakeLock usages" into nyc-dev
| -rw-r--r-- | services/core/java/com/android/server/location/GnssLocationProvider.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java index 2fc14ecac865..173f76fa52f5 100644 --- a/services/core/java/com/android/server/location/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/GnssLocationProvider.java @@ -899,6 +899,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // hold wake lock while task runs mWakeLock.acquire(); + Log.i(TAG, "WakeLock acquired by handleInjectNtpTime()"); AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() { @Override public void run() { @@ -951,6 +952,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // release wake lock held by task mWakeLock.release(); + Log.i(TAG, "WakeLock released by handleInjectNtpTime()"); } }); } @@ -969,6 +971,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // hold wake lock while task runs mWakeLock.acquire(); + Log.i(TAG, "WakeLock acquired by handleDownloadXtraData()"); AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() { @Override public void run() { @@ -991,6 +994,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // release wake lock held by task mWakeLock.release(); + Log.i(TAG, "WakeLock released by handleDownloadXtraData()"); } }); } @@ -2040,6 +2044,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // note that this assumes the message will not be removed from the queue before // it is handled (otherwise the wake lock would be leaked). mWakeLock.acquire(); + Log.i(TAG, "WakeLock acquired by sendMessage(" + message + ", " + arg + ", " + obj + ")"); mHandler.obtainMessage(message, arg, 1, obj).sendToTarget(); } @@ -2099,6 +2104,8 @@ public class GnssLocationProvider implements LocationProviderInterface { if (msg.arg2 == 1) { // wakelock was taken for this message, release it mWakeLock.release(); + Log.i(TAG, "WakeLock released by handleMessage(" + message + ", " + msg.arg1 + ", " + + msg.obj + ")"); } } |