Loading services/core/java/com/android/server/pm/MultiuserDeprecationReporter.java +15 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ final class MultiuserDeprecationReporter { } else { mGetMainUserCalls = null; mIsMainUserCalls = null; } } Loading Loading @@ -126,6 +125,21 @@ final class MultiuserDeprecationReporter { } } // TODO(b/414326600): add unit tests void reset(PrintWriter pw) { // TODO(b/414326600): should reset in the mHandler thread (as its state is written in that // thread), but it would require blocking the caller until it's done if (mGetMainUserCalls != null) { mGetMainUserCalls.clear(); } if (mIsMainUserCalls != null) { mIsMainUserCalls.clear(); } pw.println("Reset"); } /** Retrieves the internal package manager interface. */ private PackageManagerInternal getPackageManagerInternal() { // Don't need to synchronize; worst-case scenario LocalServices will be called twice. Loading services/core/java/com/android/server/pm/UserManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -8053,7 +8053,11 @@ public class UserManagerService extends IUserManager.Stub { mUserVisibilityMediator.dump(pw, args); return; case "--deprecated-calls": if (args.length > 1 && args[1].equals("reset")) { mDeprecationReporter.reset(pw); } else { mDeprecationReporter.dump(pw); } return; } } Loading Loading
services/core/java/com/android/server/pm/MultiuserDeprecationReporter.java +15 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ final class MultiuserDeprecationReporter { } else { mGetMainUserCalls = null; mIsMainUserCalls = null; } } Loading Loading @@ -126,6 +125,21 @@ final class MultiuserDeprecationReporter { } } // TODO(b/414326600): add unit tests void reset(PrintWriter pw) { // TODO(b/414326600): should reset in the mHandler thread (as its state is written in that // thread), but it would require blocking the caller until it's done if (mGetMainUserCalls != null) { mGetMainUserCalls.clear(); } if (mIsMainUserCalls != null) { mIsMainUserCalls.clear(); } pw.println("Reset"); } /** Retrieves the internal package manager interface. */ private PackageManagerInternal getPackageManagerInternal() { // Don't need to synchronize; worst-case scenario LocalServices will be called twice. Loading
services/core/java/com/android/server/pm/UserManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -8053,7 +8053,11 @@ public class UserManagerService extends IUserManager.Stub { mUserVisibilityMediator.dump(pw, args); return; case "--deprecated-calls": if (args.length > 1 && args[1].equals("reset")) { mDeprecationReporter.reset(pw); } else { mDeprecationReporter.dump(pw); } return; } } Loading