Skip to content

Commit

Permalink
Release 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHanAtUnity committed Jan 28, 2020
1 parent fb9148a commit a91c1a3
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 87 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.unity3d.ads.example"
minSdkVersion 14
targetSdkVersion 26
versionCode = 3400
versionName = "3.4.0"
versionCode = 3420
versionName = "3.4.2"
}

flavorDimensions "arEnabled"
Expand Down
6 changes: 3 additions & 3 deletions unity-ads/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ext {
siteUrl = 'https://github.com/Unity-Technologies/unity-ads-android'
gitUrl = 'https://github.com/Unity-Technologies/unity-ads-android.git'

libraryVersion = '3.4.0'
libraryVersion = '3.4.2'

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

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

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private UnityBanners() {

private void _loadBanner(Activity activity, String placementId) {
if (_currentBannerWrapper == null) {
BannerAdRefreshView bannerAdRefreshView = new BannerAdRefreshView(activity, placementId, UnityBannerSize.getDynamicSize(activity));
BannerAdRefreshView bannerAdRefreshView = new BannerAdRefreshView(activity, placementId, new UnityBannerSize(320, 50));
final BannerWrapper bannerWrapper = new BannerWrapper(activity, bannerAdRefreshView);
bannerWrapper.setBannerPosition(_currentBannerPosition);
_currentBannerWrapper = bannerWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public enum CacheError {
CACHE_DIRECTORY_NULL,
CACHE_DIRECTORY_TYPE_NULL,
CACHE_DIRECTORY_EXISTS,
CACHE_DIRECTORY_DOESNT_EXIST
CACHE_DIRECTORY_DOESNT_EXIST,
UNKNOWN_ERROR
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public void onRequestProgress(String url, long bytes, long total) {
_active = false;
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.CACHE, CacheEvent.DOWNLOAD_ERROR, CacheError.NETWORK_ERROR, source, e.getMessage());
}
catch (Exception e) {
DeviceLog.exception("Unknown error", e);
_active = false;
WebViewApp.getCurrentApp().sendEvent(WebViewEventCategory.CACHE, CacheEvent.DOWNLOAD_ERROR, CacheError.UNKNOWN_ERROR, source, e.getMessage());
}
finally {
_currentRequest = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected String buildQueryString () {
return queryString;
}

protected void makeRequest () throws IOException, JSONException, IllegalStateException, NetworkIOException, IllegalArgumentException {
protected void makeRequest () throws Exception {
if (_url == null) {
throw new MalformedURLException("Base URL is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void setProgressListener(IWebRequestProgressListener listener) {
_progressListener = listener;
}

public long makeStreamRequest(OutputStream outputStream) throws NetworkIOException, IOException, IllegalStateException {
public long makeStreamRequest(OutputStream outputStream) throws Exception {
HttpURLConnection connection = getHttpUrlConnectionWithHeaders();
connection.setDoInput(true);

Expand Down Expand Up @@ -192,6 +192,9 @@ public long makeStreamRequest(OutputStream outputStream) throws NetworkIOExcepti
catch (IOException e) {
throw new NetworkIOException("Network exception: " + e.getMessage());
}
catch (Exception e) {
throw new Exception("Unknown Exception: " + e.getMessage());
}

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

public String makeRequest () throws NetworkIOException, IOException, IllegalStateException, IllegalArgumentException {
public String makeRequest () throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
makeStreamRequest(baos);
return baos.toString("UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void makeRequest (String url, String type, Map<String, List<String>> hea
String response;
try {
response = _currentRequest.makeRequest();
} catch (IOException | NetworkIOException | IllegalStateException | IllegalArgumentException e) {
} catch (Exception e) {
DeviceLog.exception("Error completing request", e);
onFailed(e.getClass().getName() + ": " + e.getMessage());
return;
Expand Down

0 comments on commit a91c1a3

Please sign in to comment.