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

Unified Diff: platform_tools/android/app/src/com/skia/SkiaSampleActivity.java

Issue 1136753003: Add android_launch_app script to allow command line options to be passed to the sampleApp when star… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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: platform_tools/android/app/src/com/skia/SkiaSampleActivity.java
diff --git a/platform_tools/android/app/src/com/skia/SkiaSampleActivity.java b/platform_tools/android/app/src/com/skia/SkiaSampleActivity.java
index 090d6ad14cf5946743aed0352b5bc798c449db24..d9cd9f887d64bdce4ab1c48696d8b98c006ea615 100644
--- a/platform_tools/android/app/src/com/skia/SkiaSampleActivity.java
+++ b/platform_tools/android/app/src/com/skia/SkiaSampleActivity.java
@@ -10,6 +10,7 @@ package com.skia;
import android.app.ActionBar;
import android.app.Activity;
import android.app.DownloadManager;
+import android.content.Intent;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
@@ -65,7 +66,16 @@ public class SkiaSampleActivity extends Activity
mSampleView.terminate();
}
- mSampleView = new SkiaSampleView(this, useOpenGLAPI, msaaSampleCount);
+ // intent get intent extras if triggered from the command line
+ Intent intent = this.getIntent();
+ String flags = intent.getStringExtra("cmdLineFlags");
+
+ if (flags == null || flags.isEmpty()) {
+ flags = "--pictureDir /data/local/tmp/skia_skp ";
+ flags += "--resourcePath /data/local/tmp/skia_resources ";
+ }
+
+ mSampleView = new SkiaSampleView(this, flags, useOpenGLAPI, msaaSampleCount);
LinearLayout holder = (LinearLayout) findViewById(R.id.holder);
holder.addView(mSampleView, new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,

Powered by Google App Engine
This is Rietveld 408576698