Merge "Make Layoutlib compile on Java 6."
This commit is contained in:
committed by
Android (Google) Code Review
commit
c445ed701a
2
tools/layoutlib/bridge/.settings/README.txt
Normal file
2
tools/layoutlib/bridge/.settings/README.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Copy this in eclipse project as a .settings folder at the root.
|
||||
This ensure proper compilation compliance and warning/error levels.
|
93
tools/layoutlib/bridge/.settings/org.eclipse.jdt.core.prefs
Normal file
93
tools/layoutlib/bridge/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,93 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=com.android.annotations.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.android.annotations.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=com.android.annotations.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
@ -23,11 +23,10 @@ import com.android.ide.common.rendering.api.Result.Status;
|
||||
import com.android.layoutlib.bridge.Bridge;
|
||||
import com.android.layoutlib.bridge.impl.RenderSessionImpl;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.os.Handler;
|
||||
import android.os.Handler_Delegate;
|
||||
import android.os.Message;
|
||||
import android.os.Handler_Delegate.IHandlerCallback;
|
||||
import android.os.Message;
|
||||
|
||||
import java.util.PriorityQueue;
|
||||
import java.util.Queue;
|
||||
@ -57,6 +56,7 @@ public abstract class AnimationThread extends Thread {
|
||||
mUptimeMillis = uptimeMillis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(MessageBundle bundle) {
|
||||
if (mUptimeMillis < bundle.mUptimeMillis) {
|
||||
return -1;
|
||||
@ -85,6 +85,7 @@ public abstract class AnimationThread extends Thread {
|
||||
Bridge.prepareThread();
|
||||
try {
|
||||
Handler_Delegate.setCallback(new IHandlerCallback() {
|
||||
@Override
|
||||
public void sendMessageAtTime(Handler handler, Message msg, long uptimeMillis) {
|
||||
if (msg.what == ValueAnimator.ANIMATION_START /*||
|
||||
FIXME: The ANIMATION_FRAME message no longer exists. Instead,
|
||||
|
@ -105,6 +105,7 @@ public class BitmapShader_Delegate extends Shader_Delegate {
|
||||
mTileModeY = tileModeY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.PaintContext createContext(
|
||||
java.awt.image.ColorModel colorModel,
|
||||
java.awt.Rectangle deviceBounds,
|
||||
@ -148,13 +149,16 @@ public class BitmapShader_Delegate extends Shader_Delegate {
|
||||
mColorModel = colorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.ColorModel getColorModel() {
|
||||
return mColorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.Raster getRaster(int x, int y, int w, int h) {
|
||||
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(w, h,
|
||||
java.awt.image.BufferedImage.TYPE_INT_ARGB);
|
||||
@ -240,6 +244,7 @@ public class BitmapShader_Delegate extends Shader_Delegate {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getTransparency() {
|
||||
return java.awt.Paint.TRANSLUCENT;
|
||||
}
|
||||
|
@ -291,6 +291,7 @@ public final class Canvas_Delegate {
|
||||
Paint paint) {
|
||||
draw(thisCanvas.mNativeCanvas, paint.mNativePaint, false /*compositeOnly*/,
|
||||
false /*forceSrcMode*/, new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
for (int i = 0 ; i < count ; i += 4) {
|
||||
graphics.drawLine((int)pts[i + offset], (int)pts[i + offset + 1],
|
||||
@ -619,6 +620,7 @@ public final class Canvas_Delegate {
|
||||
final int h = canvasDelegate.mBitmap.getImage().getHeight();
|
||||
draw(nativeCanvas, new GcSnapshot.Drawable() {
|
||||
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paint) {
|
||||
// reset its transform just in case
|
||||
graphics.setTransform(new AffineTransform());
|
||||
@ -651,6 +653,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
graphics.drawLine((int)startX, (int)startY, (int)stopX, (int)stopY);
|
||||
}
|
||||
@ -669,6 +672,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
int style = paintDelegate.getStyle();
|
||||
|
||||
@ -693,6 +697,7 @@ public final class Canvas_Delegate {
|
||||
if (oval.right > oval.left && oval.bottom > oval.top) {
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
int style = paintDelegate.getStyle();
|
||||
|
||||
@ -728,6 +733,7 @@ public final class Canvas_Delegate {
|
||||
if (oval.right > oval.left && oval.bottom > oval.top) {
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
int style = paintDelegate.getStyle();
|
||||
|
||||
@ -757,6 +763,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
int style = paintDelegate.getStyle();
|
||||
|
||||
@ -789,6 +796,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
Shape shape = pathDelegate.getJavaShape();
|
||||
int style = paintDelegate.getStyle();
|
||||
@ -892,6 +900,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, nativePaintOrZero, true /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paint) {
|
||||
if (paint != null && paint.isFilterBitmap()) {
|
||||
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
@ -931,6 +940,7 @@ public final class Canvas_Delegate {
|
||||
final AffineTransform mtx = matrixDelegate.getAffineTransform();
|
||||
|
||||
canvasDelegate.getSnapshot().draw(new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paint) {
|
||||
if (paint != null && paint.isFilterBitmap()) {
|
||||
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
@ -970,6 +980,7 @@ public final class Canvas_Delegate {
|
||||
final float startX, final float startY, int flags, int paint) {
|
||||
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||
// WARNING: the logic in this method is similar to Paint_Delegate.measureText.
|
||||
// Any change to this method should be reflected in Paint.measureText
|
||||
@ -1279,6 +1290,7 @@ public final class Canvas_Delegate {
|
||||
|
||||
draw(nativeCanvas, nativePaintOrZero, true /*compositeOnly*/, sBoolOut[0],
|
||||
new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paint) {
|
||||
if (paint != null && paint.isFilterBitmap()) {
|
||||
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
|
@ -87,6 +87,7 @@ public abstract class Gradient_Delegate extends Shader_Delegate {
|
||||
mTileMode = tileMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTransparency() {
|
||||
return java.awt.Paint.TRANSLUCENT;
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ public final class LinearGradient_Delegate extends Gradient_Delegate {
|
||||
mDSize2 = mDx * mDx + mDy * mDy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.PaintContext createContext(
|
||||
java.awt.image.ColorModel colorModel,
|
||||
java.awt.Rectangle deviceBounds,
|
||||
@ -176,13 +177,16 @@ public final class LinearGradient_Delegate extends Gradient_Delegate {
|
||||
mColorModel = colorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.ColorModel getColorModel() {
|
||||
return mColorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.Raster getRaster(int x, int y, int w, int h) {
|
||||
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(w, h,
|
||||
java.awt.image.BufferedImage.TYPE_INT_ARGB);
|
||||
|
@ -215,6 +215,7 @@ public final class NinePatch_Delegate {
|
||||
Paint_Delegate paint_delegate = Paint_Delegate.getDelegate(paint_instance_or_null);
|
||||
|
||||
canvas_delegate.getSnapshot().draw(new GcSnapshot.Drawable() {
|
||||
@Override
|
||||
public void draw(Graphics2D graphics, Paint_Delegate paint) {
|
||||
chunkObject.draw(bitmap_delegate.getImage(), graphics,
|
||||
left, top, right - left, bottom - top, destDensity, srcDensity);
|
||||
|
@ -118,6 +118,7 @@ public class RadialGradient_Delegate extends Gradient_Delegate {
|
||||
mRadius = radius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.PaintContext createContext(
|
||||
java.awt.image.ColorModel colorModel,
|
||||
java.awt.Rectangle deviceBounds,
|
||||
@ -162,13 +163,16 @@ public class RadialGradient_Delegate extends Gradient_Delegate {
|
||||
mColorModel = colorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.ColorModel getColorModel() {
|
||||
return mColorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.Raster getRaster(int x, int y, int w, int h) {
|
||||
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(w, h,
|
||||
java.awt.image.BufferedImage.TYPE_INT_ARGB);
|
||||
|
@ -110,6 +110,7 @@ public class SweepGradient_Delegate extends Gradient_Delegate {
|
||||
mCy = cy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.PaintContext createContext(
|
||||
java.awt.image.ColorModel colorModel,
|
||||
java.awt.Rectangle deviceBounds,
|
||||
@ -154,13 +155,16 @@ public class SweepGradient_Delegate extends Gradient_Delegate {
|
||||
mColorModel = colorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.ColorModel getColorModel() {
|
||||
return mColorModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.awt.image.Raster getRaster(int x, int y, int w, int h) {
|
||||
java.awt.image.BufferedImage image = new java.awt.image.BufferedImage(w, h,
|
||||
java.awt.image.BufferedImage.TYPE_INT_ARGB);
|
||||
|
@ -27,7 +27,7 @@ import android.util.AttributeSet;
|
||||
* Mock version of the SurfaceView.
|
||||
* Only non override public methods from the real SurfaceView have been added in there.
|
||||
* Methods that take an unknown class as parameter or as return object, have been removed for now.
|
||||
*
|
||||
*
|
||||
* TODO: generate automatically.
|
||||
*
|
||||
*/
|
||||
@ -36,7 +36,7 @@ public class SurfaceView extends MockView {
|
||||
public SurfaceView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
|
||||
public SurfaceView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs , 0);
|
||||
}
|
||||
@ -44,53 +44,66 @@ public class SurfaceView extends MockView {
|
||||
public SurfaceView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
|
||||
public SurfaceHolder getHolder() {
|
||||
return mSurfaceHolder;
|
||||
}
|
||||
|
||||
private SurfaceHolder mSurfaceHolder = new SurfaceHolder() {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isCreating() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCallback(Callback callback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeCallback(Callback callback) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setFixedSize(int width, int height) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSizeFromLayout() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFormat(int format) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(int type) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setKeepScreenOn(boolean screenOn) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Canvas lockCanvas() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Canvas lockCanvas(Rect dirty) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unlockCanvasAndPost(Canvas canvas) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Surface getSurface() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rect getSurfaceFrame() {
|
||||
return null;
|
||||
}
|
||||
|
@ -43,28 +43,33 @@ public class ITextServicesManager_Stub_Delegate {
|
||||
|
||||
private static class FakeTextServicesManager implements ITextServicesManager {
|
||||
|
||||
@Override
|
||||
public void finishSpellCheckerService(ISpellCheckerSessionListener arg0)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellCheckerInfo getCurrentSpellChecker(String arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellCheckerSubtype getCurrentSpellCheckerSubtype(String arg0, boolean arg1)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellCheckerInfo[] getEnabledSpellCheckers() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSpellCheckerService(String arg0, String arg1,
|
||||
ITextServicesSessionListener arg2, ISpellCheckerSessionListener arg3, Bundle arg4)
|
||||
throws RemoteException {
|
||||
@ -72,26 +77,31 @@ public class ITextServicesManager_Stub_Delegate {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpellCheckerEnabled() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentSpellChecker(String arg0, String arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentSpellCheckerSubtype(String arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSpellCheckerEnabled(boolean arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
@ -37,151 +37,179 @@ import java.util.List;
|
||||
*/
|
||||
public class BridgeIInputMethodManager implements IInputMethodManager {
|
||||
|
||||
@Override
|
||||
public void addClient(IInputMethodClient arg0, IInputContext arg1, int arg2, int arg3)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishInput(IInputMethodClient arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputMethodSubtype getCurrentInputMethodSubtype() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InputMethodInfo> getEnabledInputMethodList() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(InputMethodInfo arg0,
|
||||
boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InputMethodInfo> getInputMethodList() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputMethodSubtype getLastInputMethodSubtype() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getShortcutInputMethodsAndSubtypes() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideMySoftInput(IBinder arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifySuggestionPicked(SuggestionSpan arg0, String arg1, int arg2)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSuggestionSpansForNotification(SuggestionSpan[] arg0)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeClient(IInputMethodClient arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAdditionalInputMethodSubtypes(String arg0, InputMethodSubtype[] arg1)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setCurrentInputMethodSubtype(InputMethodSubtype arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImeWindowStatus(IBinder arg0, int arg1, int arg2) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInputMethod(IBinder arg0, String arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInputMethodAndSubtype(IBinder arg0, String arg1, InputMethodSubtype arg2)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setInputMethodEnabled(String arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showInputMethodAndSubtypeEnablerFromClient(IInputMethodClient arg0, String arg1)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showInputMethodPickerFromClient(IInputMethodClient arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMySoftInput(IBinder arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showSoftInput(IInputMethodClient arg0, int arg1, ResultReceiver arg2)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputBindResult startInput(IInputMethodClient arg0, IInputContext arg1, EditorInfo arg2,
|
||||
boolean arg3, boolean arg4) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean switchToLastInputMethod(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatusIcon(IBinder arg0, String arg1, int arg2) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowGainedFocus(IInputMethodClient arg0, IBinder arg1, boolean arg2,
|
||||
boolean arg3, int arg4, boolean arg5, int arg6) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
@ -37,6 +37,7 @@ public class BridgeLayoutParamsMapAttributes implements AttributeSet {
|
||||
mAttributes = attributes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(String namespace, String name) {
|
||||
if (BridgeConstants.NS_RESOURCES.equals(namespace)) {
|
||||
return mAttributes.get(name);
|
||||
@ -49,93 +50,114 @@ public class BridgeLayoutParamsMapAttributes implements AttributeSet {
|
||||
// BridgeContext#obtainStyledAttributes(AttributeSet, int[], int, int)
|
||||
// Should they ever be called, we'll just implement them on a need basis.
|
||||
|
||||
@Override
|
||||
public int getAttributeCount() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeName(int index) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(int index) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPositionDescription() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeNameResource(int index) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeListValue(String namespace, String attribute,
|
||||
String[] options, int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAttributeBooleanValue(String namespace, String attribute,
|
||||
boolean defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeResourceValue(String namespace, String attribute,
|
||||
int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeIntValue(String namespace, String attribute,
|
||||
int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeUnsignedIntValue(String namespace, String attribute,
|
||||
int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttributeFloatValue(String namespace, String attribute,
|
||||
float defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeListValue(int index,
|
||||
String[] options, int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAttributeBooleanValue(int index, boolean defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeResourceValue(int index, int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeIntValue(int index, int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeUnsignedIntValue(int index, int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttributeFloatValue(int index, float defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdAttribute() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClassAttribute() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIdAttributeResourceValue(int defaultValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStyleAttribute() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
@ -24,72 +24,67 @@ import android.os.ParcelFileDescriptor;
|
||||
import android.os.RemoteException;
|
||||
import android.view.DragEvent;
|
||||
import android.view.IWindow;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
/**
|
||||
* Implementation of {@link IWindow} to pass to the AttachInfo.
|
||||
*/
|
||||
public final class BridgeWindow implements IWindow {
|
||||
|
||||
@Override
|
||||
public void dispatchAppVisibility(boolean arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchGetNewSurface() throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
public void dispatchKey(KeyEvent arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
public void dispatchPointer(MotionEvent arg0, long arg1, boolean arg2) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
public void dispatchTrackball(MotionEvent arg0, long arg1, boolean arg2)
|
||||
throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeCommand(String arg0, String arg1, ParcelFileDescriptor arg2)
|
||||
throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resized(int arg0, int arg1, Rect arg2, Rect arg3, boolean arg4, Configuration arg5)
|
||||
throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowFocusChanged(boolean arg0, boolean arg1) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep,
|
||||
boolean sync) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchWallpaperCommand(String action, int x, int y,
|
||||
int z, Bundle extras, boolean sync) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeSystemDialogs(String reason) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchDragEvent(DragEvent event) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchSystemUiVisibilityChanged(int seq, int globalUi,
|
||||
int localValue, int localChanges) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
// pass for now.
|
||||
return null;
|
||||
|
@ -67,288 +67,345 @@ public class BridgeWindowManager implements IWindowManager {
|
||||
|
||||
// ---- implementation of IWindowManager that we care about ----
|
||||
|
||||
@Override
|
||||
public int getRotation() throws RemoteException {
|
||||
return mRotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumSizeDimension() throws RemoteException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDisplaySize(Point arg0) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRealDisplaySize(Point arg0) throws RemoteException {
|
||||
}
|
||||
|
||||
// ---- unused implementation of IWindowManager ----
|
||||
|
||||
@Override
|
||||
public boolean canStatusBarHide() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAppToken(int arg0, IApplicationToken arg1, int arg2, int arg3, boolean arg4)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWindowToken(IBinder arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearForcedDisplaySize() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeSystemDialogs(String arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableKeyguard(IBinder arg0, String arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeAppTransition() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitKeyguardSecurely(IOnKeyguardExitResult arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void freezeRotation(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAnimationScale(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] getAnimationScales() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAppOrientation(IApplicationToken arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDPadKeycodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDPadScancodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InputDevice getInputDevice(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getInputDeviceIds() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getKeycodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getKeycodeStateForDevice(int arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getPendingAppTransition() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getScancodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getScancodeStateForDevice(int arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSwitchState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSwitchStateForDevice(int arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTrackballKeycodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTrackballScancodeState(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasKeys(int[] arg0, boolean[] arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inKeyguardRestrictedInputMode() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean injectInputEventNoWait(InputEvent arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean injectKeyEvent(KeyEvent arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean injectPointerEvent(MotionEvent arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean injectTrackballEvent(MotionEvent arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputMethodClientHasFocus(IInputMethodClient arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isKeyguardLocked() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isKeyguardSecure() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewServerRunning() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputChannel monitorInput(String arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@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
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void overridePendingAppTransition(String arg0, int arg1, int arg2)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pauseKeyDispatching(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepareAppTransition(int arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reenableKeyguard(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAppToken(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeWindowToken(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeKeyDispatching(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bitmap screenshotApplications(IBinder arg0, int arg1, int arg2) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnimationScale(int arg0, float arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnimationScales(float[] arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppGroupId(IBinder arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppOrientation(IApplicationToken arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppStartingWindow(IBinder arg0, String arg1, int arg2, CompatibilityInfo arg3,
|
||||
CharSequence arg4, int arg5, int arg6, int arg7, IBinder arg8, boolean arg9)
|
||||
throws RemoteException {
|
||||
@ -356,122 +413,147 @@ public class BridgeWindowManager implements IWindowManager {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppVisibility(IBinder arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppWillBeHidden(IBinder arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEventDispatching(boolean arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFocusedApp(IBinder arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setForcedDisplaySize(int arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInTouchMode(boolean arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNewConfiguration(Configuration arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointerSpeed(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRotation(boolean arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStrictModeVisualIndicatorPreference(String arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showStrictModeViolation(boolean arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startAppFreezingScreen(IBinder arg0, int arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startViewServer(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void statusBarVisibilityChanged(int arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopAppFreezingScreen(IBinder arg0, boolean arg1) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stopViewServer() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void thawRotation() throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Configuration updateOrientationFromAppTokens(Configuration arg0, IBinder arg1)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int watchRotation(IRotationWatcher arg0) throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void waitForWindowDrawn(IBinder token, IRemoteCallback callback) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPreferredOptionsPanelGravity() throws RemoteException {
|
||||
return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissKeyguard() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNavigationBar() {
|
||||
return false; // should this return something else?
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lockNow() {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ import android.os.RemoteException;
|
||||
import android.view.IWindow;
|
||||
import android.view.IWindowSession;
|
||||
import android.view.InputChannel;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
@ -37,6 +36,7 @@ import android.view.WindowManager.LayoutParams;
|
||||
*/
|
||||
public final class BridgeWindowSession implements IWindowSession {
|
||||
|
||||
@Override
|
||||
public int add(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3,
|
||||
InputChannel outInputchannel)
|
||||
throws RemoteException {
|
||||
@ -44,40 +44,30 @@ public final class BridgeWindowSession implements IWindowSession {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addWithoutInputChannel(IWindow arg0, int seq, LayoutParams arg1, int arg2, Rect arg3)
|
||||
throws RemoteException {
|
||||
// pass for now.
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishDrawing(IWindow arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
public void finishKey(IWindow arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getInTouchMode() throws RemoteException {
|
||||
// pass for now.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performHapticFeedback(IWindow window, int effectId, boolean always) {
|
||||
// pass for now.
|
||||
return false;
|
||||
}
|
||||
|
||||
public MotionEvent getPendingPointerMove(IWindow arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
return null;
|
||||
}
|
||||
|
||||
public MotionEvent getPendingTrackballMove(IWindow arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int relayout(IWindow arg0, int seq, LayoutParams arg1, int arg2, int arg3, int arg4,
|
||||
int arg4_5, Rect arg5, Rect arg6, Rect arg7, Configuration arg7b, Surface arg8)
|
||||
throws RemoteException {
|
||||
@ -85,35 +75,43 @@ public final class BridgeWindowSession implements IWindowSession {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performDeferredDestroy(IWindow window) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outOfMemory(IWindow window) throws RemoteException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDisplayFrame(IWindow window, Rect outDisplayFrame) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(IWindow arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInTouchMode(boolean arg0) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTransparentRegion(IWindow arg0, Region arg1) throws RemoteException {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInsets(IWindow window, int touchable, Rect contentInsets,
|
||||
Rect visibleInsets, Region touchableRegion) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder prepareDrag(IWindow window, int flags,
|
||||
int thumbnailWidth, int thumbnailHeight, Surface outSurface)
|
||||
throws RemoteException {
|
||||
@ -121,6 +119,7 @@ public final class BridgeWindowSession implements IWindowSession {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performDrag(IWindow window, IBinder dragToken,
|
||||
float touchX, float touchY, float thumbCenterX, float thumbCenterY,
|
||||
ClipData data)
|
||||
@ -129,49 +128,47 @@ public final class BridgeWindowSession implements IWindowSession {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportDropResult(IWindow window, boolean consumed) throws RemoteException {
|
||||
// pass for now
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dragRecipientEntered(IWindow window) throws RemoteException {
|
||||
// pass for now
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dragRecipientExited(IWindow window) throws RemoteException {
|
||||
// pass for now
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWallpaperPosition(IBinder window, float x, float y,
|
||||
float xStep, float yStep) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallpaperOffsetsComplete(IBinder window) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
|
||||
int z, Bundle extras, boolean sync) {
|
||||
// pass for now.
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallpaperCommandComplete(IBinder window, Bundle result) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
public void closeSystemDialogs(String reason) {
|
||||
// pass for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
// pass for now.
|
||||
return null;
|
||||
}
|
||||
|
||||
public IBinder prepareDrag(IWindow arg0, boolean arg1, int arg2, int arg3, Surface arg4)
|
||||
throws RemoteException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,7 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
|
||||
// ------- XmlResourceParser implementation
|
||||
|
||||
@Override
|
||||
public void setFeature(String name, boolean state)
|
||||
throws XmlPullParserException {
|
||||
if (FEATURE_PROCESS_NAMESPACES.equals(name) && state) {
|
||||
@ -106,6 +107,7 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
throw new XmlPullParserException("Unsupported feature: " + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeature(String name) {
|
||||
if (FEATURE_PROCESS_NAMESPACES.equals(name)) {
|
||||
return true;
|
||||
@ -116,82 +118,101 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String name, Object value) throws XmlPullParserException {
|
||||
throw new XmlPullParserException("setProperty() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getProperty(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInput(Reader in) throws XmlPullParserException {
|
||||
mParser.setInput(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInput(InputStream inputStream, String inputEncoding)
|
||||
throws XmlPullParserException {
|
||||
mParser.setInput(inputStream, inputEncoding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defineEntityReplacementText(String entityName,
|
||||
String replacementText) throws XmlPullParserException {
|
||||
throw new XmlPullParserException(
|
||||
"defineEntityReplacementText() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespacePrefix(int pos) throws XmlPullParserException {
|
||||
throw new XmlPullParserException("getNamespacePrefix() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInputEncoding() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespace(String prefix) {
|
||||
throw new RuntimeException("getNamespace() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNamespaceCount(int depth) throws XmlPullParserException {
|
||||
throw new XmlPullParserException("getNamespaceCount() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPositionDescription() {
|
||||
return "Binary XML file line #" + getLineNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespaceUri(int pos) throws XmlPullParserException {
|
||||
throw new XmlPullParserException("getNamespaceUri() not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnNumber() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDepth() {
|
||||
return mParser.getDepth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return mParser.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLineNumber() {
|
||||
return mParser.getLineNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEventType() {
|
||||
return mEventType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWhitespace() throws XmlPullParserException {
|
||||
// Original comment: whitespace was stripped by aapt.
|
||||
return mParser.isWhitespace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
throw new RuntimeException("getPrefix not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getTextCharacters(int[] holderForStartAndLength) {
|
||||
String txt = getText();
|
||||
char[] chars = null;
|
||||
@ -204,55 +225,68 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
return chars;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespace() {
|
||||
return mParser.getNamespace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return mParser.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeNamespace(int index) {
|
||||
return mParser.getAttributeNamespace(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeName(int index) {
|
||||
return mParser.getAttributeName(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributePrefix(int index) {
|
||||
throw new RuntimeException("getAttributePrefix not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmptyElementTag() {
|
||||
// XXX Need to detect this.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeCount() {
|
||||
return mParser.getAttributeCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(int index) {
|
||||
return mParser.getAttributeValue(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeType(int index) {
|
||||
return "CDATA";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttributeDefault(int index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int nextToken() throws XmlPullParserException, IOException {
|
||||
return next();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(String namespace, String name) {
|
||||
return mParser.getAttributeValue(namespace, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int next() throws XmlPullParserException, IOException {
|
||||
if (!mStarted) {
|
||||
mStarted = true;
|
||||
@ -313,6 +347,7 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
return "????";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void require(int type, String namespace, String name)
|
||||
throws XmlPullParserException {
|
||||
if (type != getEventType()
|
||||
@ -322,6 +357,7 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
+ getPositionDescription());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String nextText() throws XmlPullParserException, IOException {
|
||||
if (getEventType() != START_TAG) {
|
||||
throw new XmlPullParserException(getPositionDescription()
|
||||
@ -348,6 +384,7 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int nextTag() throws XmlPullParserException, IOException {
|
||||
int eventType = next();
|
||||
if (eventType == TEXT && isWhitespace()) { // skip whitespace
|
||||
@ -363,76 +400,94 @@ public class BridgeXmlBlockParser implements XmlResourceParser {
|
||||
// AttributeSet implementation
|
||||
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
// pass
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAttributeBooleanValue(int index, boolean defaultValue) {
|
||||
return mAttrib.getAttributeBooleanValue(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAttributeBooleanValue(String namespace, String attribute,
|
||||
boolean defaultValue) {
|
||||
return mAttrib.getAttributeBooleanValue(namespace, attribute, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttributeFloatValue(int index, float defaultValue) {
|
||||
return mAttrib.getAttributeFloatValue(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttributeFloatValue(String namespace, String attribute, float defaultValue) {
|
||||
return mAttrib.getAttributeFloatValue(namespace, attribute, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeIntValue(int index, int defaultValue) {
|
||||
return mAttrib.getAttributeIntValue(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeIntValue(String namespace, String attribute, int defaultValue) {
|
||||
return mAttrib.getAttributeIntValue(namespace, attribute, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeListValue(int index, String[] options, int defaultValue) {
|
||||
return mAttrib.getAttributeListValue(index, options, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeListValue(String namespace, String attribute,
|
||||
String[] options, int defaultValue) {
|
||||
return mAttrib.getAttributeListValue(namespace, attribute, options, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeNameResource(int index) {
|
||||
return mAttrib.getAttributeNameResource(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeResourceValue(int index, int defaultValue) {
|
||||
return mAttrib.getAttributeResourceValue(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeResourceValue(String namespace, String attribute, int defaultValue) {
|
||||
return mAttrib.getAttributeResourceValue(namespace, attribute, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeUnsignedIntValue(int index, int defaultValue) {
|
||||
return mAttrib.getAttributeUnsignedIntValue(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttributeUnsignedIntValue(String namespace, String attribute, int defaultValue) {
|
||||
return mAttrib.getAttributeUnsignedIntValue(namespace, attribute, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClassAttribute() {
|
||||
return mAttrib.getClassAttribute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdAttribute() {
|
||||
return mAttrib.getIdAttribute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIdAttributeResourceValue(int defaultValue) {
|
||||
return mAttrib.getIdAttributeResourceValue(defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStyleAttribute() {
|
||||
return mAttrib.getStyleAttribute();
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ import com.android.ide.common.rendering.api.RenderSession;
|
||||
import com.android.ide.common.rendering.api.ResourceReference;
|
||||
import com.android.ide.common.rendering.api.ResourceValue;
|
||||
import com.android.ide.common.rendering.api.Result;
|
||||
import com.android.ide.common.rendering.api.SessionParams;
|
||||
import com.android.ide.common.rendering.api.ViewInfo;
|
||||
import com.android.ide.common.rendering.api.Result.Status;
|
||||
import com.android.ide.common.rendering.api.SessionParams;
|
||||
import com.android.ide.common.rendering.api.SessionParams.RenderingMode;
|
||||
import com.android.ide.common.rendering.api.ViewInfo;
|
||||
import com.android.internal.util.XmlUtils;
|
||||
import com.android.layoutlib.bridge.Bridge;
|
||||
import com.android.layoutlib.bridge.android.BridgeContext;
|
||||
@ -69,8 +69,8 @@ import android.util.TypedValue;
|
||||
import android.view.AttachInfo_Accessor;
|
||||
import android.view.BridgeInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.MeasureSpec;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.view.ViewGroup.MarginLayoutParams;
|
||||
import android.widget.AbsListView;
|
||||
@ -82,8 +82,8 @@ import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.QuickContactBadge;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TabWidget;
|
||||
import android.widget.TabHost.TabSpec;
|
||||
import android.widget.TabWidget;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Color;
|
||||
@ -835,6 +835,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
|
||||
previousTransition.addTransitionListener(new TransitionListener() {
|
||||
private int mChangeDisappearingCount = 0;
|
||||
|
||||
@Override
|
||||
public void startTransition(LayoutTransition transition, ViewGroup container,
|
||||
View view, int transitionType) {
|
||||
if (transitionType == LayoutTransition.CHANGE_DISAPPEARING) {
|
||||
@ -842,6 +843,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endTransition(LayoutTransition transition, ViewGroup container,
|
||||
View view, int transitionType) {
|
||||
if (transitionType == LayoutTransition.CHANGE_DISAPPEARING) {
|
||||
@ -1227,6 +1229,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
|
||||
TabSpec spec = tabHost.newTabSpec("tag").setIndicator("Tab Label",
|
||||
tabHost.getResources().getDrawable(android.R.drawable.ic_menu_info_details))
|
||||
.setContent(new TabHost.TabContentFactory() {
|
||||
@Override
|
||||
public View createTabContent(String tag) {
|
||||
return new LinearLayout(getContext());
|
||||
}
|
||||
|
@ -74,38 +74,46 @@ public class FakeAdapter extends BaseAdapter implements ListAdapter, SpinnerAdap
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int position) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mItems.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return mItems.get(position).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
// we don't care about recycling here because we never scroll.
|
||||
AdapterItem item = mItems.get(position);
|
||||
return getView(item, null /*parentGroup*/, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getViewTypeCount() {
|
||||
return mTypes.size();
|
||||
}
|
||||
|
||||
// ---- SpinnerAdapter
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
// pass
|
||||
return null;
|
||||
|
@ -99,23 +99,28 @@ public class FakeExpandableAdapter extends BaseAdapter implements ExpandableList
|
||||
|
||||
// ---- ExpandableListAdapter
|
||||
|
||||
@Override
|
||||
public int getGroupCount() {
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildrenCount(int groupPosition) {
|
||||
AdapterItem item = mItems.get(groupPosition);
|
||||
return item.getChildren().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getGroup(int groupPosition) {
|
||||
return mItems.get(groupPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getChild(int groupPosition, int childPosition) {
|
||||
return getChildItem(groupPosition, childPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
|
||||
ViewGroup parent) {
|
||||
// we don't care about recycling here because we never scroll.
|
||||
@ -123,6 +128,7 @@ public class FakeExpandableAdapter extends BaseAdapter implements ExpandableList
|
||||
return getView(item, null /*parentItem*/, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
// we don't care about recycling here because we never scroll.
|
||||
@ -131,48 +137,59 @@ public class FakeExpandableAdapter extends BaseAdapter implements ExpandableList
|
||||
return getView(item, parentItem, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getGroupId(int groupPosition) {
|
||||
return groupPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getChildId(int groupPosition, int childPosition) {
|
||||
return childPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCombinedGroupId(long groupId) {
|
||||
return groupId << 16 | 0x0000FFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCombinedChildId(long groupId, long childId) {
|
||||
return groupId << 16 | childId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupCollapsed(int groupPosition) {
|
||||
// pass
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupExpanded(int groupPosition) {
|
||||
// pass
|
||||
}
|
||||
|
||||
// ---- HeterogeneousExpandableList
|
||||
|
||||
@Override
|
||||
public int getChildType(int groupPosition, int childPosition) {
|
||||
return getChildItem(groupPosition, childPosition).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildTypeCount() {
|
||||
return mChildrenTypes.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGroupType(int groupPosition) {
|
||||
return mItems.get(groupPosition).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGroupTypeCount() {
|
||||
return mGroupTypes.size();
|
||||
}
|
||||
|
2
tools/layoutlib/create/.settings/README.txt
Normal file
2
tools/layoutlib/create/.settings/README.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Copy this in eclipse project as a .settings folder at the root.
|
||||
This ensure proper compilation compliance and warning/error levels.
|
93
tools/layoutlib/create/.settings/org.eclipse.jdt.core.prefs
Normal file
93
tools/layoutlib/create/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,93 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=com.android.annotations.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=com.android.annotations.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=com.android.annotations.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
@ -27,6 +27,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* Returns the list of class from layoutlib_create to inject in layoutlib.
|
||||
* The list can be empty but must not be null.
|
||||
*/
|
||||
@Override
|
||||
public Class<?>[] getInjectedClasses() {
|
||||
return INJECTED_CLASSES;
|
||||
}
|
||||
@ -35,6 +36,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* Returns the list of methods to rewrite as delegates.
|
||||
* The list can be empty but must not be null.
|
||||
*/
|
||||
@Override
|
||||
public String[] getDelegateMethods() {
|
||||
return DELEGATE_METHODS;
|
||||
}
|
||||
@ -43,6 +45,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* Returns the list of classes on which to delegate all native methods.
|
||||
* The list can be empty but must not be null.
|
||||
*/
|
||||
@Override
|
||||
public String[] getDelegateClassNatives() {
|
||||
return DELEGATE_CLASS_NATIVES;
|
||||
}
|
||||
@ -54,6 +57,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* <p/>
|
||||
* This usage is deprecated. Please use method 'delegates' instead.
|
||||
*/
|
||||
@Override
|
||||
public String[] getOverriddenMethods() {
|
||||
return OVERRIDDEN_METHODS;
|
||||
}
|
||||
@ -63,6 +67,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* of class to replace followed by the new FQCN.
|
||||
* The list can be empty but must not be null.
|
||||
*/
|
||||
@Override
|
||||
public String[] getRenamedClasses() {
|
||||
return RENAMED_CLASSES;
|
||||
}
|
||||
@ -74,6 +79,7 @@ public final class CreateInfo implements ICreateInfo {
|
||||
* the methods to delete.
|
||||
* The list can be empty but must not be null.
|
||||
*/
|
||||
@Override
|
||||
public String[] getDeleteReturns() {
|
||||
return DELETE_RETURNS;
|
||||
}
|
||||
|
@ -28,13 +28,14 @@ public class MethodAdapter implements MethodListener {
|
||||
* A stub method is being invoked.
|
||||
* <p/>
|
||||
* Known limitation: caller arguments are not available.
|
||||
*
|
||||
*
|
||||
* @param signature The signature of the method being invoked, composed of the
|
||||
* binary class name followed by the method descriptor (aka argument
|
||||
* types). Example: "com/foo/MyClass/InnerClass/printInt(I)V".
|
||||
* @param isNative True if the method was a native method.
|
||||
* @param caller The calling object. Null for static methods, "this" for instance methods.
|
||||
*/
|
||||
@Override
|
||||
public void onInvokeV(String signature, boolean isNative, Object caller) {
|
||||
}
|
||||
|
||||
@ -43,6 +44,7 @@ public class MethodAdapter implements MethodListener {
|
||||
* @see #onInvokeV(String, boolean, Object)
|
||||
* @return an integer, or a boolean, or a short or a byte.
|
||||
*/
|
||||
@Override
|
||||
public int onInvokeI(String signature, boolean isNative, Object caller) {
|
||||
onInvokeV(signature, isNative, caller);
|
||||
return 0;
|
||||
@ -53,6 +55,7 @@ public class MethodAdapter implements MethodListener {
|
||||
* @see #onInvokeV(String, boolean, Object)
|
||||
* @return a long.
|
||||
*/
|
||||
@Override
|
||||
public long onInvokeL(String signature, boolean isNative, Object caller) {
|
||||
onInvokeV(signature, isNative, caller);
|
||||
return 0;
|
||||
@ -63,6 +66,7 @@ public class MethodAdapter implements MethodListener {
|
||||
* @see #onInvokeV(String, boolean, Object)
|
||||
* @return a float.
|
||||
*/
|
||||
@Override
|
||||
public float onInvokeF(String signature, boolean isNative, Object caller) {
|
||||
onInvokeV(signature, isNative, caller);
|
||||
return 0;
|
||||
@ -73,6 +77,7 @@ public class MethodAdapter implements MethodListener {
|
||||
* @see #onInvokeV(String, boolean, Object)
|
||||
* @return a double.
|
||||
*/
|
||||
@Override
|
||||
public double onInvokeD(String signature, boolean isNative, Object caller) {
|
||||
onInvokeV(signature, isNative, caller);
|
||||
return 0;
|
||||
@ -83,6 +88,7 @@ public class MethodAdapter implements MethodListener {
|
||||
* @see #onInvokeV(String, boolean, Object)
|
||||
* @return an object.
|
||||
*/
|
||||
@Override
|
||||
public Object onInvokeA(String signature, boolean isNative, Object caller) {
|
||||
onInvokeV(signature, isNative, caller);
|
||||
return null;
|
||||
|
@ -65,24 +65,29 @@ public class AsmGeneratorTest {
|
||||
public void testClassRenaming() throws IOException, LogAbortException {
|
||||
|
||||
ICreateInfo ci = new ICreateInfo() {
|
||||
@Override
|
||||
public Class<?>[] getInjectedClasses() {
|
||||
// classes to inject in the final JAR
|
||||
return new Class<?>[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDelegateMethods() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDelegateClassNatives() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getOverriddenMethods() {
|
||||
// methods to force override
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getRenamedClasses() {
|
||||
// classes to rename (so that we can replace them)
|
||||
return new String[] {
|
||||
@ -91,6 +96,7 @@ public class AsmGeneratorTest {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDeleteReturns() {
|
||||
// methods deleted from their return type.
|
||||
return new String[0];
|
||||
|
Reference in New Issue
Block a user