Keyguard上滑解锁流程解析

2023-05-16

2 上滑触摸事件

2.1 Touch down事件

2.2 Touch move事件

2.3 Touch up事件

用户抬起手指,产生touch up事件,PanelView接收到这个事件后会调用endMotionEvent,如果手指从down到up之间移动的距离达到一定阈值会调用onTrackingStopped,从而调出解锁界面;

//PanelViewController
private void endMotionEvent(MotionEvent event, float x, float y, boolean forceCancel) {
    final boolean onKeyguard =
                    mStatusBarStateController.getState() == StatusBarState.KEYGUARD;
    final boolean expand;
            if (event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
                // If we get a cancel, put the shade back to the state it was in when the gesture
                // started
                if (onKeyguard) {
                    expand = true;
                } else {
                    expand = !mPanelClosedOnDown;
                }
            } else {
                expand = flingExpands(vel, vectorVel, x, y);
            }
    ...
        fling(vel, expand, isFalseTouch(x, y, interactionType));
            onTrackingStopped(expand);
            mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;
            if (mUpdateFlingOnLayout) {
                mUpdateFlingVelocity = vel;
            }
    ...
}

这里复位mTracking,并将onTrackingStopped回调给

protected void onTrackingStopped(boolean expand) {
    mTracking = false;
    mBar.onTrackingStopped(expand);
    notifyBarPanelExpansionChanged();
}
//PanelBar
public void onTrackingStopped(boolean expand) {
    mTracking = false;
}

3 上滑解锁流程

3.1 fling动画更新panelView高度

上滑解锁锁屏,PanelView的expansion fraction从 1f 变成0f,锁屏时钟,通知等从上部慢慢消失。

在endMotionEvent事件里面,调用了PanelViewController的fling动画

//PanelViewController
protected void fling(float vel, boolean expand, float collapseSpeedUpFactor,
                     boolean expandBecauseOfFalsing) {
    cancelPeek();
    float target = expand ? getMaxPanelHeight() : 0;
    if (!expand) {
        mClosing = true;
    }
    flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing);
}

然后调用flingToHeight,走到createHeightAnimator里面

http://aospxref.com/android-13.0.0_r3/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java#setExpandedHeightInternal

/**
 * Create an animator that can also overshoot
 *
 * @param targetHeight the target height
 * @param overshootAmount the amount of overshoot desired
 */
private ValueAnimator createHeightAnimator(float targetHeight, float overshootAmount) {
    float startExpansion = mOverExpansion;
    ValueAnimator animator = ValueAnimator.ofFloat(mExpandedHeight, targetHeight);
    animator.addUpdateListener(
        animation -> {
            if (overshootAmount > 0.0f
                // Also remove the overExpansion when collapsing
                || (targetHeight == 0.0f && startExpansion != 0)) {
                final float expansion = MathUtils.lerp(
                    startExpansion,
                    mPanelFlingOvershootAmount * overshootAmount,
                    Interpolators.FAST_OUT_SLOW_IN.getInterpolation(
                        animator.getAnimatedFraction()));
                setOverExpansionInternal(expansion, false /* isFromGesture */);
            }
            setExpandedHeightInternal((float) animation.getAnimatedValue());
        });
    return animator;
}

在fling动画走onUpdateAnimator里面调用到setExpandedHeightInternal,

public void setExpandedHeightInternal(float h) {
    if (isNaN(h)) {
        Log.wtf(TAG, "ExpandedHeight set to NaN");
    }
    mNotificationShadeWindowController.batchApplyWindowLayoutParams(()-> {
        if (mExpandLatencyTracking && h != 0f) {
            DejankUtils.postAfterTraversal(
                () -> mLatencyTracker.onActionEnd(LatencyTracker.ACTION_EXPAND_PANEL));
            mExpandLatencyTracking = false;
        }
        float maxPanelHeight = getMaxPanelHeight();
        if (mHeightAnimator == null) {
            // Split shade has its own overscroll logic
            if (mTracking && !mInSplitShade) {
                float overExpansionPixels = Math.max(0, h - maxPanelHeight);
                setOverExpansionInternal(overExpansionPixels, true /* isFromGesture */);
            }
            mExpandedHeight = Math.min(h, maxPanelHeight);
        } else {
            mExpandedHeight = h;
        }

        // If we are closing the panel and we are almost there due to a slow decelerating
        // interpolator, abort the animation.
        if (mExpandedHeight < 1f && mExpandedHeight != 0f && mClosing) {
            mExpandedHeight = 0f;
            if (mHeightAnimator != null) {
                mHeightAnimator.end();
            }
        }
        mExpansionDragDownAmountPx = h;
        mExpandedFraction = Math.min(1f,
                                     maxPanelHeight == 0 ? 0 : mExpandedHeight / maxPanelHeight);
        onHeightUpdated(mExpandedHeight);
        updatePanelExpansionAndVisibility();
    });
}

最后调用updatePanelExpansionAndVisibility()

/**
 * Updates the panel expansion and {@link PanelView} visibility if necessary.
 *
 * TODO(b/200063118): Could public calls to this method be replaced with calls to
 *   {@link #updateVisibility()}? That would allow us to make this method private.
 */
public void updatePanelExpansionAndVisibility() {
    mPanelExpansionStateManager.onPanelExpansionChanged(
        mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx);
    updateVisibility();
}

updatePanelExpansionAndVisibility里面首先回调onPanelExpansionChanged,然后更新PanelView的可见性。

/** Update the visibility of {@link PanelView} if necessary. */
public void updateVisibility() {
    mView.setVisibility(shouldPanelBeVisible() ? VISIBLE : INVISIBLE);
}

3.2 判断是否要走KeyguardDismiss流程

CentralSurfacesImpl收到onPanelExpansionChanged

http://aospxref.com/android-13.0.0_r3/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java#1412

private void onPanelExpansionChanged(PanelExpansionChangeEvent event) {
1413          float fraction = event.getFraction();
1414          boolean tracking = event.getTracking();
1415          dispatchPanelExpansionForKeyguardDismiss(fraction, tracking);
1416  
1417          if (fraction == 0 || fraction == 1) {
1418              if (getNavigationBarView() != null) {
1419                  getNavigationBarView().onStatusBarPanelStateChanged();
1420              }
1421              if (getNotificationPanelViewController() != null) {
1422                  getNotificationPanelViewController().updateSystemUiStateFlags();
1423              }
1424          }
1425      }

之后调用dispatchPanelExpansionForKeyguardDismiss走KeyguardDismiss流程

/**
 * When swiping up to dismiss the lock screen, the panel expansion fraction goes from 1f to 0f.
 * This results in the clock/notifications/other content disappearing off the top of the screen.
 *
 * We also use the expansion fraction to animate in the app/launcher surface from the bottom of
 * the screen, 'pushing' off the notifications and other content. To do this, we dispatch the
 * expansion fraction to the KeyguardViewMediator if we're in the process of dismissing the
 * keyguard.
 */
private void dispatchPanelExpansionForKeyguardDismiss(float fraction, boolean trackingTouch) {
    // Things that mean we're not swiping to dismiss the keyguard, and should ignore this
    // expansion:
    // - Keyguard isn't even visible.
    // - Keyguard is occluded. Expansion changes here are the shade being expanded over the
    //   occluding activity.
    // - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt).
    // - The SIM is locked, you can't swipe to unlock. If the SIM is locked but there is no
    //   device lock set, canDismissLockScreen returns true even though you should not be able
    //   to dismiss the lock screen until entering the SIM PIN.
    // - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
    //   keyguard.
    if (!isKeyguardShowing()
        || isOccluded()
        || !mKeyguardStateController.canDismissLockScreen()
        || mKeyguardViewMediator.isAnySimPinSecure()
        || (mNotificationPanelViewController.isQsExpanded() && trackingTouch)) {
        return;
    }

    // Otherwise, we should let the keyguard know about this if we're tracking touch, or if we
    // are already animating the keyguard dismiss (since we will need to either finish or cancel
    // the animation).
    if (trackingTouch
        || mKeyguardViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe()
        || mKeyguardUnlockAnimationController.isUnlockingWithSmartSpaceTransition()) {
        mKeyguardStateController.notifyKeyguardDismissAmountChanged(
            1f - fraction, trackingTouch);
    }
}

这里走mKeyguardStateController.notifyKeyguardDismissAmountChanged(1f - fraction, trackingTouch)里面,然后走到KeyguardStateControllerImpl的notifyKeyguardDismissAmountChanged。

http://aospxref.com/android-13.0.0_r3/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java#366

public void notifyKeyguardDismissAmountChanged(float dismissAmount,
                                               boolean dismissingFromTouch) {
    mDismissAmount = dismissAmount;
    mDismissingFromTouch = dismissingFromTouch;
    new ArrayList<>(mCallbacks).forEach(Callback::onKeyguardDismissAmountChanged);
}

之后回调onKeyguardDismissAmountChanged。这里回调到KeyguardUnlockAnimationController的

http://aospxref.com/android-13.0.0_r3/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt#591

override fun onKeyguardDismissAmountChanged() {
    if (!willHandleUnlockAnimation()) {
        return
    }

    if (keyguardViewController.isShowing && !playingCannedUnlockAnimation) {
        showOrHideSurfaceIfDismissAmountThresholdsReached()

            // If the surface is visible or it's about to be, start updating its appearance to
            // reflect the new dismiss amount.
            if ((keyguardViewMediator.get().requestedShowSurfaceBehindKeyguard() ||
                 keyguardViewMediator.get()
                 .isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe) &&
                !playingCannedUnlockAnimation) {
                updateSurfaceBehindAppearAmount()
            }
    }
}

然后走到showOrHideSurfaceIfDismissAmountThresholdsReached,

/**
 * Lets the KeyguardViewMediator know if the dismiss amount has crossed a threshold of interest,
 * such as reaching the point in the dismiss swipe where we need to make the surface behind the
 * keyguard visible.
 */
private fun showOrHideSurfaceIfDismissAmountThresholdsReached() {
    if (!featureFlags.isEnabled(Flags.NEW_UNLOCK_SWIPE_ANIMATION)) {
        return
    }

    // If we are playing the canned unlock animation, we flung away the keyguard to hide it and
    // started a canned animation to show the surface behind the keyguard. The fling will cause
    // panel height/dismiss amount updates, but we should ignore those updates here since the
    // surface behind is already visible and animating.
    if (playingCannedUnlockAnimation) {
        return
    }

    if (!keyguardStateController.isShowing) {
        return
    }

    val dismissAmount = keyguardStateController.dismissAmount

        if (dismissAmount >= DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD &&
            !keyguardViewMediator.get().requestedShowSurfaceBehindKeyguard()) {

            keyguardViewMediator.get().showSurfaceBehindKeyguard()
        } else if (dismissAmount < DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD &&
                   keyguardViewMediator.get().requestedShowSurfaceBehindKeyguard()) {
            // We're no longer past the threshold but we are showing the surface. Animate it
            // out.
            keyguardViewMediator.get().hideSurfaceBehindKeyguard()
                fadeOutSurfaceBehind()
        }

    finishKeyguardExitRemoteAnimationIfReachThreshold()
}

走到最后keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(false /* cancelled */)

/**
 * Called when we're done running the keyguard exit animation.
 *
 * This will call {@link #mSurfaceBehindRemoteAnimationFinishedCallback} to let WM know that
 * we're done with the RemoteAnimation, actually hide the keyguard, and clean up state related
 * to the keyguard exit animation.
 *
 * @param cancelled {@code true} if the animation was cancelled before it finishes.
 */
public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) {
    if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
        return;
    }

    // Block the panel from expanding, in case we were doing a swipe to dismiss gesture.
    mKeyguardViewControllerLazy.get().blockPanelExpansionFromCurrentTouch();
    final boolean wasShowing = mShowing;
    InteractionJankMonitor.getInstance().end(CUJ_LOCKSCREEN_UNLOCK_ANIMATION);

    // Post layout changes to the next frame, so we don't hang at the end of the animation.
    DejankUtils.postAfterTraversal(() -> {
        onKeyguardExitFinished();

        if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) {
            mKeyguardUnlockAnimationControllerLazy.get().hideKeyguardViewAfterRemoteAnimation();
        }

        finishSurfaceBehindRemoteAnimation(cancelled);
        mSurfaceBehindRemoteAnimationRequested = false;

        // The remote animation is over, so we're not going away anymore.
        mKeyguardStateController.notifyKeyguardGoingAway(false);

        // Dispatch the callback on animation finishes.
        mUpdateMonitor.dispatchKeyguardDismissAnimationFinished();
    });

    mKeyguardUnlockAnimationControllerLazy.get().notifyFinishedKeyguardExitAnimation(
        cancelled);
}
private void onKeyguardExitFinished() {
    // only play "unlock" noises if not on a call (since the incall UI
    // disables the keyguard)
    if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)) {
        playSounds(false);
    }

    setShowingLocked(false);
    mWakeAndUnlocking = false;
    mDismissCallbackRegistry.notifyDismissSucceeded();
    resetKeyguardDonePendingLocked();
    mHideAnimationRun = false;
    adjustStatusBarLocked();
    sendUserPresentBroadcast();
}

在onKeyguardExitFinished中会播放解锁声音,然后reset一些变量。

private void onKeyguardExitFinished() {
    // only play "unlock" noises if not on a call (since the incall UI
    // disables the keyguard)
    if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)) {
        playSounds(false);
    }

    setShowingLocked(false);
    mWakeAndUnlocking = false;
    mDismissCallbackRegistry.notifyDismissSucceeded();
    resetKeyguardDonePendingLocked();
    mHideAnimationRun = false;
    adjustStatusBarLocked();
    sendUserPresentBroadcast();
}

然后调用KeyguardUnlockAnimationController对的hideKeyguardViewAfterRemoteAnimation走keyguard的hide流程。

/**
 * Asks the keyguard view to hide, using the start time from the beginning of the remote
 * animation.
 */
fun hideKeyguardViewAfterRemoteAnimation() {
    if (keyguardViewController.isShowing) {
        // Hide the keyguard, with no fade out since we animated it away during the unlock.

        keyguardViewController.hide(
            surfaceBehindRemoteAnimationStartTime,
            0 /* fadeOutDuration */
        )
    } else {
        Log.e(TAG, "#hideKeyguardViewAfterRemoteAnimation called when keyguard view is not " +
              "showing. Ignoring...")
    }
}

3.3 keyguard的hide流程

StatusBarKeyguardViewManager的hide里面,然后是mCentralSurfaces.hideKeyguard();

@Override
public boolean hideKeyguard() {
    mStatusBarStateController.setKeyguardRequested(false);
    return updateIsKeyguard();
}

@Override
public boolean updateIsKeyguard() {
    return updateIsKeyguard(false /* forceStateChange */);
}

@Override
public boolean updateIsKeyguard(boolean forceStateChange) {
    if (shouldBeKeyguard) {
        if (mScreenOffAnimationController.isKeyguardShowDelayed()
            || (isGoingToSleep()
                && mScreenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_TURNING_OFF)) {
            // Delay showing the keyguard until screen turned off.
        } else {
            showKeyguardImpl();
        }
    } else {
        // During folding a foldable device this might be called as a result of
        // 'onScreenTurnedOff' call for the inner display.
        // In this case:
        //  * When phone is locked on folding: it doesn't make sense to hide keyguard as it
        //    will be immediately locked again
        //  * When phone is unlocked: we still don't want to execute hiding of the keyguard
        //    as the animation could prepare 'fake AOD' interface (without actually
        //    transitioning to keyguard state) and this might reset the view states
        if (!mScreenOffAnimationController.isKeyguardHideDelayed()) {
            return hideKeyguardImpl(forceStateChange);
        }
    }
}

这里走的是hideKeyguardImpl。

/**
 * @return true if we would like to stay in the shade, false if it should go away entirely
 */
@Override
public boolean hideKeyguardImpl(boolean forceStateChange) {

}

hideKeyguardImpl里面首先会调用mStatusBarStateController.setState(StatusBarState.SHADE, forceStateChange)设置StatusBarState为SHADE,然后调用instantCollapseNotificationPanel

@Override
public void instantCollapseNotificationPanel() {
    mNotificationPanelViewController.instantCollapse();
    mShadeController.runPostCollapseRunnables();
}

这次又回到了PanelViewController,调用了instantCollapse,

public void instantCollapse() {
    abortAnimations();
    setExpandedFraction(0f);
    if (mExpanding) {
        notifyExpandingFinished();
    }
    if (mInstantExpanding) {
        mInstantExpanding = false;
        updatePanelExpansionAndVisibility();
    }
}

然后走到setExpandedFraction(0f);,此时设置ExpandedFraction为0f了。然后再次回到了setExpandedHeightInternal

然后是updatePanelExpansionAndVisibility更新PanelView的可见性

/**
 * Updates the panel expansion and {@link PanelView} visibility if necessary.
 *
 * TODO(b/200063118): Could public calls to this method be replaced with calls to
 *   {@link #updateVisibility()}? That would allow us to make this method private.
 */
public void updatePanelExpansionAndVisibility() {
    mPanelExpansionStateManager.onPanelExpansionChanged(
        mExpandedFraction, isExpanded(), mTracking, mExpansionDragDownAmountPx);
    updateVisibility();
}

3.4 通知keyguard可见性改变

在onPanelExpansionChanged中,会走到StatusBarKeyguardViewManager的onPanelExpansionChanged里。

然后走到KeyguardBouncer的mBouncer.setExpansion。

/**
 * Current notification panel expansion
 * @param fraction 0 when notification panel is collapsed and 1 when expanded.
 * @see StatusBarKeyguardViewManager#onPanelExpansionChanged
 */
public void setExpansion(float fraction) {
    float oldExpansion = mExpansion;
    mExpansion = fraction;
    if (mKeyguardView != null && !mIsAnimatingAway) {
        float alpha = MathUtils.map(ALPHA_EXPANSION_THRESHOLD, 1, 1, 0, fraction);
        mKeyguardView.setAlpha(MathUtils.constrain(alpha, 0f, 1f));
        mKeyguardView.setTranslationY(fraction * mKeyguardView.getHeight());
    }

    if (fraction == EXPANSION_VISIBLE && oldExpansion != EXPANSION_VISIBLE) {
        onFullyShown();
        mExpansionCallback.onFullyShown();
    } else if (fraction == EXPANSION_HIDDEN && oldExpansion != EXPANSION_HIDDEN) {
        onFullyHidden();
        mExpansionCallback.onFullyHidden();
    } else if (fraction != EXPANSION_VISIBLE && oldExpansion == EXPANSION_VISIBLE) {
        mExpansionCallback.onStartingToHide();
        if (mKeyguardView != null) {
            mKeyguardView.onStartingToHide();
        }
    }
}

然后来到StatusBarKeyguardViewManager的onFullyShown

@Override
public void onFullyShown() {
    mBouncerAnimating = false;
    updateStates();
    mCentralSurfaces.wakeUpIfDozing(SystemClock.uptimeMillis(),
                                    mCentralSurfaces.getBouncerContainer(), "BOUNCER_VISIBLE");
}

之后再updateStates里面就会调用onKeyguardVisibilityChanged通知Keyguard可见性为false。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Keyguard上滑解锁流程解析 的相关文章

  • 009:Python字符串的使用

    字符串的定义 所谓字符串 xff0c 就是由零个或多个字符组成的有限序列 xff0c 一般记为 xff1a 在Python程序中 xff0c 如果把单个或多个字符用单引号或者双引号包围起来 xff0c 就可以表示一个字符串 字符串中的字符可
  • BUG笔记:Win XP IE8下HTML Parsing Error: Unable to modify the parent container element before the child

    xff3b Bug描述 xff3d Windows XP IE8的某些版本下页面只显示一部分 xff0c 其余为空白 IE左下角有惊叹号报错标志 xff0c 点开后显示字符如下 xff1a HTML Parsing Error Unable
  • 日常积累

    1 如何对mysql数据库已存在表进行修改 2 查看mysql 数据库引擎 3 defunct进程 ps aux grep defunct 表示的是僵尸进程 4 检测进程打开的文件句柄数 xff1a lsof p pid 5 sg test
  • Linux新手入门:Unable to locate package错误解决办法

    最近刚开始接触 Linux xff0c 在虚拟机中装了个 Ubuntu xff0c 当前的版本是 Ubuntu 11 10 xff0c 装好后自然少不了安装一些软件 xff0c 在设置了软件的源后 xff0c 就开始了 sudo apt g
  • Android内存管理、监测剖析

    Android内存管理机制 xff1a Android内存管理主要有 xff1a LowMemory Killer机制 xff0c Ashmem xff0c PMEM ION及Native内存和Dalvik内存管理管理和JVM垃圾回收机制
  • gnome系统托盘协议spec(tray icon)

    最新spec xff1a http standards freedesktop org systemtray spec systemtray spec 0 3 html 系统 托盘协议规范 xff08 基于Xwindow的桌面环境 xff0
  • 阿里秋招面试

    1 请介绍项目 说了项目的分布式设计 服务器负载均衡和集群 redis xff08 缓存 同步 主从架构 xff09 session共享 ActiveMQ实现消息传递 2 项目中遇到的难点 3 问实习经历 4 问Java内存模型 5 讲一下
  • 在Ubuntu14.04.5上安装OpenCV2.4.9时遇到的各种问题

    从昨天到今天 首先 xff0c 我是按照这个博客进行安装的 xff0c 虽然他是以 xff2f xff50 xff45 xff4e xff43 xff56 3 0为样板但是安装基本都大同小异 xff0e xff08 博客地址 xff1a h
  • windows 下面 查找一个文件夹下的所有文件。整理版

    第一种方法 xff0c 可以再vc6 0上直接运行 include lt AFX H gt void FindFilesInOneFolder const std string folder in vector lt string gt a
  • 如何让Qtableview背景透明

    第一种 xff1a 直接编辑样式表 xff1a 第二种 xff1a 在代码中设置 xff1a ui tableView gt setStyleSheet 34 background color transparent 34
  • vs运行,f10失效

    在 Visual Studio 中 xff0c 按 F10 快捷键是用于单步执行代码的调试命令 如果该快捷键失效了 xff0c 可以尝试以下方法进行排除问题 xff1a 确保当前处于调试模式 xff1a 在 Visual Studio 的菜
  • 嵌入式linux应用开发入门纲要

    目录 C语言基础C 43 43 拓展linux基本操作io操作数据结构进程线程网络编程sqlite数据库实战项目 C语言基础 基本数据类型 条件语句 循环语句 函数 算术运算 逻辑运算 指针 结构体 联合体 枚举 malloc C 43 4

随机推荐

  • 全能扫地机器人的想法

    他要会自己充电 最好 xff0c 他是可以太阳能充电 xff0c 没电了 xff0c 他自己去晒太阳 他要自己规划路线 他最好我不在家的时候工作 他得会自己打包好垃圾 他要会拖地 我可以语音控制他 我叫他的时候 xff0c 他可以报告自身的
  • qt根据组件名字找到组件

    比方说知道一个在tw下QPushButton的ObjectNam为 34 ok 34 xff0c 那么它的组件指针就是 xff1a auto btn 61 ui gt tw gt findChild lt QPushButton gt 34
  • linux下zip加密压缩和解压

    对于目录a的无密码压缩 xff1a zip r aa zip aa 对于目录a的无密码j解压 xff1a unzip aa zip 对于目录a的加密压缩 xff0c 密码为123456 xff1a zip rP 123456 a zip a
  • SESSION 的数据保存在哪里呢?

    SESSION 的数据保存在哪里呢 xff1f 当然是在服务器端 xff0c 但不是保存在内存中 xff0c 而是保存在文件或数据库中 默认情况下 xff0c php ini 中设置的 SESSION 保存方式是 files xff08 s
  • 在ubuntu20.04安装vscode

    在PC上安装 照以下步骤在Ubuntu 20 04上安装VS Code xff1a 打开终端 添加Microsoft的软件包存储库到APT包管理器中 xff0c 输入以下命令 xff1a curl https packages micros
  • 有两个以上的USB设备,他们的Vendor ID和Product ID都一样,如何指定对应的usb插口和/dev/ttyUSB的序号?

    如果有两个以上的USB设备 xff0c 他们的Vendor ID和Product ID都一样 xff0c 那么无法通过Vendor ID和Product ID来区分它们 需要采取其他方式来指定对应的USB插口和 dev ttyUSB的序号
  • Could not find a configuration file for package “OpenCV“ that is compatible with requested version “

    错误详情 xff1a Could not find a configuration file for package 34 OpenCV 34 that is compatible with requested version 34 3 0
  • 在ubuntu安装c++版本的absl库

    对于 C 43 43 xff0c 您可以通过以下步骤安装 absl xff1a 1 安装必要的依赖项 xff1a sudo apt get install cmake g 43 43 git 2 克隆 absl 代码库 xff1a git
  • 一个带有信号量的列表,有什么作用

    一个带有信号量的列表可以用于在多线程环境下实现线程间的同步和通信 具体来说 xff0c 它可以实现以下功能 xff1a 1 限制列表的大小 xff1a 通过设置列表的最大容量 xff0c 可以限制列表中元素的数量 xff0c 避免列表过大导
  • TR069是什么鬼

    一 xff0c TR069是什么 1 xff0c 概念 搞嵌入式或通信设备的 xff0c 或多或少都会听说TR069 那他是什么鬼 xff1f TR069 xff0c 就是CPE广域网管理协议 它用于ACS和CPE之间的自动协商交互 xff
  • 为 Konsole 单独设置暗色主题

    在 KDE 中设置亮色主题后 xff0c konsole 主体的黑色的 xff0c 但是菜单栏是白色的 对于终端 xff0c 我更偏向于使用暗色主题 xff0c 有以下思路 xff1a KWin Rule修改 konsole 配置文件命令行
  • 2019年年终总结(流水账)

    2019年年终总结 流水账 前言 马上就要是2020年了 xff0c 我此时敲下我的第一篇年终总结 马上就要过去的2019年对于我来说是平凡但却不平淡的一年 xff0c 这一年里我经历了很多 xff0c 虽然这些在别人眼中可能是微不足道的
  • 融资租赁与经营租赁的区别

    我现在手上项目的客户是一家销售公司 xff0c 他们有把自己的商品租赁给别的公司经营的业务 于是就有了上面的融资租赁与经营租赁 xff0c 这两种方式在财务上对资产的处理是不一样的 下面我们来看看这个场景 xff1a A公司把资产租给B公司
  • 【Linux系统编程(十四)】生产者和消费者问题

    文章目录 生产者和消费者1 代码示例 生产者和消费者 生产者消费者问题 xff08 英语 xff1a Producer consumer problem xff09 xff0c 也称有限缓冲问题 xff08 英语 xff1a Bounded
  • Linux下做SSH服务(远程登录)配置

    准备工作 1 检查是否安装ssh rpm q OpenSSH server 一般自带 xff0c 不用安装 2 安装ssh服务 xff1a yum list installed grep openssh server 服务器端配置 1 cd
  • Openlayer 计算多个feature的外接矩形,并且缩放到合适的视角显示

    开发gis系统的时候需要点击一个工程然后打开openlayers地图并且将该工程的线条缩放到合适的区域 xff0c 对这个问题的解决方案 xff1a 1 旋转卡壳法求点集的最小覆盖矩形面积以及周长 https www cnblogs com
  • 程序员改变世界,从未如此直观

    万万没想到 xff0c 包博士的代码让一个六岁的小学生哇哇大哭 这个让小学生流眼泪的 科学家代表 有非常漂亮的履历 xff1a 清华大学毕业 博士曾在斯坦福就读 xff0c 他现在是VIPKID的首席AI科学家 xff0c 带领四十多人的产
  • PX4飞控之PWM输出控制

    PX4飞控之PWM输出控制 多旋翼电调如好盈XRotor xff0c DJI通用电调等都支持PWM信号来传输控制信号 常用的400Hz电调信号对应周期2500us xff0c 一般使用高电平时间1000us 2000us为有效信号区间 xf
  • 关于Vue3使用axios的配置教程详解

    一 安装axios 1 npm install axios save 二 配置axios xff0c 添加拦截器 在src目录下新建一个request文件夹 xff0c 在里面新建index ts xff08 或者 js xff09 文件
  • Keyguard上滑解锁流程解析

    2 上滑触摸事件 2 1 Touch down事件 2 2 Touch move事件 2 3 Touch up事件 用户抬起手指 xff0c 产生touch up事件 xff0c PanelView接收到这个事件后会调用endMotionE