From 5e02479aa58ca2a5642eefdc49aef20a62a21a77 Mon Sep 17 00:00:00 2001 From: tarsin Date: Wed, 18 May 2022 22:33:06 +0800 Subject: [PATCH] inline a blank class --- .../com/hippo/drawable/UnikeryDrawable.java | 3 +-- .../java/com/hippo/widget/LoadImageView.java | 3 +-- native/src/main/AndroidManifest.xml | 1 - .../java/com/hippo/image/ImageDrawable.java | 4 ++-- .../com/hippo/image/RecycledException.java | 23 ------------------- 5 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 native/src/main/AndroidManifest.xml delete mode 100644 native/src/main/java/com/hippo/image/RecycledException.java diff --git a/app/src/main/java/com/hippo/drawable/UnikeryDrawable.java b/app/src/main/java/com/hippo/drawable/UnikeryDrawable.java index 8d9ea4dae..d6e53041b 100644 --- a/app/src/main/java/com/hippo/drawable/UnikeryDrawable.java +++ b/app/src/main/java/com/hippo/drawable/UnikeryDrawable.java @@ -26,7 +26,6 @@ import com.hippo.conaco.ConacoTask; import com.hippo.conaco.Unikery; import com.hippo.image.ImageBitmap; import com.hippo.image.ImageDrawable; -import com.hippo.image.RecycledException; import com.hippo.widget.ObservedTextView; public class UnikeryDrawable extends WrapDrawable implements Unikery, @@ -127,7 +126,7 @@ public class UnikeryDrawable extends WrapDrawable implements Unikery diff --git a/native/src/main/java/com/hippo/image/ImageDrawable.java b/native/src/main/java/com/hippo/image/ImageDrawable.java index 1bd30493b..11e1de7dc 100644 --- a/native/src/main/java/com/hippo/image/ImageDrawable.java +++ b/native/src/main/java/com/hippo/image/ImageDrawable.java @@ -31,9 +31,9 @@ public class ImageDrawable extends Drawable implements Animatable, ImageBitmap.C private final ImageBitmap mImageBitmap; private final Paint mPaint; - public ImageDrawable(ImageBitmap imageBitmap) throws RecycledException { + public ImageDrawable(ImageBitmap imageBitmap) throws Exception { if (!imageBitmap.obtain()) { - throw new RecycledException(); + throw new Exception(); } mImageBitmap = imageBitmap; diff --git a/native/src/main/java/com/hippo/image/RecycledException.java b/native/src/main/java/com/hippo/image/RecycledException.java deleted file mode 100644 index 012658abd..000000000 --- a/native/src/main/java/com/hippo/image/RecycledException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2016 Hippo Seven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.hippo.image; - -/** - * Image is recycled. - */ -public class RecycledException extends Exception { -}