Android 模擬器配置
sudo apt install qemu-kvm
sudo adduser 你的名字 kvm
sudo chown 你的名字 /dev/kvm
ps: 這裏你的名字是指你電腦的用戶名。
Android aosp 自定義添加到mk編譯
自己正確書寫mk 或者bp 文件
將模塊名添加到 你的源碼路徑/build/target/product//base_system.mk
PRODUCT_PACKAGES += \
你的模塊名 \
.. ..
將模塊名添加到 你的源碼路徑/build/target/product/handheld_product.mk
PRODUCT_PACKAGES += \
你的模塊名 \
.. ..
顯示 Android 設置裏全面屏手勢
進入 你的源碼/packages/apps/Settings/路徑下
修改此目錄下的
src/com/android/settings/gestures/GesturesSettingPreferenceController.java
src/com/android/settings/gestures/SystemNavigationPreferenceController.java
GesturesSettingPreferenceController.java
private static List< AbstractPreferenceController> buildAllPreferenceControllers (
@NonNull Context context) {
final AmbientDisplayConfiguration ambientDisplayConfiguration =
new AmbientDisplayConfiguration ( context) ;
final List< AbstractPreferenceController> controllers = new ArrayList < > ( ) ;
controllers. add ( new AssistGestureSettingsPreferenceController ( context, FAKE_PREF_KEY)
. setAssistOnly ( false ) ) ;
controllers. add ( new SwipeToNotificationPreferenceController ( context, FAKE_PREF_KEY) ) ;
controllers. add ( new DoubleTwistPreferenceController ( context, FAKE_PREF_KEY) ) ;
controllers. add ( new DoubleTapPowerPreferenceController ( context, FAKE_PREF_KEY) ) ;
controllers. add ( new PickupGesturePreferenceController ( context, FAKE_PREF_KEY)
. setConfig ( ambientDisplayConfiguration) ) ;
controllers. add ( new DoubleTapScreenPreferenceController ( context, FAKE_PREF_KEY)
. setConfig ( ambientDisplayConfiguration) ) ;
controllers. add ( new PreventRingingParentPreferenceController ( context, FAKE_PREF_KEY) ) ;
controllers. add ( new SystemNavigationPreferenceController ( context, FAKE_PREF_KEY) ) ;
return controllers;
}
SystemNavigationPreferenceController.java
static boolean isGestureAvailable ( Context context) {
if ( ! context. getResources ( ) . getBoolean (
com. android. internal. R. bool. config_swipe_up_gesture_setting_available) ) {
return true ;
}
. . . .