Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fcce961 authored by John Spurlock's avatar John Spurlock
Browse files

Fix broken tests to fix build

Change-Id: I6bb9d178a9f1b09c1b247ec9cbdd57507295c4bf
parent 5b39f63c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.framework.permission.tests;

import junit.framework.TestCase;

import android.media.AudioManager;
import android.os.Binder;
import android.os.IVibratorService;
import android.os.Process;
@@ -47,7 +48,8 @@ public class VibratorServicePermissionTest extends TestCase {
     */
    public void testVibrate() throws RemoteException {
        try {
            mVibratorService.vibrate(Process.myUid(), null, 2000, new Binder());
            mVibratorService.vibrate(Process.myUid(), null, 2000, AudioManager.STREAM_ALARM,
                    new Binder());
            fail("vibrate did not throw SecurityException as expected");
        } catch (SecurityException e) {
            // expected
@@ -63,7 +65,8 @@ public class VibratorServicePermissionTest extends TestCase {
     */
    public void testVibratePattern() throws RemoteException {
        try {
            mVibratorService.vibratePattern(Process.myUid(), null, new long[] {0}, 0, new Binder());
            mVibratorService.vibratePattern(Process.myUid(), null, new long[] {0}, 0,
                    AudioManager.STREAM_ALARM, new Binder());
            fail("vibratePattern did not throw SecurityException as expected");
        } catch (SecurityException e) {
            // expected