1. Import the systemui source code to eclipse
Import the frameworks \ base \ packages \ systemui code to eclipse.
Screenshotstubactivity is used for testing and is not imported.
The project name is dreamsdocklauncher, which is the name of an activity class. You can change the project name by F2.
2. Add a jar Library File
There seems to be no error message. Change the target first.
After the project is built, all errors are displayed.
Open bootreceiver and the prompt "the import Android. util. slog cannot be resolved" is displayed.
Locate the following position in the code of slog. Java, and probably judge that it should be in the following Library (in fact, I don't know how to find it)
Out \ target \ common \ OBJ \ java_libraries \ framework_intermediates \ Classes. Jar
Copy framework_intermediates \ Classes. jar and change the name to add it to the project using the following method.
Put it in front.
The Code prompts that resolved has been displayed.
After the project is built, a half of the errors in the project disappear.
Similarly, import out \ target \ common \ OBJ \ java_libraries \ services_intermediates \ Classes. Jar
There is no error message.
3. Change the package name
Be sure not to mistakenly hurt other projects in eclipse.
After the replacement, it is found that the tree structure of the sidebar is all incorrect. Don't panic, In the first package COM. android. press F2 on systemui and manually change the name to com. zheng. systemui, other package names will be automatically replaced (actually a folder ).
Androidmanifest. XML has an error again, and there is a adhesion in it. Replace it with the old one directly, and then there are many permission is only granted to system apps. Just clean the project and I don't know what the problem is.
End.
Attachment: source code