Loading packages/SettingsLib/tests/integ/src/com/android/settingslib/users/AvatarPhotoControllerTest.java +6 −5 Original line number Diff line number Diff line Loading @@ -89,6 +89,10 @@ public class AvatarPhotoControllerTest { @After public void tearDown() { String[] entries = mImagesDir.list(); for (String entry : entries) { new File(mImagesDir, entry).delete(); } mImagesDir.delete(); } Loading Loading @@ -233,7 +237,8 @@ public class AvatarPhotoControllerTest { public void internalCropUsedIfNoSystemCropperFound() throws IOException { when(mMockAvatarUi.startSystemActivityForResult(any(), anyInt())).thenReturn(false); new File(mImagesDir, "file.txt").createNewFile(); File file = new File(mImagesDir, "file.txt"); saveBitmapToFile(file); Intent intent = new Intent(); intent.setData(Uri.parse( Loading @@ -241,10 +246,6 @@ public class AvatarPhotoControllerTest { mController.onActivityResult( REQUEST_CODE_TAKE_PHOTO, Activity.RESULT_OK, intent); Intent startIntent = verifyStartSystemActivityForResult( "com.android.camera.action.CROP", REQUEST_CODE_CROP_PHOTO); assertThat(startIntent.getData()).isNotEqualTo(mTakePhotoUri); verify(mMockAvatarUi, timeout(TIMEOUT_MILLIS)).returnUriResult(mCropPhotoUri); InputStream imageStream = mContext.getContentResolver().openInputStream(mCropPhotoUri); Loading Loading
packages/SettingsLib/tests/integ/src/com/android/settingslib/users/AvatarPhotoControllerTest.java +6 −5 Original line number Diff line number Diff line Loading @@ -89,6 +89,10 @@ public class AvatarPhotoControllerTest { @After public void tearDown() { String[] entries = mImagesDir.list(); for (String entry : entries) { new File(mImagesDir, entry).delete(); } mImagesDir.delete(); } Loading Loading @@ -233,7 +237,8 @@ public class AvatarPhotoControllerTest { public void internalCropUsedIfNoSystemCropperFound() throws IOException { when(mMockAvatarUi.startSystemActivityForResult(any(), anyInt())).thenReturn(false); new File(mImagesDir, "file.txt").createNewFile(); File file = new File(mImagesDir, "file.txt"); saveBitmapToFile(file); Intent intent = new Intent(); intent.setData(Uri.parse( Loading @@ -241,10 +246,6 @@ public class AvatarPhotoControllerTest { mController.onActivityResult( REQUEST_CODE_TAKE_PHOTO, Activity.RESULT_OK, intent); Intent startIntent = verifyStartSystemActivityForResult( "com.android.camera.action.CROP", REQUEST_CODE_CROP_PHOTO); assertThat(startIntent.getData()).isNotEqualTo(mTakePhotoUri); verify(mMockAvatarUi, timeout(TIMEOUT_MILLIS)).returnUriResult(mCropPhotoUri); InputStream imageStream = mContext.getContentResolver().openInputStream(mCropPhotoUri); Loading