Attempt to clear memory after keyguard PIN entry
Force object finalization and garbage collection to remove shards of user PIN from memory. Bug: 189315376 Test: Unlock keyguard; take ramdump; search for PIN in the dump Change-Id: I6d951babc225998d959669117c26f823f28fa706
This commit is contained in:
@@ -146,7 +146,9 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException ignored) { }
|
||||
Runtime.getRuntime().gc();
|
||||
System.gc();
|
||||
System.runFinalization();
|
||||
System.gc();
|
||||
});
|
||||
} else {
|
||||
SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
|
||||
|
||||
Reference in New Issue
Block a user