Skip to content

Commit a91c1a3

Browse files
Release 3.4.2
1 parent fb9148a commit a91c1a3

File tree

9 files changed

+20
-87
lines changed

9 files changed

+20
-87
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.unity3d.ads.example"
99
minSdkVersion 14
1010
targetSdkVersion 26
11-
versionCode = 3400
12-
versionName = "3.4.0"
11+
versionCode = 3420
12+
versionName = "3.4.2"
1313
}
1414

1515
flavorDimensions "arEnabled"

unity-ads/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ext {
1616
siteUrl = 'https://github.com/Unity-Technologies/unity-ads-android'
1717
gitUrl = 'https://github.com/Unity-Technologies/unity-ads-android.git'
1818

19-
libraryVersion = '3.4.0'
19+
libraryVersion = '3.4.2'
2020

2121
developerId = 'sbankhead'
2222
developerName = 'Steven Bankhead'
@@ -50,8 +50,8 @@ android {
5050
All SDK with version numbers with last two digits >= 50 will be treated
5151
as China SDK for filtering in the backend.
5252
*/
53-
versionCode = 3400
54-
versionName = "3.4.0"
53+
versionCode = 3420
54+
versionName = "3.4.2"
5555

5656
setProperty("archivesBaseName", "unity-ads")
5757

unity-ads/src/androidTest/java/com/unity3d/ads/properties/AdsPropertiesTests.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

unity-ads/src/main/java/com/unity3d/services/banners/UnityBanners.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private UnityBanners() {
9090

9191
private void _loadBanner(Activity activity, String placementId) {
9292
if (_currentBannerWrapper == null) {
93-
BannerAdRefreshView bannerAdRefreshView = new BannerAdRefreshView(activity, placementId, UnityBannerSize.getDynamicSize(activity));
93+
BannerAdRefreshView bannerAdRefreshView = new BannerAdRefreshView(activity, placementId, new UnityBannerSize(320, 50));
9494
final BannerWrapper bannerWrapper = new BannerWrapper(activity, bannerAdRefreshView);
9595
bannerWrapper.setBannerPosition(_currentBannerPosition);
9696
_currentBannerWrapper = bannerWrapper;

unity-ads/src/main/java/com/unity3d/services/core/cache/CacheError.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ public enum CacheError {
1616
CACHE_DIRECTORY_NULL,
1717
CACHE_DIRECTORY_TYPE_NULL,
1818
CACHE_DIRECTORY_EXISTS,
19-
CACHE_DIRECTORY_DOESNT_EXIST
19+
CACHE_DIRECTORY_DOESNT_EXIST,
20+
UNKNOWN_ERROR
2021
}

unity-ads/src/main/java/com/unity3d/services/core/cache/CacheThreadHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ public void onRequestProgress(String url, long bytes, long total) {
164164
_active = false;
165165
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.CACHE, CacheEvent.DOWNLOAD_ERROR, CacheError.NETWORK_ERROR, source, e.getMessage());
166166
}
167+
catch (Exception e) {
168+
DeviceLog.exception("Unknown error", e);
169+
_active = false;
170+
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.CACHE, CacheEvent.DOWNLOAD_ERROR, CacheError.UNKNOWN_ERROR, source, e.getMessage());
171+
}
167172
finally {
168173
_currentRequest = null;
169174
try {

unity-ads/src/main/java/com/unity3d/services/core/configuration/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected String buildQueryString () {
117117
return queryString;
118118
}
119119

120-
protected void makeRequest () throws IOException, JSONException, IllegalStateException, NetworkIOException, IllegalArgumentException {
120+
protected void makeRequest () throws Exception {
121121
if (_url == null) {
122122
throw new MalformedURLException("Base URL is null");
123123
}

unity-ads/src/main/java/com/unity3d/services/core/request/WebRequest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void setProgressListener(IWebRequestProgressListener listener) {
117117
_progressListener = listener;
118118
}
119119

120-
public long makeStreamRequest(OutputStream outputStream) throws NetworkIOException, IOException, IllegalStateException {
120+
public long makeStreamRequest(OutputStream outputStream) throws Exception {
121121
HttpURLConnection connection = getHttpUrlConnectionWithHeaders();
122122
connection.setDoInput(true);
123123

@@ -192,6 +192,9 @@ public long makeStreamRequest(OutputStream outputStream) throws NetworkIOExcepti
192192
catch (IOException e) {
193193
throw new NetworkIOException("Network exception: " + e.getMessage());
194194
}
195+
catch (Exception e) {
196+
throw new Exception("Unknown Exception: " + e.getMessage());
197+
}
195198

196199
if (bytesRead > 0) {
197200
outputStream.write(readTarget, 0, bytesRead);
@@ -209,7 +212,7 @@ public long makeStreamRequest(OutputStream outputStream) throws NetworkIOExcepti
209212
return total;
210213
}
211214

212-
public String makeRequest () throws NetworkIOException, IOException, IllegalStateException, IllegalArgumentException {
215+
public String makeRequest () throws Exception {
213216
ByteArrayOutputStream baos = new ByteArrayOutputStream();
214217
makeStreamRequest(baos);
215218
return baos.toString("UTF-8");

unity-ads/src/main/java/com/unity3d/services/core/request/WebRequestRunnable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void makeRequest (String url, String type, Map<String, List<String>> hea
6666
String response;
6767
try {
6868
response = _currentRequest.makeRequest();
69-
} catch (IOException | NetworkIOException | IllegalStateException | IllegalArgumentException e) {
69+
} catch (Exception e) {
7070
DeviceLog.exception("Error completing request", e);
7171
onFailed(e.getClass().getName() + ": " + e.getMessage());
7272
return;

0 commit comments

Comments
 (0)