干货答疑分享记录:as导入问题,LSP含义,分屏进入SplashScreen

Android 12之启动画面Splash Screens(二) -- framework原理 本篇介绍Splash Screens的framework层原理。 阅读详情

背景:

vip学员群经常会有学员遇到一些常见的android framework开发问题,近期收集整理一些疑问,主要有以下3个:

1、android studio对源码进行导入时候,老是无法跳转到系统source code

2、学员在群里询问dumpOtherProcessesInfoLSP中末尾的LSP含义是啥

3、学员询问分屏过程中请问到底有没有Splash Screen的画面展示,看到有图层,但是没有看到有Icon

下面针对上面3个学员的疑问进行分别解答记录。

问题1:

android studio对源码进行导入时候,老是无法跳转到系统source code
这个问题学员已经按照我之前分享的blog
aosp源码导入android studio常见问题汇总-学员答疑
对相关的android.iml进行了相关的修改,把sourceFolder放到最顶部了
在这里插入图片描述
但是发现
在这里插入图片描述
最后原因发现是
在这里插入图片描述

问题2:

有学员提问ams代码中的dumpOtherProcessesInfoLSP方法尾部的LSP是啥含义
在这里插入图片描述

正确解答其实在ActivityManagerService类中本身有对这个LSP等进行解释,其实指的是锁的范围。

frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java

   /**
     * The lock for process management.
     *
     * <p>
     * This lock is widely used in conjunction with the {@link #mGlobalLock} at present,
     * where it'll require any of the locks to read from a data class, and both of the locks
     * to write into that data class.
     *
     * For the naming convention of function suffixes:
     * <ul>
     *    <li>-LOSP:    Locked with any Of global am Service or Process lock</li>
     *    <li>-LSP:     Locked with both of global am Service and Process lock</li>
     *    <li>-Locked:  Locked with global am service lock alone</li>
     *    <li>-LPr:     Locked with Process lock alone</li>
     * </ul>
     * For the simplicity, the getters/setters of the fields in data classes usually don't end with
     * the above suffixes even if they're guarded by the locks here.
     * </p>
     *
     * <p>
     * In terms of locking order, it should be right below to the {@link #mGlobalLock},
     * and above everything else which used to be underneath the {@link #mGlobalLock}.
     * As of today, the core components(services/providers/broadcasts) are still guarded by
     * the {@link #mGlobalLock} alone, so be cautious, avoid from acquiring the {@link #mGlobalLock}
     * while holding this lock.
     * </p>
     *
     */
    final ActivityManagerGlobalLock mProcLock = ENABLE_PROC_LOCK
            ? new ActivityManagerProcLock() : mGlobalLock;

问题3:

学员在学习新版本aosp15的分屏功能时候,使用Winscope分析分屏启动发现有如下不理解的画面:

在这里插入图片描述学员疑问在正常情况下Splash窗口都是有Icon的,这里明显没有看到有Icon,只看到一个背景图,这个是为啥?

这里其实可以通过SplashScreenView相关日志对比看出相关的线索:
正常打开App时候,展示的SplashScreenView的相关打印

01-15 13:43:58.920   816   947 D SplashScreenView: Icon: view: android.widget.ImageView{90f9ece V.ED..... ......I. 0,0-0,0 #1020504 android:id/splashscreen_icon_view} drawable: com.android.wm.shell.startingsurface.SplashscreenIconDrawableFactory$ImmobileIconDrawable@f5d91ef size: 560

可以看出这里有相关的Icon信息,大小是560

分屏情况下的打印:
可以看到size大小是0

01-15 13:44:25.555   816   947 D SplashScreenView: Icon: view: null drawable: null size: 0

调试发现其实在SplashScreenView创建时候会根据mSuggestType来设置icon相关的情况:
在这里插入图片描述调试发现分屏情况下mSuggestType是STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN类型。

  /**
     * Prefer solid color splash screen starting window.
     * @hide
     */
    public static final int STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN = 3;

更多framework干货学习,请关注下面“千里马学框架”

Android 12之启动画面Splash Screens(一) -- 适配 通过// 需要在动画结束后移除SplashScreenView slideUpAnimator . addListener(new AnimatorListenerAdapter() {} });});更多请参考自定义用于关闭启动画面的动画如果想保留原启动画面Activity(),原逻辑保持为主入口,在启动画面结束后显示的内容。Google建议完全移除自定义启动画面Activity。 阅读详情

相关推荐

数字求和LSP

可以忽略CAD中标注的前缀文字字母等直接读取后缀数字计算面积合

as 下载地址总汇

Android Studio 3.0October 25, 2017 InstallersWindows IDE only (64-bit): android-studio-ide-171.4408382-windows.exe (714340664 bytes)Mac: android-studio-ide-171.4408382-mac.dmg (766935438 bytes)SH

adc_god的博客 1835

cad插件数字相加.lsp

数字相加.lsp,可以把数字直接加起来的

推荐的几个AS插件

个人使用的比较好的插件如图 http://download.csdn.net/detail/lvwenbo0107/9450884

阿姆斯特哩的博客 677

As常用插件

as常用插件,提升开发效率。 不清楚用途的话可以评论留言。

【JESD79-5之】11 IDD, IDDQ, IPP规格参数和测试条件(IDD, IDDQ, IPP Specification Parameters and Test conditions)

【代码】【JESD79-5之】11 IDD, IDDQ, IPP规格参数和测试条件(IDD, IDDQ, IPP Specification Parameters and Test conditions)

m0_61126667的博客 4860

asm-lsp 项目使用教程

asm-lsp 项目使用教程 1. 项目介绍 asm-lsp 是一个针对 NASM、GAS 和 GO 汇编语言的语言服务器。它提供了诸如悬停提示、自动补全、签名帮助、跳转到定义和查看引用等功能。该项目支持 x86、x86_64、ARM、RISCV 和 z80 指令集的汇编文件。通过使用 asm-lsp,开发者可以在阅读汇编输出时查询每个命令的具体作用,从而更好地优化代码。 2. 项目快速启动 安装...

gitblog_00545的博客 612

流媒体学习之路(mediasoup)——simulcast 与 svc 简介(7)

流媒体学习之路(mediasoup)——simulcast 与 svc(7) 文章目录流媒体学习之路(mediasoup)——simulcast 与 svc(7)

qw225967的博客 7339

asm-lsp 项目教程

asm-lsp 项目教程 1. 项目的目录结构及介绍 asm-lsp 项目的目录结构如下: asm-lsp/ ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── asm-lsp_config_schema.json ├── demo/ ├── docs_store/ ├── editors/ │ └── code/ ├── s...

gitblog_00516的博客 480

Xilinx Vivado LDPC IP core,TSN IP core. 各种IP core

Xilinx Vivado LDPC IP core,TSN IP core. 各种IP core

qq_1432825237的博客 3991

颠覆性创新的测量框架与跨领域实证分析

颠覆性创新作为科技发展的重要驱动力,其核心在于实现知识体系的范式转换。从技术原理看,这类创新通常具备知识替代、网络重构和跨领域渗透三大特征,通过引用网络分析和文本挖掘等方法可量化评估其影响力。在工程实践中,CD指数、DI指数等测量工具帮助研究者识别具有突破潜力的成果,而深度学习等新兴技术进一步提升了评估精度。当前AI、半导体等领域的热门技术发展表明,模块化架构和产业协同能有效促进颠覆性创新。面对全球范围内创新颠覆性下降的趋势,优化科研评价体系、构建跨学科协作网络成为关键应对策略。

weixin_29735807的博客 323

Android T startingwindow流程梳理

startingwindow的一些流程梳理

yimelancholy的博客 7190

AI Agent开发第82课-手把手教你把paddleocr-vl做成mcp使其在DIFY里运行

本文详解如何将国产顶尖多模态 OCR 模型 PaddleOCR-VL 封装为标准 MCP(Model Calling Protocol)服务,并通过自研的 HTTP-based MCP Client 接入 Dify 1.10,实现 AI Agent 在对话中自动识别并调用 OCR 能力。该方案已在某头部保险公司真实业务流程中落地,使用了当前最先进的“Agentic AI 原生”设计思想。

打造全国最全的AI Agent开发知识领域的博客 1625

重学分屏之进入分屏进入动画Splash Screen图层剖析

本文分析了Android分屏模式下启动Activity时Splash Screen的特殊表现。研究发现,分屏启动会使用STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN类型,仅显示纯色背景而无应用图标。通过日志和代码分析,揭示了该类型在任务切换时被触发,且由于纯色背景的alpha值变化及窗口隐藏机制,导致实际画面无法在录屏中呈现。与常规启动的带图标Splash Screen相比,分屏模式采用了更简化的过渡效果。

liaosongmao1的专栏 108

中远麒麟堡垒机 SQL注入漏洞复现

中远麒麟堡垒机/baoleiji/api/tokens接口处存在sql注入漏洞,未经身份认证的攻击者可通过该漏洞获取数据库敏感信息及凭证,最终可能导致服务器失陷。

0xSec 2996

Android功耗系列专题理论之一:功耗优化分析思路简介

本文系统介绍了电子系统功耗分析方法,涵盖静态与动态功耗原理、电流波形分析技术和模块化拆解策略。重点阐述了PMIC与CPU协同管理机制、DVFS动态调节技术,以及通过示波器捕获波形特征定位异常的方法。针对亮屏等典型场景,提出三阶段对比分析法,并详细说明硬件/软件拆解方案及混合验证策略。文章还总结了常见问题模块(CPU、多媒体、外设)的排查流程,强调需结合日志分析、温度控制及重复测试确保数据可靠性,为功耗优化提供系统化解决方案。

1459

"EDI+LSP"方案之LSP系统介绍

一、LSP系统简介 LSP(Logistic Solution Professional)系统,替代了原有Excel手动操作的方式,进行数据处理,为完备的中小企业提供了一套完整的“EDI+业务”解决方案,在成本投入最小的情况下,帮助企业实现EDI传输及业务处理自动化。 二、LSP系统主界面 主界面显示了LSP系统的五大功能:Delivery Schedule(交付预测计划)、Delivery N...

EDI电子数据交换 | 知行软件 1836

YOLO26 终极蒸馏指南:从入门到 SOTA (The Ultimate Distillation Guide)

《YOLO26 蒸馏技术指南》深入解析了知识蒸馏在目标检测中的应用,提出五大蒸馏范式:响应蒸馏(学习最终输出)、特征蒸馏(模仿中间特征)、关系蒸馏(捕捉通道关联)、CWD(通道语义对齐)和FGD(前景背景分离)。实验表明,"Response KD + CWD + FGD"组合效果最佳,使YOLO26n在0.5ms推理速度下达到0.956 mAP50,甚至超越教师模型。指南提供模块化代码实现和超参数调优建议,强调蒸馏能平衡模型精度与效率,是轻量化部署的有效方案。

weixin_51988935的博客 717

acad.lsp病毒彻底解决办法

acad.lsp病毒彻底解决办法 手动方法:关闭CAD,在全盘搜索 acad.lsp acadapp.lsp acadiso.lsp ,彻底清除即可。 目前有一种lisp代码具备病毒的特征,有一定危害 具体情况如下: 在有.DWG文件里如果带有ACAD.LSP双击打开DWG文件,就会自动加载这个lisp, 此lisp的功能是: 加载后炸开命令 外部引用等命令失效。并且可传染:...

weixin_33805557的博客 4078

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

LSP(分层服务提供者)

LSP本身是DLL,可以将它安装到winsock目录,以便创建套接字的应用程序不必知道此LSP的任何信息就能调用它。 运行原理:   套接字创建函数会在winsock目录中寻找合适的协议   调用此协议,的提供者导出的函数 完成各种功能。 编写目的:   让用户调用自定义的服务提供者,有自定义的服务提供者调用下层提供者。这样便截获所有的winsock调用了。   服务提供者本身是DL...

weixin_33841722的博客 802

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

常见AutoCAD病毒(acad.fas、acad.lsp)清除方法

常见AutoCAD病毒(acad.fas、acad.lsp)清除方法acad.fas、acad.lsp这两种病毒是最常见的CAD病毒了,并且往往同时出现。由于其本身对系统并不具备危害性,仅仅是恶作剧程序罢了,因此大多数防病毒软件对它们不起作用,下面介绍手动删除方法。第一步:查找硬盘、U盘内的 acad.fas、lcm.fas、acad.lsp、acadapp.lsp、acadappp.ls

永不放弃 20万+

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Android 开发入门实践(二):Kotlin 空安全,从可空类型到安全访问

延续 NewsApp 项目中的新闻标题练习,记录 Kotlin 安全调用。

Easyhood的博客 289
上一篇: 分享你的安卓framework成长学习经验-千里马第二次社群学习
下一篇: 学员答疑:安卓分屏窗口的TouchableRegion设置流程追踪
千里马学框架
博客等级 码龄6年 1万+粉丝 650原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千里马学框架

帮助你了,就请我喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值