66import android .graphics .Bitmap ;
77import android .graphics .Canvas ;
88import android .util .Base64 ;
9+ import android .util .Log ;
910import android .util .DisplayMetrics ;
1011import android .view .View ;
1112
3536@ RunWith (AndroidJUnit4 .class )
3637public class HelloCodenameOneInstrumentedTest {
3738
38- private static final int CHUNK_SIZE = 2000 ;
39+ private static final String LOG_TAG = "CN1SS" ;
40+ private static final int CHUNK_SIZE = 600 ;
3941 private static final String PREVIEW_CHANNEL = "PREVIEW" ;
4042 private static final int [] PREVIEW_JPEG_QUALITIES =
4143 new int [] {60 , 50 , 40 , 35 , 30 , 25 , 20 , 18 , 16 , 14 , 12 , 10 , 8 , 6 , 5 , 4 , 3 , 2 , 1 };
@@ -45,6 +47,7 @@ public class HelloCodenameOneInstrumentedTest {
4547
4648 private static void println (String s ) {
4749 System .out .println (s );
50+ Log .i (LOG_TAG , s );
4851 }
4952
5053 private static void settle (long millis ) {
@@ -250,15 +253,20 @@ private static void emitScreenshotChannel(byte[] bytes, String testName, String
250253 + String .format (Locale .US , "%06d" , pos )
251254 + ":"
252255 + chunk ;
253- System . out . println (line );
256+ emitLine (line );
254257 count ++;
255258 }
256259 println ("CN1SS:INFO:test=" + safeName + " chunks=" + count + " total_b64_len=" + b64 .length ());
257260 String endLine = prefix + ":END:" + safeName ;
258- System . out . println (endLine );
261+ emitLine (endLine );
259262 System .out .flush ();
260263 }
261264
265+ private static void emitLine (String line ) {
266+ System .out .println (line );
267+ Log .i (LOG_TAG , line );
268+ }
269+
262270 private static void prepareBrowserComponentContent (ActivityScenario <Activity > scenario ) throws InterruptedException {
263271 final CountDownLatch supportLatch = new CountDownLatch (1 );
264272 final boolean [] supported = new boolean [1 ];
0 commit comments