记录日常日志
退出分屏 (android 14)
StageCoordinator.java (package com.android.wm.shell.splitscreen;)
private void exitSplitScreen(@Nullable StageTaskListener childrenToTop,@ExitReason int exitReason) {if (!mMainStage.isActive()) return;final WindowContainerTransaction wct = new WindowContainerTransaction();applyExitSplitScreen(childrenToTop, wct, exitReason);}
2. 打开断点调试
adb shell setprop persist.debug.dalvik.vm.jdwp.enabled 1
dumpsys activity containers --当前窗口层级结构树
启动过程中哪些Activity需要暂停Android14
抓取日志
adb logcat -b all -v threadtime > log.txt
git常用配置
设置全局用户名
git config --global user.name "Your Name"
设置全局电子邮件地址:
git config --global user.email "your_email@example.com"
设置项目特定的用户名
git config user.name "Your Project Specific Name"
设置项目特定的电子邮件地址:
git config user.email "your_project_specific_email@example.com"
生成 SSH 密钥对
ssh-keygen -t rsa -b 4096 -C "gai.he@landmark-phb.com"
ssh-keygen -t rsa -C "gai.he@landmark-phb.com"
ssh-keygen -t ed25519 -C "gai.he@landmark-phb.com"
git 常用
创建patch
git format-patch -1 bae6866ffaf87a00eca8a71d772ee65d35e392a8
git
使用 Stash 保存未提交的更改
git stash git
恢复之前保存的更改
git stash pop
回退修改
git checkout -- services/core/java/com/android/server/policy/WindowManagerPolicy.java
======================
<?xml version="1.0" encoding="UTF-8"?>
<module relativePaths="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/core/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/core/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/services/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/services/core/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/graphics/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/frameworks/base/libs" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/abi" />
<excludeFolder url="file://$MODULE_DIR$/art" />
<excludeFolder url="file://$MODULE_DIR$/bionic" />
<excludeFolder url="file://$MODULE_DIR$/bootable" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/cts" />
<excludeFolder url="file://$MODULE_DIR$/dalvik" />
<excludeFolder url="file://$MODULE_DIR$/developers" />
<excludeFolder url="file://$MODULE_DIR$/development" />
<excludeFolder url="file://$MODULE_DIR$/docs" />
<excludeFolder url="file://$MODULE_DIR$/external" />
<excludeFolder url="file://$MODULE_DIR$/kernel" />
<excludeFolder url="file://$MODULE_DIR$/libnativehelper" />
<excludeFolder url="file://$MODULE_DIR$/ndk" />
<excludeFolder url="file://$MODULE_DIR$/out" />
<excludeFolder url="file://$MODULE_DIR$/pdk" />
<excludeFolder url="file://$MODULE_DIR$/platform_testing" />
<excludeFolder url="file://$MODULE_DIR$/prebuilts" />
<excludeFolder url="file://$MODULE_DIR$/sdk" />
<excludeFolder url="file://$MODULE_DIR$/tools" />
<excludeFolder url="file://$MODULE_DIR$/toolchain" />
<excludeFolder url="file://$MODULE_DIR$/compatibility" />
<excludeFolder url="file://$MODULE_DIR$/compatibility" />
<excludeFolder url="file://$MODULE_DIR$/test" />
<excludeFolder url="file://$MODULE_DIR$/.repo" />
<excludeFolder url="file://$MODULE_DIR$/device" />
<excludeFolder url="file://$MODULE_DIR$/hardware" />
<excludeFolder url="file://$MODULE_DIR$/libcore" />
<excludeFolder url="file://$MODULE_DIR$/packages" />
<excludeFolder url="file://$MODULE_DIR$/system" />
<excludeFolder url="file://$MODULE_DIR$/bazel_test" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
</component>
</module>
=================================
更新API
m test-api-stubs-docs-non-updatable-update-current-api
aosp编译可以调试
javacflags: ["-g"],
optimize: { enabled: false },