Skip to content

Commit

Permalink
chore(android): remove synchronous stream deprecation warnings
Browse files Browse the repository at this point in the history
Fixes TIMOB-28441
  • Loading branch information
jquick-axway authored and sgtcoolguy committed May 24, 2021
1 parent 5ac477c commit 76f9993
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2009-2021 by Axway, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
Expand All @@ -10,14 +10,11 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollFunction;
import org.appcelerator.kroll.KrollObject;
import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.TiApplication;
import org.appcelerator.titanium.io.TiStream;

import ti.modules.titanium.BufferProxy;

public class TiStreamHelper
Expand Down Expand Up @@ -82,11 +79,6 @@ public static int readTiStream(final String TAG, final KrollObject krollObject,
return 0;
}

String warningMessage
= "Synchronous invocation of read will cause performance issues under the main thread."
+ " This will no longer be supported in SDK 10.0.0."
+ " Please invoke with a final callback function to receive the result.";
Log.w(TAG, warningMessage);
final BufferProxy finalBufferProxy = bufferProxy;
final int finalOffset = offset;
final int finalLength = length;
Expand Down Expand Up @@ -183,11 +175,6 @@ public static int writeTiStream(final String TAG, final KrollObject krollObject,
return 0;
}

String warningMessage
= "Synchronous invocation of write will cause performance issues under the main thread."
+ " This will no longer be supported in SDK 10.0.0."
+ " Please invoke with a final callback function to receive the result.";
Log.w(TAG, warningMessage);
final BufferProxy finalBufferProxy = bufferProxy;
final int finalOffset = offset;
final int finalLength = length;
Expand Down

0 comments on commit 76f9993

Please sign in to comment.