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

Unified Diff: platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java

Issue 1547923002: SampleApp: remove SkWindow::onPDFSaved, it does not work (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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: platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java
diff --git a/platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java b/platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java
index d9cd9f887d64bdce4ab1c48696d8b98c006ea615..6e306966edd8085190c86207f36ff8dd75764bc3 100644
--- a/platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java
+++ b/platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleActivity.java
@@ -23,7 +23,6 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.Toast;
import java.io.File;
@@ -209,7 +208,6 @@ public class SkiaSampleActivity extends Activity
private static final int SET_TITLE = 1;
private static final int SET_SLIDES = 2;
- private static final int TOAST_DOWNLOAD = 3;
private Handler mHandler = new Handler() {
@Override
@@ -222,10 +220,6 @@ public class SkiaSampleActivity extends Activity
case SET_SLIDES:
mSlideList.addAll((String[]) msg.obj);
break;
- case TOAST_DOWNLOAD:
- Toast.makeText(SkiaSampleActivity.this, (String) msg.obj,
- Toast.LENGTH_SHORT).show();
- break;
default:
break;
}
@@ -243,28 +237,6 @@ public class SkiaSampleActivity extends Activity
mHandler.obtainMessage(SET_SLIDES, slideList).sendToTarget();
}
- // Called by JNI
- public void addToDownloads(final String title, final String desc, final String path) {
- File file = new File(path);
- final long length = file.exists() ? file.length() : 0;
- if (length == 0) {
- String failed = getString(R.string.save_failed);
- mHandler.obtainMessage(TOAST_DOWNLOAD, failed).sendToTarget();
- return;
- }
- String toast = getString(R.string.file_saved).replace("%s", title);
- mHandler.obtainMessage(TOAST_DOWNLOAD, toast).sendToTarget();
- final DownloadManager manager =
- (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
- new Thread("Add PDF to downloads") {
- @Override
- public void run() {
- final String mimeType = "application/pdf";
- manager.addCompletedDownload(title, desc, true, mimeType, path, length, true);
- }
- }.start();
- }
-
private boolean setOpenGLContextSettings(boolean requestedOpenGLAPI, int requestedSampleCount) {
if (mSampleView != null &&
mSampleView.getMSAASampleCount() == requestedSampleCount &&
« no previous file with comments | « include/views/SkWindow.h ('k') | platform_tools/android/apps/sample_app/src/main/java/com/skia/SkiaSampleView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698