summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java25
-rw-r--r--services/java/com/android/server/wm/WindowStateAnimator.java21
2 files changed, 12 insertions, 34 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 72aab7b..966f4c1 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8129,7 +8129,7 @@ public class WindowManagerService extends IWindowManager.Stub
boolean recoveringMemory) {
if (DEBUG_WINDOW_TRACE) {
Slog.v(TAG, "performLayoutAndPlaceSurfacesLockedInner: entry. Called by "
- + getCallers(3));
+ + Debug.getCallers(3));
}
if (mDisplay == null) {
Slog.i(TAG, "skipping performLayoutAndPlaceSurfacesLockedInner with no mDisplay");
@@ -9621,27 +9621,4 @@ public class WindowManagerService extends IWindowManager.Stub
mH.sendMessage(mH.obtainMessage(H.BULK_UPDATE_PARAMETERS, bulkUpdateParams,
pendingLayoutChanges));
}
-
- /**
- * Never call directly. Only call through getCallers(int) or getCaller(). Otherwise
- * the depth will be off.
- * @param depth What level stack to return.
- * @return A String indicating who the caller of the method that calls this is.
- */
- static String getCaller(int depth) {
- StackTraceElement caller = Thread.currentThread().getStackTrace()[5 + depth];
- return caller.getClassName() + "." + caller.getMethodName() + ":" + caller.getLineNumber();
- }
-
- static String getCallers(final int depth) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < depth; i++) {
- sb.append(getCaller(i)).append(" ");
- }
- return sb.toString();
- }
-
- static String getCaller() {
- return getCallers(1);
- }
}
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index b61ccbf..0a7e7fd 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -15,6 +15,7 @@ import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.Region;
+import android.os.Debug;
import android.os.RemoteException;
import android.util.Slog;
import android.view.Surface;
@@ -421,7 +422,7 @@ class WindowStateAnimator {
super(s, pid, display, w, h, format, flags);
mSize = new Point(w, h);
Slog.v(SURFACE_TAG, "ctor: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
public SurfaceTrace(SurfaceSession s,
@@ -431,7 +432,7 @@ class WindowStateAnimator {
mName = name;
mSize = new Point(w, h);
Slog.v(SURFACE_TAG, "ctor: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
@@ -439,7 +440,7 @@ class WindowStateAnimator {
super.setAlpha(alpha);
mSurfaceTraceAlpha = alpha;
Slog.v(SURFACE_TAG, "setAlpha: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
@@ -447,7 +448,7 @@ class WindowStateAnimator {
super.setLayer(zorder);
mLayer = zorder;
Slog.v(SURFACE_TAG, "setLayer: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
sSurfaces.remove(this);
int i;
@@ -465,7 +466,7 @@ class WindowStateAnimator {
super.setPosition(x, y);
mPosition = new PointF(x, y);
Slog.v(SURFACE_TAG, "setPosition: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
@@ -473,7 +474,7 @@ class WindowStateAnimator {
super.setSize(w, h);
mSize = new Point(w, h);
Slog.v(SURFACE_TAG, "setSize: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
@@ -481,21 +482,21 @@ class WindowStateAnimator {
super.hide();
mShown = false;
Slog.v(SURFACE_TAG, "hide: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
public void show() {
super.show();
mShown = true;
Slog.v(SURFACE_TAG, "show: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
}
@Override
public void destroy() {
super.destroy();
Slog.v(SURFACE_TAG, "destroy: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
sSurfaces.remove(this);
}
@@ -503,7 +504,7 @@ class WindowStateAnimator {
public void release() {
super.release();
Slog.v(SURFACE_TAG, "release: " + this + ". Called by "
- + WindowManagerService.getCallers(3));
+ + Debug.getCallers(3));
sSurfaces.remove(this);
}