Skip to content

Commit

Permalink
Revert GMA and IMA changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcaunt committed Sep 9, 2024
1 parent ee1b41c commit 429d744
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 320 deletions.
3 changes: 0 additions & 3 deletions securesignals-gma-dev-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"/>

<!-- Metadata for toggling UID2 and EUID environments. If true, EUID is used. -->
<meta-data android:name="uid2_environment_euid" android:value="false"/>

<activity
android:exported="true"
android:name="com.uid2.dev.BannerActivity">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.uid2.dev;

import static com.uid2.dev.utils.BundleExKt.isEnvironmentEUID;
import static com.uid2.dev.utils.ContextExKt.getMetadata;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
Expand All @@ -14,9 +11,9 @@
import com.google.android.gms.ads.RequestConfiguration;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.uid2.EUIDManager;
import com.uid2.UID2Manager;
import com.uid2.data.UID2Identity;

import org.json.JSONObject;

import java.io.BufferedReader;
Expand Down Expand Up @@ -104,11 +101,7 @@ private void loadUID2Identity() {
refreshFrom,
refreshExpires,
fromJsonIdentity.getRefreshResponseKey());
if (isEnvironmentEUID(getMetadata(this))) {
EUIDManager.getInstance().setIdentity(identity);
} else {
UID2Manager.getInstance().setIdentity(identity);
}
UID2Manager.getInstance().setIdentity(identity);
} catch (Exception e) {
Log.e(TAG, "Error loading Identity: " + e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ package com.uid2.dev

import android.app.Application
import android.util.Log
import com.uid2.EUIDManager
import com.uid2.UID2Manager
import com.uid2.UID2Manager.Environment.Production
import com.uid2.dev.utils.getMetadata
import com.uid2.dev.utils.isEnvironmentEUID

class GMADevApplication : Application() {

Expand All @@ -16,18 +13,11 @@ class GMADevApplication : Application() {
// Initialise the UID2Manager class. We will use it's DefaultNetworkSession rather than providing our own
// custom implementation. This can be done to allow wrapping something like OkHttp.
try {
if (getMetadata().isEnvironmentEUID()) {
EUIDManager.init(
context = this,
isLoggingEnabled = true,
)
} else {
UID2Manager.init(
context = this,
environment = Production,
isLoggingEnabled = true,
)
}
UID2Manager.init(
context = this,
environment = Production,
isLoggingEnabled = true,
)
} catch (ex: Exception) {
Log.e("GMADevApplication", "Error initialising UID2Manager", ex)
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions securesignals-ima-dev-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
android:networkSecurityConfig="@xml/network_security_config"
tools:ignore="UnusedAttribute">

<!-- Metadata for toggling UID2 and EUID environments. If true, EUID is used. -->
<meta-data android:name="uid2_environment_euid" android:value="false"/>

<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ package com.uid2.dev

import android.app.Application
import android.util.Log
import com.uid2.EUIDManager
import com.uid2.UID2Manager
import com.uid2.UID2Manager.Environment.Production
import com.uid2.dev.utils.getMetadata
import com.uid2.dev.utils.isEnvironmentEUID

class IMADevApplication : Application() {

Expand All @@ -16,18 +13,11 @@ class IMADevApplication : Application() {
// Initialise the UID2Manager class. We will use it's DefaultNetworkSession rather than providing our own
// custom implementation. This can be done to allow wrapping something like OkHttp.
try {
if (baseContext.getMetadata().isEnvironmentEUID()) {
EUIDManager.init(
context = this,
isLoggingEnabled = true,
)
} else {
UID2Manager.init(
context = this,
environment = Production,
isLoggingEnabled = true,
)
}
UID2Manager.init(
context = this,
environment = Production,
isLoggingEnabled = true,
)
} catch (ex: Exception) {
Log.e("IMADevApplication", "Error initialising UID2Manager", ex)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.uid2.dev;

import static com.uid2.dev.utils.BundleExKt.isEnvironmentEUID;
import static com.uid2.dev.utils.ContextExKt.getMetadata;

import android.content.Context;
import android.media.AudioManager;
import android.os.Bundle;
Expand All @@ -25,7 +22,6 @@
import com.google.ads.interactivemedia.v3.api.ImaSdkFactory;
import com.google.ads.interactivemedia.v3.api.ImaSdkSettings;
import com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate;
import com.uid2.EUIDManager;
import com.uid2.UID2Manager;
import com.uid2.data.UID2Identity;

Expand Down Expand Up @@ -231,11 +227,7 @@ private void loadUID2Identity() {
refreshExpires,
fromJsonIdentity.getRefreshResponseKey());

if (isEnvironmentEUID(getMetadata(getBaseContext()))) {
EUIDManager.getInstance().setIdentity(identity);
} else {
UID2Manager.getInstance().setIdentity(identity);
}
UID2Manager.getInstance().setIdentity(identity);
} catch (Exception e) {
Log.e(LOGTAG, "Error loading Identity: " + e);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 429d744

Please sign in to comment.