From 1d36d0fc7f776016c0282ae7ad8e01af81de6bf6 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Wed, 3 Aug 2011 16:54:23 -0700 Subject: TileBenchmark label addition bug:5062896 Now uses previously unused methods, and has better labelling. Change-Id: Icc6ec7d1ac915b594c26854aea31710e3f23633c --- tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java | 6 ++++-- tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/TileBenchmark') diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java b/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java index aad138c..9ea90f8 100644 --- a/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java +++ b/tests/TileBenchmark/src/com/test/tilebenchmark/PlaybackGraphs.java @@ -236,8 +236,10 @@ public class PlaybackGraphs { int yPos = LABELOFFSET; canvas.drawText(label, xPos, yPos, whiteLabels); for (int statIndex = 0; statIndex < Stats.length; statIndex++) { - label = resources.getString(R.string.format_stat, - mStats[metricIndex][statIndex]); + String statLabel = resources.getString( + Stats[statIndex].getLabelId()).substring(0,3); + label = statLabel + " " + resources.getString( + R.string.format_stat, mStats[metricIndex][statIndex]); yPos = LABELOFFSET + (1 + statIndex) * PlaybackView.TILE_SCALE / 2; canvas.drawText(label, xPos, yPos, whiteLabels); diff --git a/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java b/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java index a63a2f0..82a7e82 100644 --- a/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java +++ b/tests/TileBenchmark/src/com/test/tilebenchmark/ProfileActivity.java @@ -223,7 +223,7 @@ public class ProfileActivity extends Activity { mMovementSpinner = (Spinner) findViewById(R.id.movement); mUrl = (EditText) findViewById(R.id.url); mWeb = (ProfiledWebView) findViewById(R.id.web); - mCallback = new ProfileCallback() { + setCallback(new ProfileCallback() { @SuppressWarnings("unchecked") @Override public void profileCallback(RunData data) { @@ -232,7 +232,7 @@ public class ProfileActivity extends Activity { mCaptureButton.setChecked(false); setTestingState(TestingState.STOP_TESTING); } - }; + }); // Inspect button (opens PlaybackActivity) mInspectButton.setOnClickListener(new OnClickListener() { -- cgit v1.1