api-impl: use liblog for android.util.Log; use Log.v for debugging prints and Log.w for stub tracing

This commit is contained in:
Mis012
2023-09-06 17:42:24 +02:00
parent 49861ce4dd
commit 90cb1c925a
11 changed files with 181 additions and 54 deletions

View File

@@ -3,6 +3,7 @@ package android.view;
import android.content.Context;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
import android.util.Slog;
import android.util.Xml;
import java.io.FileReader;
import java.lang.reflect.Constructor;
@@ -11,6 +12,7 @@ import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
public class LayoutInflater {
private static final String TAG = "LayoutInflater";
public interface Factory {
}
@@ -33,7 +35,7 @@ public class LayoutInflater {
}
public final View createView(String name, String prefix, AttributeSet attrs) throws Exception {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>> createView(" + name + ", " + prefix + ", " + attrs + ");");
Slog.v(TAG, ">>>>>>>>>>>>>>>>>>>>>>>>> createView(" + name + ", " + prefix + ", " + attrs + ");");
String view_class_name = prefix!=null ? prefix + name : name;
Class view_class = Class.forName(view_class_name);
@@ -68,7 +70,7 @@ public class LayoutInflater {
name = attrs.getAttributeValue(null, "class");
}
System.out.println("******** Creating view: " + name);
Slog.v(TAG, "******** Creating view: " + name);
View view;
@@ -78,7 +80,7 @@ public class LayoutInflater {
view = createView(name, null, attrs);
}
System.out.println("Created view is: " + view);
Slog.v(TAG, "Created view is: " + view);
return view;
}
@@ -116,9 +118,9 @@ public class LayoutInflater {
final String name = parser.getName();
System.out.println("**************************");
System.out.println("Creating root view: " + name);
System.out.println("**************************");
Slog.v(TAG, "**************************");
Slog.v(TAG, "Creating root view: " + name);
Slog.v(TAG, "**************************");
if (name.equals("merge")) {
if (root == null || !attachToRoot) {
@@ -139,7 +141,7 @@ public class LayoutInflater {
ViewGroup.LayoutParams params = null;
if (root != null) {
System.out.println("Creating params from root: " + root);
Slog.v(TAG, "Creating params from root: " + root);
// Create layout params that match root, if supplied
params = root.generateLayoutParams(attrs);
@@ -150,12 +152,12 @@ public class LayoutInflater {
}
}
System.out.println("-----> start inflating children");
Slog.v(TAG, "-----> start inflating children");
// Inflate all children under temp
rInflate(parser, temp, attrs, true);
System.out.println("-----> done inflating children");
Slog.v(TAG, "-----> done inflating children");
// We are supposed to attach all the views we found (int temp)
// to root. Do that now.