1/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.tools.layoutlib.create;
18
19public class CreateInfo {
20    /**
21     * The list of class from layoutlib_create to inject in layoutlib.
22     */
23    public final static Class<?>[] INJECTED_CLASSES = new Class<?>[] {
24            OverrideMethod.class,
25            MethodListener.class,
26            MethodAdapter.class,
27            CreateInfo.class
28        };
29
30    /**
31     * The list of methods to stub out. Each entry must be in the form
32     *  "package.package.OuterClass$InnerClass#MethodName".
33     */
34    public final static String[] OVERRIDDEN_METHODS = new String[] {
35            "android.view.View#isInEditMode",
36            "android.content.res.Resources$Theme#obtainStyledAttributes",
37        };
38
39    /**
40     *  The list of classes to rename, must be an even list: the binary FQCN
41     *  of class to replace followed by the new FQCN.
42     */
43    public final static String[] RENAMED_CLASSES =
44        new String[] {
45            "android.graphics.Bitmap",              "android.graphics._Original_Bitmap",
46            "android.graphics.BitmapFactory",       "android.graphics._Original_BitmapFactory",
47            "android.graphics.BitmapShader",        "android.graphics._Original_BitmapShader",
48            "android.graphics.Canvas",              "android.graphics._Original_Canvas",
49            "android.graphics.ComposeShader",       "android.graphics._Original_ComposeShader",
50            "android.graphics.DashPathEffect",       "android.graphics._Original_DashPathEffect",
51            "android.graphics.LinearGradient",      "android.graphics._Original_LinearGradient",
52            "android.graphics.Matrix",              "android.graphics._Original_Matrix",
53            "android.graphics.Paint",               "android.graphics._Original_Paint",
54            "android.graphics.Path",                "android.graphics._Original_Path",
55            "android.graphics.PorterDuffXfermode",  "android.graphics._Original_PorterDuffXfermode",
56            "android.graphics.RadialGradient",      "android.graphics._Original_RadialGradient",
57            "android.graphics.Shader",              "android.graphics._Original_Shader",
58            "android.graphics.SweepGradient",       "android.graphics._Original_SweepGradient",
59            "android.graphics.Typeface",            "android.graphics._Original_Typeface",
60            "android.os.ServiceManager",            "android.os._Original_ServiceManager",
61            "android.util.FloatMath",               "android.util._Original_FloatMath",
62            "android.view.SurfaceView",             "android.view._Original_SurfaceView",
63            "android.view.accessibility.AccessibilityManager", "android.view.accessibility._Original_AccessibilityManager",
64        };
65
66    /**
67     * List of classes for which the methods returning them should be deleted.
68     * The array contains a list of null terminated section starting with the name of the class
69     * to rename in which the methods are deleted, followed by a list of return types identifying
70     * the methods to delete.
71     */
72    public final static String[] REMOVED_METHODS =
73        new String[] {
74            "android.graphics.Paint",       // class to delete methods from
75            "android.graphics.Paint$Align", // list of type identifying methods to delete
76            "android.graphics.Paint$Style",
77            "android.graphics.Paint$Join",
78            "android.graphics.Paint$Cap",
79            "android.graphics.Paint$FontMetrics",
80            "android.graphics.Paint$FontMetricsInt",
81            null };                         // separator, for next class/methods list.
82}
83
84