Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: samples/todomvc/android/TodoMVC/app/src/main/java/com/google/fletch/todomvc/TodoMVC.java

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/todomvc/android/TodoMVC/app/src/main/java/com/google/fletch/todomvc/TodoMVC.java
diff --git a/samples/todomvc/android/TodoMVC/app/src/main/java/com/google/fletch/todomvc/TodoMVC.java b/samples/todomvc/android/TodoMVC/app/src/main/java/com/google/fletch/todomvc/TodoMVC.java
deleted file mode 100644
index 2c71c9deed7472f2dbda8fceedef3c0fff270a5b..0000000000000000000000000000000000000000
--- a/samples/todomvc/android/TodoMVC/app/src/main/java/com/google/fletch/todomvc/TodoMVC.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// 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.todomvc;
-
-import android.app.Application;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import fletch.FletchApi;
-import fletch.FletchServiceApi;
-import fletch.TodoMVCService;
-
-public class TodoMVC extends Application {
-
- static boolean attachDebugger = false;
- static int debugPortNumber = 8123;
-
- private void startDartServiceThread() {
- if (attachDebugger) {
- System.out.println("Waiting for debugger connection on port " + debugPortNumber);
- Thread dartThread = new Thread(new DartDebugger(debugPortNumber));
- dartThread.start();
- return;
- }
- // Load snapshot and start dart code on a separate thread.
- InputStream snapshotStream = getResources().openRawResource(R.raw.todomvc_snapshot);
- try {
- int available = snapshotStream.available();
- byte[] snapshot = new byte[available];
- snapshotStream.read(snapshot);
- Thread dartThread = new Thread(new DartRunner(snapshot));
- dartThread.start();
- } catch (IOException e) {
- System.err.println("Failed to start Dart service from snapshot.");
- System.exit(1);
- }
- }
-
- private void startFletchService() {
- // Load the library containing the fletch runtime
- // as well as the jni service code.
- System.loadLibrary("fletch");
-
- // Setup fletch and the service API.
- FletchApi.Setup();
- FletchServiceApi.Setup();
-
- // Tell fletch which library to use for foreign function lookups.
- FletchApi.AddDefaultSharedLibrary("libfletch.so");
-
- startDartServiceThread();
-
- // Setup the service.
- TodoMVCService.Setup();
- }
-
- @Override
- public void onCreate() {
- startFletchService();
- }
-}

Powered by Google App Engine
This is Rietveld 408576698