Fix test testZenUpgradeNotification on watch
Commit a485ec65b5 disabled DND status
change notification on watch. So, assume that the device is not watch
to make the test pass.
Bug: 266833455
Test: atest FrameworksUiServicesTests:com.android.server.\
notification.ZenModeHelperTest#testZenUpgradeNotification
Change-Id: I94441c7172e55ed20add72b4558407fcc1a11fe6
(cherry picked from commit 6aa3b73ea5422cd057e3d58a61a3a013fd5b7f19)
This commit is contained in:
@@ -525,6 +525,13 @@ public class ZenModeHelperTest extends UiServiceTestCase {
|
||||
|
||||
@Test
|
||||
public void testZenUpgradeNotification() {
|
||||
/**
|
||||
* Commit a485ec65b5ba947d69158ad90905abf3310655cf disabled DND status change
|
||||
* notification on watches. So, assume that the device is not watch.
|
||||
*/
|
||||
when(mContext.getPackageManager()).thenReturn(mPackageManager);
|
||||
when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)).thenReturn(false);
|
||||
|
||||
// shows zen upgrade notification if stored settings says to shows,
|
||||
// zen has not been updated, boot is completed
|
||||
// and we're setting zen mode on
|
||||
|
||||
Reference in New Issue
Block a user