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状态,正常使用

相关推荐
lynn8570_blog12 分钟前
关于compose的remember
android·kotlin
毕设源码-邱学长24 分钟前
【开题答辩全过程】以 基于安卓的外卖点餐APP的设计与实现为例,包含答辩的问题和答案
android
csj5042 分钟前
安卓基础之《(16)—内容提供者(2)使用内容组件获取通讯信息》
android
·云扬·1 小时前
ClickHouse常用管理语句汇总:会话、磁盘、性能与复制管理
android·clickhouse
游戏开发爱好者81 小时前
2025年iOS应用上架App Store全指南,开发者必看
android·ios·小程序·https·uni-app·iphone·webview
a3158238061 小时前
Android CardView修改背景阴影
android·cardview·修改背景
kk哥88992 小时前
Android UI 优化指南:流畅度与体验双提升
android·ui
摘星编程3 小时前
Flutter for OpenHarmony 实战:SliverList 滑动列表详解
android·javascript·flutter
abbiz3 小时前
30 个 Android 面试高频问题及答案
android·面试·职场和发展
冬奇Lab3 小时前
【Kotlin系列04】类与对象基础:从Java Bean到Data Class的优雅蜕变
android·kotlin·编程语言