Skip to content

Commit 8bc535a

Browse files
Fixes
1 parent 113f889 commit 8bc535a

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

GoogleSignIn/Impl/GoogleSignInImpl.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void OnResult(int result, AndroidJavaObject acct)
142142
Debug.Log("googlesignin.IListener : " + acct.Call<string>("toString"));
143143
Debug.Log("ID : " + acct.Call<string>("getId"));
144144
}
145-
else Debug.LogError("Should not get null account");
145+
else Debug.LogWarning("Should not get null account");
146146
}
147147
}
148148

@@ -335,11 +335,10 @@ public static class Ext
335335
public static AndroidJavaObject ToAndroidJavaObject(in this HandleRef self) => self.Handle.ToAndroidJavaObject();
336336
public static AndroidJavaObject ToAndroidJavaObject(in this IntPtr intPtr)
337337
{
338-
if(intPtr == IntPtr.Zero)
338+
if (intPtr == IntPtr.Zero)
339339
return null;
340340

341-
try
342-
{
341+
try {
343342
#if UNITY_2022_2_OR_NEWER
344343
return new AndroidJavaObject(intPtr);
345344
#else
@@ -349,13 +348,10 @@ public static AndroidJavaObject ToAndroidJavaObject(in this IntPtr intPtr)
349348
Debug.LogFormat("constructorInfo : {0}",constructorInfo);
350349
return constructorInfo.Invoke(new object[] { intPtr }) as AndroidJavaObject;
351350
#endif
351+
} catch (Exception e) {
352+
Debug.LogError("Exception creating AndroidJavaObject: " + e);
353+
return null;
352354
}
353-
catch(Exception e)
354-
{
355-
Debug.LogException(e);
356-
}
357-
358-
return null;
359355
}
360356
}
361357
}

0 commit comments

Comments
 (0)