当前位置: 首页 > news >正文

任丘市做网站自学网页设计要多久

任丘市做网站,自学网页设计要多久,西安网站制作怎么联系,建设网站需要公司吗接着前文分析Android T 远程动画显示流程其二 我们通过IRemoteAnimationRunner跨进程通信从系统进程来到了桌面进程#xff0c;这里是真正动画播放的逻辑。 进入桌面进程启动动画 跨进程通信#xff0c;实现IRemoteAnimationRunner 代码路径#xff1a;frameworks/base/p…接着前文分析Android T 远程动画显示流程其二 我们通过IRemoteAnimationRunner跨进程通信从系统进程来到了桌面进程这里是真正动画播放的逻辑。 进入桌面进程启动动画 跨进程通信实现IRemoteAnimationRunner 代码路径frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationRunnerCompat.java public abstract class RemoteAnimationRunnerCompat extends IRemoteAnimationRunner.Stub {public abstract void onAnimationStart(WindowManager.TransitionOldType int transit,RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,RemoteAnimationTarget[] nonApps, Runnable finishedCallback);Overridepublic final void onAnimationStart(TransitionOldType int transit,RemoteAnimationTarget[] apps,RemoteAnimationTarget[] wallpapers,RemoteAnimationTarget[] nonApps,final IRemoteAnimationFinishedCallback finishedCallback) {//调用自身抽象方法onAnimationStartonAnimationStart(transit, apps, wallpapers,nonApps, () - {try {finishedCallback.onAnimationFinished();} catch (RemoteException e) {Log.e(ActivityOptionsCompat, Failed to call app controlled animation finished callback, e);}});}...... }这里传递的参数都是前面RemoteAnimationController.goodToGo方法中获取的值。 transit的值是TRANSIT_OLD_WALLPAPER_CLOSE12 app指的是桌面和应用的RemoteAnimationTarget wallpapers壁纸的RemoteAnimationTarget nonApp非APP类型的RemoteAnimationTarget finishedCallback是FinishedCallback对象这里传递的是调用了其onAnimationFinished()方法。 这方方法调用了自身抽象方法调用自身抽象方法onAnimationStartonAnimationStart方法真正的实现在LauncherAnimationRunner类中 TargetApi(Build.VERSION_CODES.P) public class LauncherAnimationRunner extends RemoteAnimationRunnerCompat {......BinderThreadpublic void onAnimationStart(int transit,RemoteAnimationTarget[] appTargets,RemoteAnimationTarget[] wallpaperTargets,RemoteAnimationTarget[] nonAppTargets,Runnable runnable) {Runnable r () - {//退出动画的流程此时mAnimationResult为空尚未进入该流程finishExistingAnimation();//创建AnimationResult传递了两个runnable//() - mAnimationResult null,把AnimationResult对象置空//runnable,就是前面传递的IRemoteAnimationFinishedCallback.onAnimationFinishedmAnimationResult new AnimationResult(() - mAnimationResult null, runnable);//传递从系统侧调用过来的参数创建动画getFactory().onCreateAnimation(transit, appTargets, wallpaperTargets, nonAppTargets,mAnimationResult);};//根据mStartAtFrontOfQueue的值执行线程 rif (mStartAtFrontOfQueue) {//将Runnable插入到消息队列的前面以确保它尽快被执行postAtFrontOfQueueAsynchronously(mHandler, r);} else {//将Runnable异步地插入到消息队列中它将在队列中的其他消息之后执行。postAsyncCallback(mHandler, r);}}...... }退出动画的流程 finishExistingAnimation(); UiThreadprivate void finishExistingAnimation() {if (mAnimationResult ! null) {mAnimationResult.finish();mAnimationResult null;}}根据mAnimationResult是否为空执行finish方法主要就是执行mASyncFinishRunnable后续会在动画退出流程中细讲。 创建AnimationResult mAnimationResult new AnimationResult(() - mAnimationResult null, runnable); public static final class AnimationResult {......private AnimationResult(Runnable syncFinishRunnable, Runnable asyncFinishRunnable) {mSyncFinishRunnable syncFinishRunnable;mASyncFinishRunnable asyncFinishRunnable;}......}AnimationResult主要用来返回当前动画播放结果以便后续执行动画播放完成时的回调mASyncFinishRunnable。 () - mAnimationResult null一个把AnimationResult对象置空的Runnable保存到mSyncFinishRunnable中 runnable就是前面传递的IRemoteAnimationFinishedCallback.onAnimationFinished保存到mASyncFinishRunnable中。 传递从系统侧创建的参数创建动画 getFactory().onCreateAnimation(transit, appTargets, wallpaperTargets, nonAppTargets,mAnimationResult);传递了从系统侧创建的参数并传递了mAnimationResult对象。这里调用的是RemoteAnimationFactory接口中的onCreateAnimation方法。 /*** Used with LauncherAnimationRunner as an interface for the runner to call back to the* implementation.*/FunctionalInterfacepublic interface RemoteAnimationFactory {/*** Called on the UI thread when the animation targets are received. The implementation must* call {link AnimationResult#setAnimation} with the target animation to be run.*/void onCreateAnimation(int transit,RemoteAnimationTarget[] appTargets,RemoteAnimationTarget[] wallpaperTargets,RemoteAnimationTarget[] nonAppTargets,LauncherAnimationRunner.AnimationResult result);......}RemoteAnimationFactory的实现在QuickstepTransitionManager中。 传递从系统侧创建的参数创建动画 代码路径packages/apps/Launcher3/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java 动画移除流程 处理和响应动画完成的逻辑 代码路径frameworks/base/services/core/java/com/android/server/wm/WindowContainer.java private void doAnimationFinished(AnimationType int type, AnimationAdapter anim) {for (int i 0; i mSurfaceAnimationSources.size(); i) {//mSurfaceAnimationSources中每个容器做对应的onAnimationFinishedmSurfaceAnimationSources.valueAt(i).onAnimationFinished(type, anim);}//清除动画源列表mSurfaceAnimationSources.clear();if (mDisplayContent ! null) {//调用DisplayContent的onWindowAnimationFinished方法//从当前源码上看主要是针对输入法相关做了一些操作mDisplayContent.onWindowAnimationFinished(this, type);}}/*** Called when an animation has finished running.*/protected void onAnimationFinished(AnimationType int type, AnimationAdapter anim) {//主要用于 清空 mSurfaceAnimationSources 列表doAnimationFinished(type, anim);//WindowManagerService中实现onAnimationFinished()//用于唤醒所有等待mGlobalLock对象的线程确保多个线程能够正确地执行任务mWmService.onAnimationFinished();//将 mNeedsZBoost 设置为 false表示不再需要Z轴增强mNeedsZBoost false;}我们这里mSurfaceAnimationSources是保存的是需要做动画的ActivityRecordmSurfaceAnimationSources的值是在applyAnimationUnchecked方法中添加的。 mSurfaceAnimationSources.valueAt(i).onAnimationFinished(type, anim);调用了不同容器onAnimationFinished方法在ActivityRecord和WindowState中都重写了这个方法。我们这里是远程动画主要调用的就是ActivityRecord中重写的onAnimationFinished方法。 代码路径frameworks/base/services/core/java/com/android/server/wm/ActivityRecord.java Overrideprotected void onAnimationFinished(AnimationType int type, AnimationAdapter anim) {super.onAnimationFinished(type, anim);Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, AR#onAnimationFinished);mTransit TRANSIT_OLD_UNSET;mTransitFlags 0;setAppLayoutChanges(FINISH_LAYOUT_REDO_ANIM | FINISH_LAYOUT_REDO_WALLPAPER,ActivityRecord);clearThumbnail();setClientVisible(isVisible() || mVisibleRequested);getDisplayContent().computeImeTargetIfNeeded(this);ProtoLog.v(WM_DEBUG_ANIM, Animation done in %s : reportedVisible%b okToDisplay%b okToAnimate%b startingDisplayed%b,this, reportedVisible, okToDisplay(), okToAnimate(),isStartingWindowDisplayed());// clean up thumbnail windowif (mThumbnail ! null) {mThumbnail.destroy();mThumbnail null;}// WindowState.onExitAnimationDone might modify the children list, so make a copy and then// traverse the copy.final ArrayListWindowState children new ArrayList(mChildren);children.forEach(WindowState::onExitAnimationDone);// The starting window could transfer to another activity after app transition started, in// that case the latest top activity might not receive exit animation done callback if the// starting window didnt applied exit animation success. Notify animation finish to the// starting window if needed.if (task ! null startingMoved) {final WindowState transferredStarting task.getWindow(w -w.mAttrs.type TYPE_APPLICATION_STARTING);if (transferredStarting ! null transferredStarting.mAnimatingExit !transferredStarting.isSelfAnimating(0 /* flags */,ANIMATION_TYPE_WINDOW_ANIMATION)) {transferredStarting.onExitAnimationDone();}}getDisplayContent().mAppTransition.notifyAppTransitionFinishedLocked(token);scheduleAnimation();// Schedule to handle the stopping and finishing activities which the animation is done// because the activities which were animating have not been stopped yet.mTaskSupervisor.scheduleProcessStoppingAndFinishingActivitiesIfNeeded();Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);}
http://www.zqtcl.cn/news/152966/

相关文章:

  • 浙江省建设厅门户网站菠菜网站如何做推广
  • 飞鸽网站建设网站建设源代码交付
  • 阿里云服务器做盗版电影网站wordpress密码访问
  • 本机可以做网站的服务器吗做磨毛布内销哪个网站比较好
  • 免费建站系统wordpress一个网站需要什么
  • 移动端网站制作的有哪些要求百度广告投放价格表
  • 网站建设互联网推广广告设计公司业务范围
  • 昆明网站关键词优化沪佳装修公司全部门店
  • 南阳卧龙区2015网站建设价格快三直播十大平台直播间
  • 网站谁做的wordpress 空白页面
  • 专业的佛山网站建设公司Wordpress 帖子翻译
  • 南昌网站建设公司网站建设公司深圳企业网站模板
  • 一家做特卖的网站docker创建wordpress
  • 网站开发设计电子书网站后台无法更新缓存
  • 南京高端网站制作公司哪家好神起网络公司
  • 建网站选哪个宁波网站建设设计图
  • 贾汪徐州网站开发门户网站解决方案
  • 网站如何做淘宝支付个人注册商标步骤
  • 书香校园网站建设网站排名下降了怎么办
  • 观音桥网站建设湖南省建设银行网站官网
  • 信阳网站建设找汉狮搭建网站知识
  • 企业门户网站用户类型商务信息网
  • 深圳网站设计廊坊公司深圳ui设计培训班
  • 为什么网站需要维护帮人推广注册app的平台
  • 网站开发岗位要求服务好的做培训网站
  • 宁波制作网站企业有哪些学网页设计需要什么学历
  • 网站建设公司墨子网络百度域名续费
  • 琪觅公司网站开发中文网页开发工具
  • 教育网站制作设计成都网络营销公司
  • 怎么查看一个网站页面的seo优化情况网站建站建设首选上海黔文信息科技有限公司2