Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java style and AndroidManifest changes #1212

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gma/integration_test/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
<application android:label="@string/app_name">
<application android:label="@string/app_name"
android:taskAffinity="">
<!-- You may replace the sample App ID below with your own App ID. -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"/>
<activity android:name="android.app.NativeActivity"
android:exported="true"
android:screenOrientation="portrait"
android:configChanges="orientation|screenSize">
<meta-data android:name="android.app.lib_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

package com.google.firebase.gma.internal.cpp;

import android.util.Log;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.AdInspectorError;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.OnAdInspectorClosedListener;

/** Helper class for listening to AdInspector closed events. */
Expand All @@ -28,17 +26,17 @@ public final class AdInspectorHelper implements OnAdInspectorClosedListener {
* Pointer to the C++ AdInspectorClosedListener object to invoke when the AdInspector has been
* closed.
*/
private long mNativeCallbackPtr;
private final long nativeCallbackPtr;

/** Constructor. */
AdInspectorHelper(long nativeCallbackPtr) {
mNativeCallbackPtr = nativeCallbackPtr;
this.nativeCallbackPtr = nativeCallbackPtr;
}

/** Method that the Android GMA SDK invokes when the AdInspector has been closed. */
@Override
public void onAdInspectorClosed(AdInspectorError error) {
adInspectorClosedCallback(mNativeCallbackPtr, error);
adInspectorClosedCallback(nativeCallbackPtr, error);
}

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

package com.google.firebase.gma.internal.cpp;

import androidx.annotation.Nullable;
import java.util.Calendar;
import java.util.Date;

Expand All @@ -35,6 +36,7 @@ public AdRequestHelper() {}
* @param day The day to use in creating the Date object
* @return A Date object with the appropriate date
*/
@Nullable
public Date createDate(int year, int month, int day) {
try {
Calendar cal = Calendar.getInstance();
Expand Down
Loading