資料存取稽核
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
為了協助您更清楚掌握應用程式及其依附元件如何存取使用者的私人資料,Android 11 導入了資料存取稽核功能。透過這項程序取得深入分析結果,有助於找出可能屬於非預期的資料存取作業。
應用程式可以註冊 AppOpsManager.OnOpNotedCallback
例項,只要發生下列其中一種事件,這個例項就會執行動作:
- 應用程式的程式碼存取私人資料。為協助您判斷應用程式叫用事件的邏輯部分,您可以依歸因標記稽核資料存取。
- 獨立程式庫或 SDK 中的程式碼存取私人資料。
其他資源
如要進一步瞭解資料存取稽核,請參閱下列資料:
網誌文章
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[],[],null,["To provide more transparency into how your app and its dependencies access\nprivate data from users, Android 11 introduces [data access\nauditing](/guide/topics/data/audit-access). By having insights from this\nprocess, you can better identify potentially unexpected data access.\n\nYour app can register an instance of\n[`AppOpsManager.OnOpNotedCallback`](/reference/android/app/AppOpsManager.OnOpNotedCallback), which can perform\nactions each time one of the following events occurs:\n\n- Your app's code accesses private data. To help you determine which logical part of your app invoked the event, you can audit data access by attribution tag.\n- Code in a dependent library or SDK accesses private data.\n\nAdditional resources\n\nFor more information about data access auditing, view the following materials:\n\nBlog posts\n\n- [New Android 11 tools to make apps more private and\n stable](https://medium.com/androiddevelopers/new-android-11-tools-to-make-apps-more-private-and-stable-c9dcea0af415)"]]