Android STR研究之四

前言:

在前三篇中初步介绍了开机流程和STR流程,这里讲唤醒

Android STR研究之一-CSDN博客

Android STR研究之二-CSDN博客

Android STR研究之三-CSDN博客

唤醒

如上文所述,当唤醒的时候代码会继续往下执行

复制代码
    private void doHandleDeepSleep(boolean simulatedMode) {
        // keep holding partial wakelock to prevent entering sleep before enterDeepSleep call
        // enterDeepSleep should force sleep entry even if wake lock is kept.
        mSystemInterface.switchToPartialWakeLock();
        mHandler.cancelProcessingComplete();
        synchronized (mLock) {
            mLastSleepEntryTime = SystemClock.elapsedRealtime();
        }
        int nextListenerState;
        if (simulatedMode) {
            simulateSleepByWaiting();
            nextListenerState = CarPowerStateListener.SHUTDOWN_CANCELLED;
        } else {
            boolean sleepSucceeded = suspendWithRetries();
            if (!sleepSucceeded) {
                // Suspend failed and we shut down instead.
                // We either won't get here at all or we will power off very soon.
                return;
            }
            // We suspended and have now resumed
            nextListenerState = CarPowerStateListener.SUSPEND_EXIT;
        }
        synchronized (mLock) {
            mIsResuming = true;
            // Any wakeup time from before is no longer valid.
            mNextWakeupSec = 0;
        }
        Slog.i(TAG, "Resuming after suspending");
        //恢复屏幕亮度
        mSystemInterface.refreshDisplayBrightness();
        //发送状态给vhal
        onApPowerStateChange(CpmsState.WAIT_FOR_VHAL, nextListenerState);
    }

此时给vhal发送的信号状态是(信号:VehicleProperty.AP_POWER_STATE_REPORT,信号值CarPowerStateListener.SUSPEND_EXIT)

Vhal会上报ON状态,正常使用

相关推荐
红橙Darren3 小时前
手写操作系统 - 环境搭建
android·微信·操作系统
_一条咸鱼_3 小时前
Android Runtime直接内存管理原理深度剖析(73)
android·面试·android jetpack
你听得到113 小时前
揭秘Flutter图片编辑器核心技术:从状态驱动架构到高保真图像处理
android·前端·flutter
wilinz3 小时前
Flutter Android 端接入百度地图踩坑记录
android·flutter
小袁拒绝摆烂6 小时前
SQL开窗函数
android·sql·性能优化
apihz7 小时前
VM虚拟机全版本网盘+免费本地网络穿透端口映射实时同步动态家庭IP教程
android·服务器·开发语言·网络·数据库·网络协议·tcp/ip
baidu_247438617 小时前
Android MPAndroidChart使用
android
天平8 小时前
react native现代化组件库的推荐 【持续更新...】
android·前端·react native
apihz9 小时前
通用图片搜索-搜狗源免费API接口使用指南
android·java·python·php·音视频
你过来啊你9 小时前
Android开发中ARouter使用和原理详解
android