Merge "Modification of testSetHorizontalSpacing()"
diff --git a/apps/CtsVerifier/jni/audioquality/LinearityTest.cpp b/apps/CtsVerifier/jni/audioquality/LinearityTest.cpp
index f8cf9ac..2df7603 100644
--- a/apps/CtsVerifier/jni/audioquality/LinearityTest.cpp
+++ b/apps/CtsVerifier/jni/audioquality/LinearityTest.cpp
@@ -150,6 +150,8 @@
for (int sig = 0; sig < numSignals; ++sig) {
if (!peakLevels(pcms[sig], sampleCounts[sig],
sampleRate, peakAverage + sig, peakRms + sig)) {
+ delete []peakAverage;
+ delete []peakRms;
return -6; // failure because a signal is too short.
}
}
@@ -168,5 +170,7 @@
maxDev = dev;
}
*maxDeviation = maxDev;
+ delete []peakAverage;
+ delete []peakRms;
return 1;
}
diff --git a/tests/core/libcore/src/Dummy.java b/tests/core/libcore/src/Dummy.java
index cfe0c81..64b67de 100644
--- a/tests/core/libcore/src/Dummy.java
+++ b/tests/core/libcore/src/Dummy.java
@@ -17,7 +17,7 @@
/**
* We really just want the core-tests classes from the static java
* library, but the build system currently needs at least one input
- * file, not just becuase its a sanity check, but because the static
+ * file, not just because its a sanity check, but because the static
* class files and resources are included in the output of the local
* java compilation.
*/
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
index 6849c69..d2599e4 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
@@ -449,7 +449,7 @@
method = "getConstantState",
args = {}
)
- @ToBeFixed(bug = "", explanation = "can not assert the inner fields, becuase the class" +
+ @ToBeFixed(bug = "", explanation = "can not assert the inner fields, because the class" +
" GradientState is package protected.")
public void testGetConstantState() {
GradientDrawable gradientDrawable = new GradientDrawable();
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java
index 32dc5ca..c3a0b45 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java
@@ -431,7 +431,7 @@
method = "getConstantState",
args = {}
)
- @ToBeFixed(bug = "", explanation = "can not assert the inner fields, becuase the class" +
+ @ToBeFixed(bug = "", explanation = "can not assert the inner fields, because the class" +
" InsetState is package protected.")
public void testGetConstantState() {
Drawable d = mContext.getResources().getDrawable(R.drawable.pass);
diff --git a/tests/tests/text/src/android/text/format/cts/TimeTest.java b/tests/tests/text/src/android/text/format/cts/TimeTest.java
index 0fb3f2a..50c51da 100644
--- a/tests/tests/text/src/android/text/format/cts/TimeTest.java
+++ b/tests/tests/text/src/android/text/format/cts/TimeTest.java
@@ -627,10 +627,10 @@
)
public void testSetToNow0() throws Exception {
Time t = new Time(Time.TIMEZONE_UTC);
- t.setToNow();
long currentTime = System.currentTimeMillis();
+ t.setToNow();
long time = t.toMillis(false);
- assertEquals(currentTime, time, 500);
+ assertEquals(currentTime, time, 999);
}
@TestTargetNew(
diff --git a/tests/tests/view/src/android/view/cts/OrientationEventListenerTest.java b/tests/tests/view/src/android/view/cts/OrientationEventListenerTest.java
index 570ef88..130f01b 100644
--- a/tests/tests/view/src/android/view/cts/OrientationEventListenerTest.java
+++ b/tests/tests/view/src/android/view/cts/OrientationEventListenerTest.java
@@ -56,7 +56,7 @@
level = TestLevel.SUFFICIENT,
notes = "Test {@link OrientationEventListener#enable()}. "
+ "This method is simply called to make sure that no exception is thrown. "
- + "The registeration of the listener can not be tested becuase there is "
+ + "The registration of the listener can not be tested because there is "
+ "no way to simulate sensor events",
method = "enable",
args = {}
@@ -65,7 +65,7 @@
level = TestLevel.SUFFICIENT,
notes = "Test {@link OrientationEventListener#disable()}. "
+ "This method is simply called to make sure that no exception is thrown. "
- + "The registeration of the listener can not be tested becuase there is "
+ + "The registration of the listener can not be tested because there is "
+ "no way to simulate sensor events",
method = "disable",
args = {}
diff --git a/tests/tests/view/src/android/view/cts/OrientationListenerTest.java b/tests/tests/view/src/android/view/cts/OrientationListenerTest.java
index f21519c..b3437cd 100644
--- a/tests/tests/view/src/android/view/cts/OrientationListenerTest.java
+++ b/tests/tests/view/src/android/view/cts/OrientationListenerTest.java
@@ -65,7 +65,7 @@
level = TestLevel.COMPLETE,
notes = "Test {@link OrientationListener#enable()}. "
+ "This method is simply called to make sure that no exception is thrown. "
- + "The registeration of the listener can not be tested becuase there is no way "
+ + "The registration of the listener can not be tested because there is no way "
+ "to simulate sensor events on the emulator",
method = "enable",
args = {}
@@ -74,14 +74,14 @@
level = TestLevel.COMPLETE,
notes = "Test {@link OrientationListener#disable()}. "
+ "This method is simply called to make sure that no exception is thrown. "
- + "The registeration of the listener can not be tested becuase there is no way "
+ + "The registration of the listener can not be tested because there is no way "
+ "to simulate sensor events on the emulator",
method = "disable",
args = {}
)
})
@ToBeFixed(explanation = "Can not simulate sensor events on the emulator.")
- public void testRegisterationOfOrientationListener() {
+ public void testRegistrationOfOrientationListener() {
// these methods are called to assure that no exception is thrown
MockOrientationListener listener = new MockOrientationListener(mContext);
listener.disable();
diff --git a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
index dae417f..bd688fe 100644
--- a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
+++ b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
@@ -650,6 +650,7 @@
FileReader reader = new FileReader(file);
char[] charContents = new char[(int) file.length()];
reader.read(charContents);
+ reader.close();
String contents = new String(charContents);
if (contents.equals(content)) {
// System.out.println("skipping identical: "