Commit
23eb3a19 changed the implementation from sendBroadcast to
sendBroadcastAsUser but didn't change the test.
Test: adb shell am instrument -r -w -e class \
android.app.timezone.RulesUpdaterContractTest#sendBroadcast \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug:
78166765
Change-Id: I0a47e096a46fc63d46dd9ff878a4af0d76af82f0
(cherry picked from commit
b8ab470c273b16390ef8d5715226329e2827e001)
import android.content.Context;
import android.content.Intent;
+import android.os.UserHandle;
import android.support.test.filters.LargeTest;
import org.hamcrest.BaseMatcher;
RulesUpdaterContract.sendBroadcast(mockContext, packageName, tokenBytes);
- verify(mockContext).sendBroadcast(
+ verify(mockContext).sendBroadcastAsUser(
filterEquals(expectedIntent),
+ eq(UserHandle.SYSTEM),
eq(RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION));
}