Such as the title, now transplanted Android4.2.2, the need to achieve the developers in setting the default boot option checked Disable HW overlays options how to achieve? Similar to the following methods can now be found to:
The default value
If you want to modify the system's boot loader afterModify SettingsProvider defaults, Settings to configure various settings of the Android system, the default values for these settings are made frameworks in SettingsProvider read from the database, then the first boot when these data are from where it ?
frameworks / base / packages / SettingsProvider / res / values / defaults.xml
This file is used to store default settings
Android systemFor example:
brightness
If you want to define defaults.xml did not, and after here to add, modify
frameworks / base / packages / SettingsProvider / src / com / android / providers / settings / DatabaseHelper.java, add your own storage code.
Read from the database that can not be achieved on the first boot is checked by default Disable HW overlays, and defaults.xml, no content on Developer options, how to add?
Reply:
Add yourself to initialize a loadStringSettings in DatabaseHelper Disable HW overlays
Reply:
SQLiteStatement stmt = null;
try {
stmt = db.compileStatement ("INSERT INTO system (name, value)"
+ "VALUES (,??);");
loadBooleanSetting (stmt, Settings.System.NOTIFICATION_LIGHT_PULSE ,
R.bool.def_ notification_pulse );
db.setTransactionSuccessful ();
} Finally {
db.endTransaction ();
if (stmt = null!) stmt.close ();
}
Modify the above code red part can define your own fields, the blue part of the developer the option corresponding Disable HW overlays field how to determine?
Reply:
This thing is not looked under the HWC with settingsprovider store. . . . . .
Then you go inside how to write database will not be called to. . . . . .
frameworks / native / services / surfaceflinger / SurfaceFlinger.cpp in
mDebugDisableHWC (0), you put the words into an initial try
Reply:
Great! Indeed such a change, aSysBang how you are positioned to Disable HW overlays SurfaceFlinger.cpp mDebugDisableHWC (0) it?
No comments:
Post a Comment