Use a non-null package name when creating a ComponentName
While we shouldn't be able to use a null value for a ComponentName (according to the comments in the code at least), it seems our test is able to make make one with a mock context that doesn't have a mocked value returned for getPackage(). This has downstream effects if someone ever calls equals() with our ComponentName, which does not null check the package name. This change adds a simple mocked value for getPackageName(). Tag: #refactor Bug: 231246591 Test: atest HfpClientDeviceBlockTest Merged-In: Icedf4c11efd242d925c0c8d993d9706882df54c2 Change-Id: Icedf4c11efd242d925c0c8d993d9706882df54c2
Loading
Please register or sign in to comment