Skip to content
Commit b5b32d47 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Fix NPE in WakeLock#finalize for unit test

The stubbed method of "mock(PowerManager.WakeLock.class)" will
lose effect after clearInlineMocks. And then finalizer runs
the real method finalize() that cause NPE because the mocked
object didn't initialize fields.

Bug: 219640050
Test: atest WmTests

Change-Id: If8ee4fbc98c9e33d6ab6ba75a65ba177fa06f09c
parent c67b2ca3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment