diff options
Diffstat (limited to 'tools/layoutlib/bridge/src/android')
7 files changed, 149 insertions, 169 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java index 5256b58..d85c3d1 100644 --- a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java @@ -24,10 +24,13 @@ import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import android.content.res.BridgeResources.NinePatchInputStream; import android.graphics.BitmapFactory.Options; +import android.graphics.Bitmap_Delegate.BitmapCreateFlags; import java.io.FileDescriptor; import java.io.IOException; import java.io.InputStream; +import java.util.EnumSet; +import java.util.Set; /** * Delegate implementing the native methods of android.graphics.BitmapFactory @@ -41,65 +44,20 @@ import java.io.InputStream; */ /*package*/ class BitmapFactory_Delegate { - // ------ Java delegates ------ - - @LayoutlibDelegate - /*package*/ static Bitmap finishDecode(Bitmap bm, Rect outPadding, Options opts) { - if (bm == null || opts == null) { - return bm; - } - - final int density = opts.inDensity; - if (density == 0) { - return bm; - } - - bm.setDensity(density); - final int targetDensity = opts.inTargetDensity; - if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { - return bm; - } - - byte[] np = bm.getNinePatchChunk(); - final boolean isNinePatch = np != null && NinePatch.isNinePatchChunk(np); - // DELEGATE CHANGE: never scale 9-patch - if (opts.inScaled && isNinePatch == false) { - float scale = targetDensity / (float)density; - // TODO: This is very inefficient and should be done in native by Skia - final Bitmap oldBitmap = bm; - bm = Bitmap.createScaledBitmap(oldBitmap, (int) (bm.getWidth() * scale + 0.5f), - (int) (bm.getHeight() * scale + 0.5f), true); - oldBitmap.recycle(); - - if (isNinePatch) { - np = nativeScaleNinePatch(np, scale, outPadding); - bm.setNinePatchChunk(np); - } - bm.setDensity(targetDensity); - } - - return bm; - } - - // ------ Native Delegates ------ @LayoutlibDelegate /*package*/ static Bitmap nativeDecodeStream(InputStream is, byte[] storage, Rect padding, Options opts) { - return nativeDecodeStream(is, storage, padding, opts, false, 1.f); - } - - @LayoutlibDelegate - /*package*/ static Bitmap nativeDecodeStream(InputStream is, byte[] storage, - Rect padding, Options opts, boolean applyScale, float scale) { Bitmap bm = null; - //TODO support rescaling - Density density = Density.MEDIUM; + Set<BitmapCreateFlags> bitmapCreateFlags = EnumSet.of(BitmapCreateFlags.MUTABLE); if (opts != null) { density = Density.getEnum(opts.inDensity); + if (opts.inPremultiplied) { + bitmapCreateFlags.add(BitmapCreateFlags.PREMULTIPLIED); + } } try { @@ -112,7 +70,7 @@ import java.io.InputStream; npis, true /*is9Patch*/, false /*convert*/); // get the bitmap and chunk objects. - bm = Bitmap_Delegate.createBitmap(ninePatch.getImage(), true /*isMutable*/, + bm = Bitmap_Delegate.createBitmap(ninePatch.getImage(), bitmapCreateFlags, density); NinePatchChunk chunk = ninePatch.getChunk(); @@ -127,7 +85,7 @@ import java.io.InputStream; padding.bottom = paddingarray[3]; } else { // load the bitmap directly. - bm = Bitmap_Delegate.createBitmap(is, true, density); + bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density); } } catch (IOException e) { Bridge.getLog().error(null,"Failed to load image" , e, null); @@ -150,13 +108,6 @@ import java.io.InputStream; } @LayoutlibDelegate - /*package*/ static Bitmap nativeDecodeAsset(int asset, Rect padding, Options opts, - boolean applyScale, float scale) { - opts.inBitmap = null; - return null; - } - - @LayoutlibDelegate /*package*/ static Bitmap nativeDecodeByteArray(byte[] data, int offset, int length, Options opts) { opts.inBitmap = null; @@ -164,13 +115,6 @@ import java.io.InputStream; } @LayoutlibDelegate - /*package*/ static byte[] nativeScaleNinePatch(byte[] chunk, float scale, Rect pad) { - // don't scale for now. This should not be called anyway since we re-implement - // BitmapFactory.finishDecode(); - return chunk; - } - - @LayoutlibDelegate /*package*/ static boolean nativeIsSeekable(FileDescriptor fd) { return true; } diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java index 9c7a0cc..f74e4d1 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java @@ -33,6 +33,8 @@ import java.io.InputStream; import java.io.OutputStream; import java.nio.Buffer; import java.util.Arrays; +import java.util.EnumSet; +import java.util.Set; import javax.imageio.ImageIO; @@ -51,6 +53,10 @@ import javax.imageio.ImageIO; */ public final class Bitmap_Delegate { + public enum BitmapCreateFlags { + PREMULTIPLIED, MUTABLE + } + // ---- delegate manager ---- private static final DelegateManager<Bitmap_Delegate> sManager = new DelegateManager<Bitmap_Delegate>(Bitmap_Delegate.class); @@ -93,10 +99,25 @@ public final class Bitmap_Delegate { */ public static Bitmap createBitmap(File input, boolean isMutable, Density density) throws IOException { + return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); + } + + /** + * Creates and returns a {@link Bitmap} initialized with the given file content. + * + * @param input the file from which to read the bitmap content + * @param density the density associated with the bitmap + * + * @see Bitmap#isPremultiplied() + * @see Bitmap#isMutable() + * @see Bitmap#getDensity() + */ + public static Bitmap createBitmap(File input, Set<BitmapCreateFlags> createFlags, + Density density) throws IOException { // create a delegate with the content of the file. Bitmap_Delegate delegate = new Bitmap_Delegate(ImageIO.read(input), Config.ARGB_8888); - return createBitmap(delegate, isMutable, density.getDpiValue()); + return createBitmap(delegate, createFlags, density.getDpiValue()); } /** @@ -111,10 +132,26 @@ public final class Bitmap_Delegate { */ public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) throws IOException { + return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); + } + + /** + * Creates and returns a {@link Bitmap} initialized with the given stream content. + * + * @param input the stream from which to read the bitmap content + * @param createFlags + * @param density the density associated with the bitmap + * + * @see Bitmap#isPremultiplied() + * @see Bitmap#isMutable() + * @see Bitmap#getDensity() + */ + public static Bitmap createBitmap(InputStream input, Set<BitmapCreateFlags> createFlags, + Density density) throws IOException { // create a delegate with the content of the stream. Bitmap_Delegate delegate = new Bitmap_Delegate(ImageIO.read(input), Config.ARGB_8888); - return createBitmap(delegate, isMutable, density.getDpiValue()); + return createBitmap(delegate, createFlags, density.getDpiValue()); } /** @@ -129,10 +166,26 @@ public final class Bitmap_Delegate { */ public static Bitmap createBitmap(BufferedImage image, boolean isMutable, Density density) throws IOException { + return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density); + } + + /** + * Creates and returns a {@link Bitmap} initialized with the given {@link BufferedImage} + * + * @param image the bitmap content + * @param createFlags + * @param density the density associated with the bitmap + * + * @see Bitmap#isPremultiplied() + * @see Bitmap#isMutable() + * @see Bitmap#getDensity() + */ + public static Bitmap createBitmap(BufferedImage image, Set<BitmapCreateFlags> createFlags, + Density density) throws IOException { // create a delegate with the given image. Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.ARGB_8888); - return createBitmap(delegate, isMutable, density.getDpiValue()); + return createBitmap(delegate, createFlags, density.getDpiValue()); } /** @@ -203,7 +256,7 @@ public final class Bitmap_Delegate { @LayoutlibDelegate /*package*/ static Bitmap nativeCreate(int[] colors, int offset, int stride, int width, - int height, int nativeConfig, boolean mutable) { + int height, int nativeConfig, boolean isMutable) { int imageType = getBufferedImageType(nativeConfig); // create the image @@ -216,7 +269,8 @@ public final class Bitmap_Delegate { // create a delegate with the content of the stream. Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.nativeToConfig(nativeConfig)); - return createBitmap(delegate, mutable, Bitmap.getDefaultDensity()); + return createBitmap(delegate, getPremultipliedBitmapCreateFlags(isMutable), + Bitmap.getDefaultDensity()); } @LayoutlibDelegate @@ -244,7 +298,8 @@ public final class Bitmap_Delegate { // create a delegate with the content of the stream. Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.nativeToConfig(nativeConfig)); - return createBitmap(delegate, isMutable, Bitmap.getDefaultDensity()); + return createBitmap(delegate, getPremultipliedBitmapCreateFlags(isMutable), + Bitmap.getDefaultDensity()); } @LayoutlibDelegate @@ -259,6 +314,13 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate + /*package*/ static void nativeReconfigure(int nativeBitmap, int width, int height, + int config, int allocSize) { + Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, + "Bitmap.reconfigure() is not supported", null /*data*/); + } + + @LayoutlibDelegate /*package*/ static boolean nativeCompress(int nativeBitmap, int format, int quality, OutputStream stream, byte[] tempStorage) { Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, @@ -287,28 +349,6 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate - /*package*/ static int nativeWidth(int nativeBitmap) { - // get the delegate from the native int. - Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); - if (delegate == null) { - return 0; - } - - return delegate.mImage.getWidth(); - } - - @LayoutlibDelegate - /*package*/ static int nativeHeight(int nativeBitmap) { - // get the delegate from the native int. - Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); - if (delegate == null) { - return 0; - } - - return delegate.mImage.getHeight(); - } - - @LayoutlibDelegate /*package*/ static int nativeRowBytes(int nativeBitmap) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); @@ -353,19 +393,21 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate - /*package*/ static int nativeGetPixel(int nativeBitmap, int x, int y) { + /*package*/ static int nativeGetPixel(int nativeBitmap, int x, int y, + boolean isPremultiplied) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { return 0; } + // TODO: Support isPremultiplied. return delegate.mImage.getRGB(x, y); } @LayoutlibDelegate /*package*/ static void nativeGetPixels(int nativeBitmap, int[] pixels, int offset, - int stride, int x, int y, int width, int height) { + int stride, int x, int y, int width, int height, boolean isPremultiplied) { Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { return; @@ -376,7 +418,8 @@ public final class Bitmap_Delegate { @LayoutlibDelegate - /*package*/ static void nativeSetPixel(int nativeBitmap, int x, int y, int color) { + /*package*/ static void nativeSetPixel(int nativeBitmap, int x, int y, int color, + boolean isPremultiplied) { Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { return; @@ -387,7 +430,7 @@ public final class Bitmap_Delegate { @LayoutlibDelegate /*package*/ static void nativeSetPixels(int nativeBitmap, int[] colors, int offset, - int stride, int x, int y, int width, int height) { + int stride, int x, int y, int width, int height, boolean isPremultiplied) { Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { return; @@ -465,7 +508,7 @@ public final class Bitmap_Delegate { Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.ALPHA_8); // the density doesn't matter, it's set by the Java method. - return createBitmap(delegate, false /*isMutable*/, + return createBitmap(delegate, EnumSet.of(BitmapCreateFlags.MUTABLE), Density.DEFAULT_DENSITY /*density*/); } @@ -475,7 +518,8 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate - /*package*/ static void nativeSetHasAlpha(int nativeBitmap, boolean hasAlpha) { + /*package*/ static void nativeSetAlphaAndPremultiplied(int nativeBitmap, boolean hasAlpha, + boolean isPremul) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { @@ -547,13 +591,27 @@ public final class Bitmap_Delegate { mConfig = config; } - private static Bitmap createBitmap(Bitmap_Delegate delegate, boolean isMutable, int density) { + private static Bitmap createBitmap(Bitmap_Delegate delegate, + Set<BitmapCreateFlags> createFlags, int density) { // get its native_int int nativeInt = sManager.addNewDelegate(delegate); + int width = delegate.mImage.getWidth(); + int height = delegate.mImage.getHeight(); + boolean isMutable = createFlags.contains(BitmapCreateFlags.MUTABLE); + boolean isPremultiplied = createFlags.contains(BitmapCreateFlags.PREMULTIPLIED); + // and create/return a new Bitmap with it - return new Bitmap(nativeInt, null /* buffer */, isMutable, null /*ninePatchChunk*/, - density); + return new Bitmap(nativeInt, null /* buffer */, width, height, density, isMutable, + isPremultiplied, null /*ninePatchChunk*/, null /* layoutBounds */); + } + + private static Set<BitmapCreateFlags> getPremultipliedBitmapCreateFlags(boolean isMutable) { + Set<BitmapCreateFlags> createFlags = EnumSet.of(BitmapCreateFlags.PREMULTIPLIED); + if (isMutable) { + createFlags.add(BitmapCreateFlags.MUTABLE); + } + return createFlags; } /** diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java index d1d0f09..10ad0a3 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java @@ -1076,14 +1076,6 @@ public final class Canvas_Delegate { } @LayoutlibDelegate - /*package*/ static void native_drawPicture(int nativeCanvas, - int nativePicture) { - // FIXME - Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED, - "Canvas.drawPicture is not supported.", null, null /*data*/); - } - - @LayoutlibDelegate /*package*/ static void finalizer(int nativeCanvas) { // get the delegate from the native int so that it can be disposed. Canvas_Delegate canvasDelegate = sManager.getDelegate(nativeCanvas); diff --git a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java index 390044a..a79ec8f 100644 --- a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java @@ -48,6 +48,11 @@ import java.util.Map; */ public final class NinePatch_Delegate { + // ---- delegate manager ---- + private static final DelegateManager<NinePatch_Delegate> sManager = + new DelegateManager<NinePatch_Delegate>(NinePatch_Delegate.class); + + // ---- delegate helper data ---- /** * Cache map for {@link NinePatchChunk}. * When the chunks are created they are serialized into a byte[], and both are put @@ -60,6 +65,10 @@ public final class NinePatch_Delegate { private final static Map<byte[], SoftReference<NinePatchChunk>> sChunkCache = new HashMap<byte[], SoftReference<NinePatchChunk>>(); + // ---- delegate data ---- + private byte[] chunk; + + // ---- Public Helper methods ---- /** @@ -149,32 +158,40 @@ public final class NinePatch_Delegate { } @LayoutlibDelegate - /*package*/ static void validateNinePatchChunk(int bitmap, byte[] chunk) { + /*package*/ static int validateNinePatchChunk(int bitmap, byte[] chunk) { // the default JNI implementation only checks that the byte[] has the same // size as the C struct it represent. Since we cannot do the same check (serialization // will return different size depending on content), we do nothing. + NinePatch_Delegate newDelegate = new NinePatch_Delegate(); + newDelegate.chunk = chunk; + return sManager.addNewDelegate(newDelegate); + } + + @LayoutlibDelegate + /*package*/ static void nativeFinalize(int chunk) { + sManager.removeJavaReferenceFor(chunk); } @LayoutlibDelegate /*package*/ static void nativeDraw(int canvas_instance, RectF loc, int bitmap_instance, - byte[] c, int paint_instance_or_null, int destDensity, int srcDensity) { + int chunk, int paint_instance_or_null, int destDensity, int srcDensity) { draw(canvas_instance, (int) loc.left, (int) loc.top, (int) loc.right, (int) loc.bottom, - bitmap_instance, c, paint_instance_or_null, + bitmap_instance, chunk, paint_instance_or_null, destDensity, srcDensity); } @LayoutlibDelegate /*package*/ static void nativeDraw(int canvas_instance, Rect loc, int bitmap_instance, - byte[] c, int paint_instance_or_null, int destDensity, int srcDensity) { + int chunk, int paint_instance_or_null, int destDensity, int srcDensity) { draw(canvas_instance, loc.left, loc.top, loc.right, loc.bottom, - bitmap_instance, c, paint_instance_or_null, + bitmap_instance, chunk, paint_instance_or_null, destDensity, srcDensity); } @LayoutlibDelegate - /*package*/ static int nativeGetTransparentRegion(int bitmap, byte[] chunk, Rect location) { + /*package*/ static int nativeGetTransparentRegion(int bitmap, int chunk, Rect location) { return 0; } @@ -182,7 +199,7 @@ public final class NinePatch_Delegate { private static void draw(int canvas_instance, final int left, final int top, final int right, final int bottom, - int bitmap_instance, byte[] c, int paint_instance_or_null, + int bitmap_instance, int chunk, int paint_instance_or_null, final int destDensity, final int srcDensity) { // get the delegate from the native int. final Bitmap_Delegate bitmap_delegate = Bitmap_Delegate.getDelegate(bitmap_instance); @@ -190,6 +207,11 @@ public final class NinePatch_Delegate { return; } + byte[] c = null; + NinePatch_Delegate delegate = sManager.getDelegate(chunk); + if (delegate != null) { + c = delegate.chunk; + } if (c == null) { // not a 9-patch? BufferedImage image = bitmap_delegate.getImage(); diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java index 64f19d3..9d80be9 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java @@ -474,6 +474,12 @@ public final class Path_Delegate { } @LayoutlibDelegate + /*package*/ static boolean native_op(int nPath1, int nPath2, int op, int result) { + Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, "Path.op() not supported", null); + return false; + } + + @LayoutlibDelegate /*package*/ static void finalizer(int nPath) { sManager.removeJavaReferenceFor(nPath); } diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java index 434b131..dd2cbc1 100644 --- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java +++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java @@ -49,15 +49,13 @@ public class IWindowManagerImpl implements IWindowManager { private final Configuration mConfig; private final DisplayMetrics mMetrics; private final int mRotation; - private final boolean mHasSystemNavBar; private final boolean mHasNavigationBar; public IWindowManagerImpl(Configuration config, DisplayMetrics metrics, int rotation, - boolean hasSystemNavBar, boolean hasNavigationBar) { + boolean hasNavigationBar) { mConfig = config; mMetrics = metrics; mRotation = rotation; - mHasSystemNavBar = hasSystemNavBar; mHasNavigationBar = hasNavigationBar; } @@ -79,16 +77,11 @@ public class IWindowManagerImpl implements IWindowManager { return mHasNavigationBar; } - @Override - public boolean hasSystemNavBar() throws RemoteException { - return mHasSystemNavBar; - } - // ---- unused implementation of IWindowManager ---- @Override - public void addAppToken(int arg0, IApplicationToken arg1, int arg2, int arg3, boolean arg4, - boolean arg5) + public void addAppToken(int arg0, IApplicationToken arg1, int arg2, int arg3, int arg4, + boolean arg5, boolean arg6, int arg7, int arg8) throws RemoteException { // TODO Auto-generated method stub @@ -211,24 +204,6 @@ public class IWindowManagerImpl implements IWindowManager { } @Override - public void moveAppToken(int arg0, IBinder arg1) throws RemoteException { - // TODO Auto-generated method stub - - } - - @Override - public void moveAppTokensToBottom(List<IBinder> arg0) throws RemoteException { - // TODO Auto-generated method stub - - } - - @Override - public void moveAppTokensToTop(List<IBinder> arg0) throws RemoteException { - // TODO Auto-generated method stub - - } - - @Override public IWindowSession openSession(IInputMethodClient arg0, IInputContext arg1) throws RemoteException { // TODO Auto-generated method stub @@ -291,8 +266,8 @@ public class IWindowManagerImpl implements IWindowManager { } @Override - public Bitmap screenshotApplications(IBinder arg0, int displayId, int arg1, int arg2) - throws RemoteException { + public Bitmap screenshotApplications(IBinder arg0, int displayId, int arg1, + int arg2, boolean arg3) throws RemoteException { // TODO Auto-generated method stub return null; } @@ -322,7 +297,7 @@ public class IWindowManagerImpl implements IWindowManager { @Override public void setAppStartingWindow(IBinder arg0, String arg1, int arg2, CompatibilityInfo arg3, - CharSequence arg4, int arg5, int arg6, int arg7, IBinder arg8, boolean arg9) + CharSequence arg4, int arg5, int arg6, int arg7, int arg8, IBinder arg9, boolean arg10) throws RemoteException { // TODO Auto-generated method stub } @@ -483,11 +458,6 @@ public class IWindowManagerImpl implements IWindowManager { } @Override - public void showAssistant() { - - } - - @Override public IBinder getFocusedWindowToken() { // TODO Auto-generated method stub return null; @@ -524,4 +494,8 @@ public class IWindowManagerImpl implements IWindowManager { // TODO Auto-generated method stub return false; } + + @Override + public void setTouchExplorationEnabled(boolean enabled) { + } } diff --git a/tools/layoutlib/bridge/src/android/webkit/WebView.java b/tools/layoutlib/bridge/src/android/webkit/WebView.java index 3b66188..202f204 100644 --- a/tools/layoutlib/bridge/src/android/webkit/WebView.java +++ b/tools/layoutlib/bridge/src/android/webkit/WebView.java @@ -99,14 +99,6 @@ public class WebView extends MockView { public static void disablePlatformNotifications() { } - public WebBackForwardList saveState(Bundle outState) { - return null; - } - - public WebBackForwardList restoreState(Bundle inState) { - return null; - } - public void loadUrl(String url) { } @@ -213,10 +205,6 @@ public class WebView extends MockView { public void clearSslPreferences() { } - public WebBackForwardList copyBackForwardList() { - return null; - } - public static String findAddress(String addr) { return null; } @@ -236,10 +224,6 @@ public class WebView extends MockView { public void addJavascriptInterface(Object obj, String interfaceName) { } - public WebSettings getSettings() { - return null; - } - public View getZoomControls() { return null; } |
