Skip to content

Commit

Permalink
...Androidx Annotation Migration...
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 368922286
  • Loading branch information
sjudd authored and glide-copybara-robot committed Apr 16, 2021
1 parent 755c39f commit a7b254c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@

/** Utilities for writing classes and logging. */
final class ProcessorUtil {
// TODO: Remove this once we convert Glide's internal classes to AndroidX.
private static final boolean REQUIRE_SUPPORT_ANNOTATIONS = false;
private static final String GLIDE_MODULE_PACKAGE_NAME = "com.bumptech.glide.module";
private static final String APP_GLIDE_MODULE_SIMPLE_NAME = "AppGlideModule";
private static final String LIBRARY_GLIDE_MODULE_SIMPLE_NAME = "LibraryGlideModule";
Expand Down Expand Up @@ -503,9 +501,6 @@ static List<ClassName> nonNulls() {
}

private ClassName findAnnotationClassName(ClassName androidxName, ClassName supportName) {
if (REQUIRE_SUPPORT_ANNOTATIONS) {
return supportName;
}
Elements elements = processingEnv.getElementUtils();
TypeElement visibleForTestingTypeElement =
elements.getTypeElement(androidxName.reflectionName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bumptech.glide;

import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.test.AppModuleWithExcludes;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bumptech.glide;

import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.test.AppModuleWithLibraryInPackage;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bumptech.glide;

import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.test.AppModuleWithMultipleExcludes;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bumptech.glide;

import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.test.EmptyAppModule;
import com.bumptech.glide.test.EmptyLibraryModule;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bumptech.glide;

import android.content.Context;
import androidx.annotation.NonNull;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.test.EmptyAppModule;
import java.util.Collections;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.bumptech.glide.gifdecoder;

import androidx.annotation.IntDef;
import androidx.annotation.ColorInt;
import androidx.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import static com.bumptech.glide.gifdecoder.GifFrame.DISPOSAL_NONE;
import static com.bumptech.glide.gifdecoder.GifFrame.DISPOSAL_UNSPECIFIED;

import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.Log;
import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.Log;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.Log;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
Expand Down

0 comments on commit a7b254c

Please sign in to comment.