| Index: samples/github/android/GithubMock/app/src/main/java/com/google/dartino/githubmock/GithubMockServer.java
|
| diff --git a/samples/github/android/GithubMock/app/src/main/java/com/google/fletch/githubmock/GithubMockServer.java b/samples/github/android/GithubMock/app/src/main/java/com/google/dartino/githubmock/GithubMockServer.java
|
| similarity index 80%
|
| rename from samples/github/android/GithubMock/app/src/main/java/com/google/fletch/githubmock/GithubMockServer.java
|
| rename to samples/github/android/GithubMock/app/src/main/java/com/google/dartino/githubmock/GithubMockServer.java
|
| index bf72285764ef5f44b9ec861ecd1af7c6dc246e89..5e128afe58bdfe0ed4d9db81a24d9a3b84da65df 100644
|
| --- a/samples/github/android/GithubMock/app/src/main/java/com/google/fletch/githubmock/GithubMockServer.java
|
| +++ b/samples/github/android/GithubMock/app/src/main/java/com/google/dartino/githubmock/GithubMockServer.java
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE.md file.
|
|
|
| -package com.google.fletch.githubmock;
|
| +package com.google.dartino.githubmock;
|
|
|
| import android.app.Service;
|
| import android.content.Intent;
|
| @@ -17,8 +17,8 @@ import java.io.ByteArrayOutputStream;
|
| import java.io.IOException;
|
| import java.io.InputStream;
|
|
|
| -import fletch.FletchApi;
|
| -import fletch.FletchServiceApi;
|
| +import dartino.DartinoApi;
|
| +import dartino.DartinoServiceApi;
|
|
|
| /**
|
| * Service running a mock github http server.
|
| @@ -29,12 +29,12 @@ public class GithubMockServer extends Service {
|
| public void onCreate() {
|
| super.onCreate();
|
| startThread();
|
| - startFletch();
|
| + startDartino();
|
| }
|
|
|
| @Override
|
| public void onDestroy() {
|
| - stopFletch();
|
| + stopDartino();
|
| stopThread();
|
| }
|
|
|
| @@ -89,12 +89,12 @@ public class GithubMockServer extends Service {
|
| looper.quit();
|
| }
|
|
|
| - private void startFletch() {
|
| - System.loadLibrary("fletch");
|
| - FletchApi.Setup();
|
| - FletchServiceApi.Setup();
|
| - FletchApi.AddDefaultSharedLibrary("libfletch.so");
|
| - FletchApi.RegisterPrintInterceptor(new PrintInterceptor());
|
| + private void startDartino() {
|
| + System.loadLibrary("dartino");
|
| + DartinoApi.Setup();
|
| + DartinoServiceApi.Setup();
|
| + DartinoApi.AddDefaultSharedLibrary("libdartino.so");
|
| + DartinoApi.RegisterPrintInterceptor(new PrintInterceptor());
|
| try (InputStream stream = getResources().openRawResource(R.raw.snapshot)) {
|
| final int bufferSize = 256;
|
| byte[] buffer = new byte[bufferSize];
|
| @@ -109,28 +109,28 @@ public class GithubMockServer extends Service {
|
| System.err.println("Failed to start Dart service from snapshot.");
|
| System.exit(1);
|
| }
|
| - fletch.GithubMockServer.Setup();
|
| - fletch.GithubMockServer.start(SERVER_PORT);
|
| + dartino.GithubMockServer.Setup();
|
| + dartino.GithubMockServer.start(SERVER_PORT);
|
| }
|
|
|
| - private void stopFletch() {
|
| - fletch.GithubMockServer.stop();
|
| - fletch.GithubMockServer.TearDown();
|
| - FletchServiceApi.TearDown();
|
| - FletchApi.TearDown();
|
| + private void stopDartino() {
|
| + dartino.GithubMockServer.stop();
|
| + dartino.GithubMockServer.TearDown();
|
| + DartinoServiceApi.TearDown();
|
| + DartinoApi.TearDown();
|
| }
|
|
|
| - private class PrintInterceptor extends FletchApi.PrintInterceptor {
|
| + private class PrintInterceptor extends DartinoApi.PrintInterceptor {
|
| @Override public void Out(String message) { Log.i(TAG, message); }
|
| @Override public void Error(String message) { Log.e(TAG, message); }
|
| - private static final String TAG = "Fletch";
|
| + private static final String TAG = "Dartino";
|
| }
|
|
|
| private static final String GITHUB_SAMPLE_PACKAGE =
|
| - "com.google.fletch.githubsample";
|
| + "com.google.dartino.githubsample";
|
|
|
| private static final String INTENT_PREFIX =
|
| - "com.google.fletch.githubmock";
|
| + "com.google.dartino.githubmock";
|
|
|
| private static final String ACTION_ENSURE_SERVER =
|
| INTENT_PREFIX + ".action.ensureServer";
|
|
|