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

Unified Diff: samples/android_sample/src/com/google/dartndk/DummyActivity.java

Issue 12021025: Merge the openglui samples into one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix emulator sample build Created 7 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/android_sample/src/com/google/dartndk/DummyActivity.java
diff --git a/samples/android_sample/src/com/google/dartndk/DummyActivity.java b/samples/android_sample/src/com/google/dartndk/DummyActivity.java
deleted file mode 100644
index c483569ef8da32f17865207ac89e7b18475d874e..0000000000000000000000000000000000000000
--- a/samples/android_sample/src/com/google/dartndk/DummyActivity.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.google.dartndk;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import android.app.NativeActivity;
-import android.content.res.AssetManager;
-import android.os.Bundle;
-import android.util.Log;
-
-public class DummyActivity extends NativeActivity {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- try {
- File localDir = getApplicationContext().getDir("dart", 0);
- String fileSystemPath = localDir.toString();
- String assetPath = "dart";
- AssetManager assetManager = getAssets();
- String[] files = assetManager.list(assetPath);
- byte[] buffer = new byte[1024];
- int read;
- for (String filename : files) {
- String dest = fileSystemPath + "/" + filename;
- Log.w("Dart", "Copying " + dest);
- InputStream in = assetManager.open(assetPath + "/" + filename);
- OutputStream out = new FileOutputStream(dest);
- while((read = in.read(buffer)) != -1){
- out.write(buffer, 0, read);
- }
- in.close();
- out.flush();
- ((FileOutputStream)out).getFD().sync();
- out.close();
- }
- } catch (IOException ex) {
- }
- }
-}
« no previous file with comments | « samples/android_sample/res/values/styles.xml ('k') | samples/mobile_emulator_sample/mobile_emulator_sample.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698