Skip to content

Commit

Permalink
fix(android): remove deprecated usages of APPLICATION_ID (#3711)
Browse files Browse the repository at this point in the history
Removed in preparation for Android Studio v.4.0.0 release today.

[publish]
  • Loading branch information
Salakar authored May 29, 2020
1 parent 8b72876 commit 984d3fc
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@
*
*/

import io.invertase.firebase.BuildConfig;
import io.invertase.firebase.common.ReactNativeFirebaseInitProvider;

public class ReactNativeFirebaseAppInitProvider extends ReactNativeFirebaseInitProvider {
private static final String EMPTY_APPLICATION_ID_PROVIDER_AUTHORITY =
BuildConfig.APPLICATION_ID + ".reactnativefirebaseappinitprovider";

@Override
public String getEmptyProviderAuthority() {
return EMPTY_APPLICATION_ID_PROVIDER_AUTHORITY;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,10 @@
import javax.annotation.OverridingMethodsMustInvokeSuper;

import io.invertase.firebase.app.ReactNativeFirebaseApp;
import io.invertase.firebase.interfaces.InitProvider;

public class ReactNativeFirebaseInitProvider extends ContentProvider implements InitProvider {
private static void checkContentProviderAuthority(
ProviderInfo info,
String emptyProviderAuthority
) {
if (info != null) {
if (emptyProviderAuthority.equals(info.authority)) {
throw new IllegalStateException(
"Incorrect provider authority in manifest. This is most likely due to a missing "
+ "applicationId variable in application's build.gradle.");
}
}
}

public String getEmptyProviderAuthority() {
throw new RuntimeException("STUB: getEmptyProviderAuthority override not implemented");
}

public class ReactNativeFirebaseInitProvider extends ContentProvider {
@Override
public void attachInfo(Context context, ProviderInfo info) {
checkContentProviderAuthority(info, getEmptyProviderAuthority());
super.attachInfo(context, info);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

class Constants {
final static String EMPTY_APPLICATION_ID_PROVIDER_AUTHORITY = BuildConfig.APPLICATION_ID + ".reactnativefirebasecrashlyticsinitprovider";
final static String KEY_CRASHLYTICS_NDK_ENABLED = "crashlytics_ndk_enabled";
final static String KEY_CRASHLYTICS_DEBUG_ENABLED = "crashlytics_debug_enabled";
final static String KEY_CRASHLYTICS_AUTO_COLLECTION_ENABLED = "crashlytics_auto_collection_enabled";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ static boolean isCrashlyticsCollectionEnabled() {
return enabled;
}

@Override
public String getEmptyProviderAuthority() {
return EMPTY_APPLICATION_ID_PROVIDER_AUTHORITY;
}

@Override
public boolean onCreate() {
super.onCreate();
Expand Down

0 comments on commit 984d3fc

Please sign in to comment.