💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
#### 本章主要内容: - 深入分析ContentProvider的创建和启动,以及SQLite相关的知识点 - 深入分析Cursor query和close函数的实现 - 深入分析ContentResolver openAssetFileDescriptor函数的实现 #### 本章所涉及的源代码文件名及位置: - ActivityManagerService.java `frameworks/base/services/java/com/android/server/am/ActivityManagerService.java` - ContextImpl.java `frameworks/base/core/java/android/app/ContextImpl.java` - ActivityThread.java `frameworks/base/core/java/android/app/ActivityThread.java` - MediaStore.java `frameworks/base/core/java/android/provider/MediaStore.java` - ContentResolver.java `frameworks/base/core/java/android/content/ContentResolver.java` - ContentProvider.java `frameworks/base/core/java/android/content/ContentProvider.java` - MediaProvider.java `package/providers/MediaProvider/src/java/com/android/MediaProvider/MediaProvider.java` - SQLiteDatabase.java `frameworks/base/core/java/android/database/sqlite/SQLiteDatabase.java` - SQLiteCompliteSql.java `frameworks/base/core/java/android/database/sqlite/SQLiteCompliteSql.java` - android_database_SQLiteDatabase.cpp `frameworks/base/core/jni/android_database_SQLiteDatabase.cpp` - android_database_SQLiteCompliteSql.cpp `frameworks/base/core/jni/android_database_SQLiteCompliteSql.cpp` - sqlite3_android.cpp `external/sqlite3/android/sqlite3_android.cpp` - SQLiteQueryBuilder.java `frameworks/base/core/java/android/database/sqlite/SQLiteQueryBuilder.java` - SQLiteCursorDriver.java `frameworks/base/core/java/android/database/sqlite/SQLiteCursorDriver.java` - SQLiteQuery.java `frameworks/base/core/java/android/database/sqlite/SQLiteQuery.java` - SQLiteCursor.java `frameworks/base/core/java/android/database/sqlite/SQLiteCursor.java` - SQLiteProgram.java `frameworks/base/core/java/android/database/sqlite/SQLiteProgram.java` - CursorToBulkCursorAdaptor.java `frameworks/base/core/java/android/database/CursorToBulkCursorAdaptor.java` - BulkCursorToCursorAdaptor.java `frameworks/base/core/java/android/database/BulkCursorToCursorAdaptor.java` - CursorWindow.java `frameworks/base/core/java/android/database/CursorWindow.java` - android_database_CursorWindow.cpp `frameworks/base/core/jni/android_database_CursorWindow.cpp` - CursorWindow.cpp `frameworks/base/libs/binder/CursorWindow.cpp` - android_database_SQLiteQuery.cpp `frameworks/base/core/jni/android_database_SQLiteQuery.cpp` - CursorWrapper.java `frameworks/base/core/java/android/database/CursorWrapper.java` - AbstractCursor.java `frameworks/base/core/java/android/database/AbstractCursor.java` - BulkCursorNative.java `frameworks/base/core/java/android/database/BulkCursorNative.java` - ParcelFileDescriptor.java `frameworks/base/core/java/android/os/ParcelFileDescriptor.java` - MediaProvider.java `packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java` - android_util_Binder.cpp `frameworks/base/core/jni/android_util_Binder.cpp` - Parcel.cpp `frameworks/base/libs/binder/Parcel.cpp` - binder.c `kernel/drivers/staging/android/binder.c`