Loading tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +0 −27 Original line number Diff line number Diff line Loading @@ -1092,33 +1092,6 @@ public final class Canvas_Delegate { native_drawText(nativeCanvas, text, start, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, char[] text, int index, int count, float x, float y, int flags, int paint) { native_drawText(nativeCanvas, text, index, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, String text, int start, int end, float x, float y, int flags, int paint) { int count = end - start; char[] buffer = TemporaryBuffer.obtain(count); TextUtils.getChars(text, start, end, buffer, 0); native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawGlyphs(int nativeCanvas, char[] glyphs, int index, int count, float x, float y, int flags, int paint) { // FIXME Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED, "Canvas.drawGlyphs is not supported.", null, null /*data*/); } @LayoutlibDelegate /*package*/ static void native_drawPosText(int nativeCanvas, char[] text, int index, Loading tools/layoutlib/bridge/src/android/text/AndroidBidi_Delegate.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.text; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; /** * Delegate used to provide new implementation for the native methods of {@link AndroidBidi} * * Through the layoutlib_create tool, the original methods of AndroidBidi have been replaced * by calls to methods of the same name in this delegate class. * */ public class AndroidBidi_Delegate { @LayoutlibDelegate /*package*/ static int runBidi(int dir, char[] chs, byte[] chInfo, int n, boolean haveInfo) { // return the equivalent of Layout.DIR_LEFT_TO_RIGHT // TODO: actually figure the direction. return 0; } } tools/layoutlib/bridge/src/android/view/inputmethod/InputMethodManager_Delegate.java +13 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.view.inputmethod; import com.android.layoutlib.bridge.android.BridgeIInputMethodManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import android.content.Context; import android.os.Looper; Loading @@ -44,6 +45,18 @@ public class InputMethodManager_Delegate { mainLooper); } return InputMethodManager.mInstance; } @LayoutlibDelegate /*package*/ static InputMethodManager getInstance(Context context) { synchronized (InputMethodManager.mInstanceSync) { if (InputMethodManager.mInstance != null) { return InputMethodManager.mInstance; } InputMethodManager.mInstance = new InputMethodManager(new BridgeIInputMethodManager(), Looper.myLooper()); } return InputMethodManager.mInstance; } } tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,10 @@ public class BridgeIInputMethodManager implements IInputMethodManager { return null; } public boolean setAdditionalInputMethodSubtypes(IBinder arg0, InputMethodSubtype[] arg1) throws RemoteException { // TODO Auto-generated method stub return false; } } tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ public final class CreateInfo implements ICreateInfo { "android.graphics.Typeface", "android.graphics.Xfermode", "android.os.SystemClock", "android.text.AndroidBidi", "android.util.FloatMath", "android.view.Display", "libcore.icu.ICU", Loading Loading
tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +0 −27 Original line number Diff line number Diff line Loading @@ -1092,33 +1092,6 @@ public final class Canvas_Delegate { native_drawText(nativeCanvas, text, start, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, char[] text, int index, int count, float x, float y, int flags, int paint) { native_drawText(nativeCanvas, text, index, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawTextWithGlyphs(int nativeCanvas, String text, int start, int end, float x, float y, int flags, int paint) { int count = end - start; char[] buffer = TemporaryBuffer.obtain(count); TextUtils.getChars(text, start, end, buffer, 0); native_drawText(nativeCanvas, text, 0, count, x, y, flags, paint); } @LayoutlibDelegate /*package*/ static void native_drawGlyphs(int nativeCanvas, char[] glyphs, int index, int count, float x, float y, int flags, int paint) { // FIXME Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED, "Canvas.drawGlyphs is not supported.", null, null /*data*/); } @LayoutlibDelegate /*package*/ static void native_drawPosText(int nativeCanvas, char[] text, int index, Loading
tools/layoutlib/bridge/src/android/text/AndroidBidi_Delegate.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.text; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; /** * Delegate used to provide new implementation for the native methods of {@link AndroidBidi} * * Through the layoutlib_create tool, the original methods of AndroidBidi have been replaced * by calls to methods of the same name in this delegate class. * */ public class AndroidBidi_Delegate { @LayoutlibDelegate /*package*/ static int runBidi(int dir, char[] chs, byte[] chInfo, int n, boolean haveInfo) { // return the equivalent of Layout.DIR_LEFT_TO_RIGHT // TODO: actually figure the direction. return 0; } }
tools/layoutlib/bridge/src/android/view/inputmethod/InputMethodManager_Delegate.java +13 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.view.inputmethod; import com.android.layoutlib.bridge.android.BridgeIInputMethodManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import android.content.Context; import android.os.Looper; Loading @@ -44,6 +45,18 @@ public class InputMethodManager_Delegate { mainLooper); } return InputMethodManager.mInstance; } @LayoutlibDelegate /*package*/ static InputMethodManager getInstance(Context context) { synchronized (InputMethodManager.mInstanceSync) { if (InputMethodManager.mInstance != null) { return InputMethodManager.mInstance; } InputMethodManager.mInstance = new InputMethodManager(new BridgeIInputMethodManager(), Looper.myLooper()); } return InputMethodManager.mInstance; } }
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,10 @@ public class BridgeIInputMethodManager implements IInputMethodManager { return null; } public boolean setAdditionalInputMethodSubtypes(IBinder arg0, InputMethodSubtype[] arg1) throws RemoteException { // TODO Auto-generated method stub return false; } }
tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ public final class CreateInfo implements ICreateInfo { "android.graphics.Typeface", "android.graphics.Xfermode", "android.os.SystemClock", "android.text.AndroidBidi", "android.util.FloatMath", "android.view.Display", "libcore.icu.ICU", Loading