diff options
| author | Alex Johnston <acjohnston@google.com> | 2022-03-15 20:48:50 +0000 |
|---|---|---|
| committer | Alex Johnston <acjohnston@google.com> | 2022-03-15 20:48:50 +0000 |
| commit | ca234fdd8cb085aba10cb7d5b93cb41bc23e14f5 (patch) | |
| tree | 3263a4329c360319b732af3b37dcaf621744df82 /core/java/android | |
| parent | 31fc5489fdff2876f0b53d8fa198a39d2279ab75 (diff) | |
dump factory reset protection policy
Bug: 176109794
Test: Generate bug report and checked dumpsys
Change-Id: I08562763ce998b825830f8bcaba40b0f7fc5aaa3
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/admin/FactoryResetProtectionPolicy.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/admin/FactoryResetProtectionPolicy.java b/core/java/android/app/admin/FactoryResetProtectionPolicy.java index 40ae1f0c11ea..7e951779d2a6 100644 --- a/core/java/android/app/admin/FactoryResetProtectionPolicy.java +++ b/core/java/android/app/admin/FactoryResetProtectionPolicy.java @@ -25,6 +25,7 @@ import android.annotation.Nullable; import android.content.ComponentName; import android.os.Parcel; import android.os.Parcelable; +import android.util.IndentingPrintWriter; import android.util.Log; import android.util.TypedXmlPullParser; import android.util.TypedXmlSerializer; @@ -254,4 +255,18 @@ public final class FactoryResetProtectionPolicy implements Parcelable { return !mFactoryResetProtectionAccounts.isEmpty() && mFactoryResetProtectionEnabled; } + /** + * @hide + */ + public void dump(IndentingPrintWriter pw) { + pw.print("factoryResetProtectionEnabled="); + pw.println(mFactoryResetProtectionEnabled); + + pw.print("factoryResetProtectionAccounts="); + pw.increaseIndent(); + for (int i = 0; i < mFactoryResetProtectionAccounts.size(); i++) { + pw.println(mFactoryResetProtectionAccounts.get(i)); + } + pw.decreaseIndent(); + } } |
