Projects >> android-frameworks-base-with-remote-control-service >>fc1bf9256372018188468b8ba5163ac5dcc74f56

Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD
     * Animate an object
     * 

* {@link #acquire(long)} must have been called before this. * * @throws IllegalStateException if the current context is different than the one owned by * the scene, or if {@link #acquire(long)} was not called. * * @see RenderSession#animate(Object, String, boolean, IAnimationListener) */ public Result animate(Object targetObject, String animationName, boolean isFrameworkAnimation, IAnimationListener listener) { checkLock(); BridgeContext context = getContext(); // find the animation file. ResourceValue animationResource = null; int animationId = 0; if (isFrameworkAnimation) { animationResource = context.getRenderResources().getFrameworkResource( ResourceType.ANIMATOR, animationName); if (animationResource != null) { animationId = Bridge.getResourceId(ResourceType.ANIMATOR, animationName); } } else { animationResource = context.getRenderResources().getProjectResource( ResourceType.ANIMATOR, animationName); if (animationResource != null) { animationId = context.getProjectCallback().getResourceId( ResourceType.ANIMATOR, animationName); } } if (animationResource != null) { try { Animator anim = AnimatorInflater.loadAnimator(context, animationId); if (anim != null) { anim.setTarget(targetObject); new PlayAnimationThread(anim, this, animationName, listener).start(); return SUCCESS.createResult(); } } catch (Exception e) { // get the real cause of the exception. Throwable t = e; while (t.getCause() != null) { t = t.getCause(); } return ERROR_UNKNOWN.createResult(t.getMessage(), t); } } return ERROR_ANIM_NOT_FOUND.createResult(); } /** ======= >>>>>>> efa98a29e01dbb4c700fd6af3353413afcb344d9 * Insert a new child into an existing parent. *

* {@link #acquire(long)} must have been called before this.

Solution content
    }

    /**
     * Animate an object
     * 

* {@link #acquire(long)} must have been called before this. * * @throws IllegalStateException if the current context is different than the one owned by * the scene, or if {@link #acquire(long)} was not called. * * @see RenderSession#animate(Object, String, boolean, IAnimationListener) */ public Result animate(Object targetObject, String animationName, boolean isFrameworkAnimation, IAnimationListener listener) { checkLock(); BridgeContext context = getContext(); // find the animation file. ResourceValue animationResource = null; int animationId = 0; if (isFrameworkAnimation) { animationResource = context.getRenderResources().getFrameworkResource( ResourceType.ANIMATOR, animationName); if (animationResource != null) { animationId = Bridge.getResourceId(ResourceType.ANIMATOR, animationName); } } else { animationResource = context.getRenderResources().getProjectResource( ResourceType.ANIMATOR, animationName); if (animationResource != null) { animationId = context.getProjectCallback().getResourceId( ResourceType.ANIMATOR, animationName); } } if (animationResource != null) { try { Animator anim = AnimatorInflater.loadAnimator(context, animationId); if (anim != null) { anim.setTarget(targetObject); new PlayAnimationThread(anim, this, animationName, listener).start(); return SUCCESS.createResult(); } } catch (Exception e) { // get the real cause of the exception. Throwable t = e; while (t.getCause() != null) { t = t.getCause(); } return ERROR_UNKNOWN.createResult(t.getMessage(), t); } } return ERROR_ANIM_NOT_FOUND.createResult(); } /** * Insert a new child into an existing parent. *

* {@link #acquire(long)} must have been called before this.

File
RenderSessionImpl.java
Developer's decision
Version 1
Kind of conflict
Comment
Method declaration