summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2014-10-14 13:41:00 -0700
committerAurimas Liutikas <aurimas@google.com>2014-10-14 20:41:38 +0000
commite8941c4b0003ce7f6e6c8ceaf9c322177e74548e (patch)
treee0451667f3660b2a301404db90c0808ae4591f80
parent0716f6ef4261182a237a82445177de6a380930a6 (diff)
downloadchromium_src-e8941c4b0003ce7f6e6c8ceaf9c322177e74548e.zip
chromium_src-e8941c4b0003ce7f6e6c8ceaf9c322177e74548e.tar.gz
chromium_src-e8941c4b0003ce7f6e6c8ceaf9c322177e74548e.tar.bz2
Fix Java Checkstyle issues.
After this change we are down to: - 3 redundant import warnings (due to JNI generator) - 69 JavaDoc warnings BUG=318404 R=agl@chromium.org, blundell@chromium.org, boliu@chromium.org, lambroslambrou@chromium.org, nyquist@chromium.org, qinmin@chromium.org, rmcilroy@chromium.org, tedchoc@chromium.org TBR=yfriedman@chromium.org Review URL: https://codereview.chromium.org/652603004 Cr-Commit-Position: refs/heads/master@{#299540}
-rw-r--r--android_webview/java/generated_src/org/chromium/base/library_loader/NativeLibraries.java8
-rw-r--r--android_webview/test/shell/src/org/chromium/android_webview/test/TestContentProvider.java14
-rw-r--r--base/android/java/src/org/chromium/base/ApplicationStatus.java2
-rw-r--r--base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java4
-rw-r--r--base/android/java/src/org/chromium/base/library_loader/Linker.java18
-rw-r--r--base/android/java/templates/NativeLibraries.template14
-rw-r--r--base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java4
-rw-r--r--build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java8
-rw-r--r--components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java9
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java2
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java51
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java16
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java96
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java30
-rw-r--r--content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java16
-rw-r--r--content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java128
-rw-r--r--media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java8
-rw-r--r--media/base/android/java/src/org/chromium/media/MediaCodecBridge.java44
-rw-r--r--media/base/android/java/src/org/chromium/media/MediaDrmBridge.java14
-rw-r--r--media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java12
-rw-r--r--net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java2
-rw-r--r--remoting/android/cast/src/org/chromium/chromoting/CastExtensionHandler.java2
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/DesktopView.java2
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/DummyActivityLifecycleListener.java18
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java8
-rw-r--r--sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java2
-rw-r--r--tools/android/checkstyle/chromium-style-5.0.xml3
-rw-r--r--tools/android/memconsumer/java/src/org/chromium/memconsumer/MemConsumer.java2
-rw-r--r--ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java2
-rw-r--r--ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java2
30 files changed, 368 insertions, 173 deletions
diff --git a/android_webview/java/generated_src/org/chromium/base/library_loader/NativeLibraries.java b/android_webview/java/generated_src/org/chromium/base/library_loader/NativeLibraries.java
index 63eb286..6e360e29 100644
--- a/android_webview/java/generated_src/org/chromium/base/library_loader/NativeLibraries.java
+++ b/android_webview/java/generated_src/org/chromium/base/library_loader/NativeLibraries.java
@@ -10,15 +10,15 @@ package org.chromium.base.library_loader;
public class NativeLibraries {
// Set to true to use the chromium linker. Only useful to save memory
// on multi-process content-based projects. Always disabled for the Android Webview.
- public static boolean USE_LINKER = false;
+ public static boolean sUseLinker = false;
// Set to true to directly load the library from the zip file using the
// chromium linker. Always disabled for Android Webview.
- public static boolean USE_LIBRARY_IN_ZIP_FILE = false;
+ public static boolean sUseLibraryInZipFile = false;
// Set to true to enable chromium linker test support. NEVER enable this for the
// Android webview.
- public static boolean ENABLE_LINKER_TESTS = false;
+ public static boolean sEnableLinkerTests = false;
// This is the list of native libraries to load. In the normal chromium build, this would be
// automatically generated.
@@ -28,5 +28,5 @@ public class NativeLibraries {
// TODO(aberent) The Webview native library currently returns an empty string; change this
// to a string generated at compile time, and incorporate that string in a generated
// replacement for this file.
- static String VERSION_NUMBER = "";
+ static String sVersionNumber = "";
}
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/TestContentProvider.java b/android_webview/test/shell/src/org/chromium/android_webview/test/TestContentProvider.java
index 5b33684..83a1b3d 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/test/TestContentProvider.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/test/TestContentProvider.java
@@ -196,14 +196,14 @@ public class TestContentProvider extends ContentProvider {
// 1x1 black dot png image.
private static final byte[] IMAGE = {
- (byte)0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00,
+ (byte) 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00,
0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x7e, (byte)0x9b, 0x55, 0x00,
- 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, (byte)0xae, (byte)0xce,
- 0x1c, (byte)0xe9, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x44, 0x41, 0x54, 0x08,
- 0x1d, 0x01, 0x02, 0x00, (byte)0xfd, (byte)0xff, 0x00, 0x00, 0x00, 0x02,
- 0x00, 0x01, (byte)0xcd, (byte)0xe3, (byte)0xd1, 0x2b, 0x00, 0x00, 0x00,
- 0x00, 0x49, 0x45, 0x4e, 0x44, (byte)0xae, 0x42, 0x60, (byte)0x82
+ 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x7e, (byte) 0x9b, 0x55, 0x00,
+ 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, (byte) 0xae, (byte) 0xce,
+ 0x1c, (byte) 0xe9, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x44, 0x41, 0x54, 0x08,
+ 0x1d, 0x01, 0x02, 0x00, (byte) 0xfd, (byte) 0xff, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x01, (byte) 0xcd, (byte) 0xe3, (byte) 0xd1, 0x2b, 0x00, 0x00, 0x00,
+ 0x00, 0x49, 0x45, 0x4e, 0x44, (byte) 0xae, 0x42, 0x60, (byte) 0x82
};
private static AssetFileDescriptor createImage() {
diff --git a/base/android/java/src/org/chromium/base/ApplicationStatus.java b/base/android/java/src/org/chromium/base/ApplicationStatus.java
index 53134b5..c706dfd 100644
--- a/base/android/java/src/org/chromium/base/ApplicationStatus.java
+++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java
@@ -396,7 +396,7 @@ public class ApplicationStatus {
*/
@CalledByNative
private static void registerThreadSafeNativeApplicationStateListener() {
- ThreadUtils.runOnUiThread(new Runnable () {
+ ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (sNativeApplicationStateListener != null) return;
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
index 5a64cab..86bca43 100644
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
@@ -246,9 +246,9 @@ public class LibraryLoader {
Log.i(TAG, String.format(
"Expected native library version number \"%s\"," +
"actual native library version number \"%s\"",
- NativeLibraries.VERSION_NUMBER,
+ NativeLibraries.sVersionNumber,
nativeGetVersionNumber()));
- if (!NativeLibraries.VERSION_NUMBER.equals(nativeGetVersionNumber())) {
+ if (!NativeLibraries.sVersionNumber.equals(nativeGetVersionNumber())) {
throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_WRONG_VERSION);
}
}
diff --git a/base/android/java/src/org/chromium/base/library_loader/Linker.java b/base/android/java/src/org/chromium/base/library_loader/Linker.java
index 93ed32e..cc30af4 100644
--- a/base/android/java/src/org/chromium/base/library_loader/Linker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/Linker.java
@@ -224,7 +224,7 @@ public class Linker {
if (!sInitialized) {
sRelroSharingSupported = false;
- if (NativeLibraries.USE_LINKER) {
+ if (NativeLibraries.sUseLinker) {
if (DEBUG) Log.i(TAG, "Loading lib" + TAG + ".so");
try {
System.loadLibrary(TAG);
@@ -279,7 +279,7 @@ public class Linker {
/**
* A public interface used to run runtime linker tests after loading
* libraries. Should only be used to implement the linker unit tests,
- * which is controlled by the value of NativeLibraries.ENABLE_LINKER_TESTS
+ * which is controlled by the value of NativeLibraries.sEnableLinkerTests
* configured at build time.
*/
public interface TestRunner {
@@ -303,7 +303,7 @@ public class Linker {
public static void setTestRunnerClassName(String testRunnerClassName) {
if (DEBUG) Log.i(TAG, "setTestRunnerByClassName(" + testRunnerClassName + ") called");
- if (!NativeLibraries.ENABLE_LINKER_TESTS) {
+ if (!NativeLibraries.sEnableLinkerTests) {
// Ignore this in production code to prevent malvolent runtime injection.
return;
}
@@ -335,7 +335,7 @@ public class Linker {
public static void setMemoryDeviceConfig(int memoryDeviceConfig) {
if (DEBUG) Log.i(TAG, "setMemoryDeviceConfig(" + memoryDeviceConfig + ") called");
// Sanity check. This method should only be called during tests.
- assert NativeLibraries.ENABLE_LINKER_TESTS;
+ assert NativeLibraries.sEnableLinkerTests;
synchronized (Linker.class) {
assert sMemoryDeviceConfig == MEMORY_DEVICE_CONFIG_INIT;
assert memoryDeviceConfig == MEMORY_DEVICE_CONFIG_LOW ||
@@ -358,8 +358,8 @@ public class Linker {
public static boolean isUsed() {
// Only GYP targets that are APKs and have the 'use_chromium_linker' variable
// defined as 1 will use this linker. For all others (the default), the
- // auto-generated NativeLibraries.USE_LINKER variable will be false.
- if (!NativeLibraries.USE_LINKER)
+ // auto-generated NativeLibraries.sUseLinker variable will be false.
+ if (!NativeLibraries.sUseLinker)
return false;
synchronized (Linker.class) {
@@ -399,7 +399,7 @@ public class Linker {
* the library directly from the zip file.
*/
public static boolean isInZipFile() {
- return NativeLibraries.USE_LIBRARY_IN_ZIP_FILE;
+ return NativeLibraries.sUseLibraryInZipFile;
}
/**
@@ -468,7 +468,7 @@ public class Linker {
}
}
- if (NativeLibraries.ENABLE_LINKER_TESTS && sTestRunnerClassName != null) {
+ if (NativeLibraries.sEnableLinkerTests && sTestRunnerClassName != null) {
// The TestRunner implementation must be instantiated _after_
// all libraries are loaded to ensure that its native methods
// are properly registered.
@@ -793,7 +793,7 @@ public class Linker {
// RENDERER_LIBRARY_ADDRESS: <library-name> <address>
// Where <library-name> is the library name, and <address> is the hexadecimal load
// address.
- if (NativeLibraries.ENABLE_LINKER_TESTS) {
+ if (NativeLibraries.sEnableLinkerTests) {
Log.i(TAG, String.format(
Locale.US,
"%s_LIBRARY_ADDRESS: %s %x",
diff --git a/base/android/java/templates/NativeLibraries.template b/base/android/java/templates/NativeLibraries.template
index 165f468..f52acb4 100644
--- a/base/android/java/templates/NativeLibraries.template
+++ b/base/android/java/templates/NativeLibraries.template
@@ -49,21 +49,21 @@ public class NativeLibraries {
// Set to true to enable the use of the Chromium Linker.
#if defined(ENABLE_CHROMIUM_LINKER)
- public static boolean USE_LINKER = true;
+ public static boolean sUseLinker = true;
#else
- public static boolean USE_LINKER = false;
+ public static boolean sUseLinker = false;
#endif
#if defined(ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE)
- public static boolean USE_LIBRARY_IN_ZIP_FILE = true;
+ public static boolean sUseLibraryInZipFile = true;
#else
- public static boolean USE_LIBRARY_IN_ZIP_FILE = false;
+ public static boolean sUseLibraryInZipFile = false;
#endif
#if defined(ENABLE_CHROMIUM_LINKER_TESTS)
- public static boolean ENABLE_LINKER_TESTS = true;
+ public static boolean sEnableLinkerTests = true;
#else
- public static boolean ENABLE_LINKER_TESTS = false;
+ public static boolean sEnableLinkerTests = false;
#endif
// This is the list of native libraries to be loaded (in the correct order)
@@ -83,7 +83,7 @@ public class NativeLibraries {
// This is the expected version of the 'main' native library, which is the one that
// implements the initial set of base JNI functions including
// base::android::nativeGetVersionName()
- static String VERSION_NUMBER =
+ static String sVersionNumber =
#if defined(NATIVE_LIBRARIES_VERSION_NUMBER)
NATIVE_LIBRARIES_VERSION_NUMBER;
#else
diff --git a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
index df8b80f..c3a1df5 100644
--- a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
+++ b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
@@ -162,13 +162,13 @@ class SampleForTests {
*/
// String constants that look like comments don't confuse the generator:
- private String arrgh = "*/*";
+ private String mArrgh = "*/*";
//------------------------------------------------------------------------------------------------
// Java fields which are accessed from C++ code only must be annotated with @AccessedByNative to
// prevent them being eliminated when unreferenced code is stripped.
@AccessedByNative
- private int javaField;
+ private int mJavaField;
//------------------------------------------------------------------------------------------------
// The following methods demonstrate declaring methods to call into C++ from Java.
diff --git a/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java b/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java
index 56cd734..2f7db71 100644
--- a/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java
+++ b/build/android/tests/multiple_proguards/src/dummy/NativeLibraries.java
@@ -9,9 +9,9 @@ package org.chromium.base.library_loader;
* NativeLibraries to build, but doesn't include it in its jar file.
*/
public class NativeLibraries {
- public static boolean USE_LINKER = false;
- public static boolean USE_LIBRARY_IN_ZIP_FILE = false;
- public static boolean ENABLE_LINKER_TESTS = false;
+ public static boolean sUseLinker = false;
+ public static boolean sUseLibraryInZipFile = false;
+ public static boolean sEnableLinkerTests = false;
static final String[] LIBRARIES = {};
- static String VERSION_NUMBER = "";
+ static String sVersionNumber = "";
}
diff --git a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
index 6c59ae1..39c737a 100644
--- a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
+++ b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequestFactoryConfig.java
@@ -125,7 +125,7 @@ public class HttpUrlRequestFactoryConfig {
hint.put(UrlRequestContextConfig.QUIC_HINT_ALT_PORT, alternatePort);
quicHints.put(hint);
} catch (JSONException e) {
- ;
+ // Intentionally do nothing.
}
return this;
}
@@ -133,6 +133,7 @@ public class HttpUrlRequestFactoryConfig {
/**
* Get JSON string representation of the config.
*/
+ @Override
public String toString() {
return mConfig.toString();
}
@@ -145,7 +146,7 @@ public class HttpUrlRequestFactoryConfig {
try {
mConfig.put(key, value);
} catch (JSONException e) {
- ;
+ // Intentionally do nothing.
}
return this;
}
@@ -158,7 +159,7 @@ public class HttpUrlRequestFactoryConfig {
try {
mConfig.put(key, value);
} catch (JSONException e) {
- ;
+ // Intentionally do nothing.
}
return this;
}
@@ -171,7 +172,7 @@ public class HttpUrlRequestFactoryConfig {
try {
mConfig.put(key, value);
} catch (JSONException e) {
- ;
+ // Intentionally do nothing.
}
return this;
}
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java
index 8e95553..e9f7dfb 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java
@@ -49,7 +49,7 @@ public class ContentViewStatics {
* Disables platform notifications of data state and proxy changes.
* Notifications are enabled by default.
*/
- public static void disablePlatformNotifications () {
+ public static void disablePlatformNotifications() {
ProxyChangeListener.setEnabled(false);
}
diff --git a/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java b/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java
index 76e77f4..caa7b2e 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java
@@ -271,7 +271,7 @@ class DeviceSensors implements SensorEventListener {
* </ul>
* <p>
*
- * @param R
+ * @param matrixR
* a 3x3 rotation matrix {@see SensorManager.getRotationMatrix}.
*
* @param values
@@ -280,7 +280,8 @@ class DeviceSensors implements SensorEventListener {
* @return the array values passed as argument.
*/
@VisibleForTesting
- public static double[] computeDeviceOrientationFromRotationMatrix(float[] R, double[] values) {
+ public static double[] computeDeviceOrientationFromRotationMatrix(
+ float[] matrixR, double[] values) {
/*
* 3x3 (length=9) case:
* / R[ 0] R[ 1] R[ 2] \
@@ -288,39 +289,39 @@ class DeviceSensors implements SensorEventListener {
* \ R[ 6] R[ 7] R[ 8] /
*
*/
- if (R.length != 9)
- return values;
-
- if (R[8] > 0) { // cos(beta) > 0
- values[0] = Math.atan2(-R[1], R[4]);
- values[1] = Math.asin(R[7]); // beta (-pi/2, pi/2)
- values[2] = Math.atan2(-R[6], R[8]); // gamma (-pi/2, pi/2)
- } else if (R[8] < 0) { // cos(beta) < 0
- values[0] = Math.atan2(R[1], -R[4]);
- values[1] = -Math.asin(R[7]);
+ if (matrixR.length != 9) return values;
+
+ if (matrixR[8] > 0) { // cos(beta) > 0
+ values[0] = Math.atan2(-matrixR[1], matrixR[4]);
+ values[1] = Math.asin(matrixR[7]); // beta (-pi/2, pi/2)
+ values[2] = Math.atan2(-matrixR[6], matrixR[8]); // gamma (-pi/2, pi/2)
+ } else if (matrixR[8] < 0) { // cos(beta) < 0
+ values[0] = Math.atan2(matrixR[1], -matrixR[4]);
+ values[1] = -Math.asin(matrixR[7]);
values[1] += (values[1] >= 0) ? -Math.PI : Math.PI; // beta [-pi,-pi/2) U (pi/2,pi)
- values[2] = Math.atan2(R[6], -R[8]); // gamma (-pi/2, pi/2)
+ values[2] = Math.atan2(matrixR[6], -matrixR[8]); // gamma (-pi/2, pi/2)
} else { // R[8] == 0
- if (R[6] > 0) { // cos(gamma) == 0, cos(beta) > 0
- values[0] = Math.atan2(-R[1], R[4]);
- values[1] = Math.asin(R[7]); // beta [-pi/2, pi/2]
- values[2] = -Math.PI / 2; // gamma = -pi/2
- } else if (R[6] < 0) { // cos(gamma) == 0, cos(beta) < 0
- values[0] = Math.atan2(R[1], -R[4]);
- values[1] = -Math.asin(R[7]);
+ if (matrixR[6] > 0) { // cos(gamma) == 0, cos(beta) > 0
+ values[0] = Math.atan2(-matrixR[1], matrixR[4]);
+ values[1] = Math.asin(matrixR[7]); // beta [-pi/2, pi/2]
+ values[2] = -Math.PI / 2; // gamma = -pi/2
+ } else if (matrixR[6] < 0) { // cos(gamma) == 0, cos(beta) < 0
+ values[0] = Math.atan2(matrixR[1], -matrixR[4]);
+ values[1] = -Math.asin(matrixR[7]);
values[1] += (values[1] >= 0) ? -Math.PI : Math.PI; // beta [-pi,-pi/2) U (pi/2,pi)
- values[2] = -Math.PI / 2; // gamma = -pi/2
+ values[2] = -Math.PI / 2; // gamma = -pi/2
} else { // R[6] == 0, cos(beta) == 0
// gimbal lock discontinuity
- values[0] = Math.atan2(R[3], R[0]);
- values[1] = (R[7] > 0) ? Math.PI / 2 : -Math.PI / 2; // beta = +-pi/2
- values[2] = 0; // gamma = 0
+ values[0] = Math.atan2(matrixR[3], matrixR[0]);
+ values[1] = (matrixR[7] > 0) ? Math.PI / 2 : -Math.PI / 2; // beta = +-pi/2
+ values[2] = 0; // gamma = 0
}
}
// alpha is in [-pi, pi], make sure it is in [0, 2*pi).
- if (values[0] < 0)
+ if (values[0] < 0) {
values[0] += 2 * Math.PI; // alpha [0, 2*pi)
+ }
return values;
}
diff --git a/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java b/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java
index 1597d43..de414e2 100644
--- a/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java
@@ -56,16 +56,24 @@ class MediaResourceGetter {
// then we must return NaN. If it is unbounded, then positive infinity.
// http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html
@CalledByNative("MediaMetadata")
- int getDurationInMilliseconds() { return mDurationInMilliseconds; }
+ int getDurationInMilliseconds() {
+ return mDurationInMilliseconds;
+ }
@CalledByNative("MediaMetadata")
- int getWidth() { return mWidth; }
+ int getWidth() {
+ return mWidth;
+ }
@CalledByNative("MediaMetadata")
- int getHeight() { return mHeight; }
+ int getHeight() {
+ return mHeight;
+ }
@CalledByNative("MediaMetadata")
- boolean isSuccess() { return mSuccess; }
+ boolean isSuccess() {
+ return mSuccess;
+ }
@Override
public String toString() {
diff --git a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java
index 049f70f..12b2fdd 100644
--- a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java
+++ b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java
@@ -82,32 +82,44 @@ public class RenderCoordinates {
/**
* @return Absolute CSS (document) X coordinate of the point.
*/
- public float getXAbsoluteCss() { return mXAbsoluteCss; }
+ public float getXAbsoluteCss() {
+ return mXAbsoluteCss;
+ }
/**
* @return Absolute CSS (document) Y coordinate of the point.
*/
- public float getYAbsoluteCss() { return mYAbsoluteCss; }
+ public float getYAbsoluteCss() {
+ return mYAbsoluteCss;
+ }
/**
* @return Local device-scale-unadjusted X coordinate of the point.
*/
- public float getXLocalDip() { return (mXAbsoluteCss - mScrollXCss) * mPageScaleFactor; }
+ public float getXLocalDip() {
+ return (mXAbsoluteCss - mScrollXCss) * mPageScaleFactor;
+ }
/**
* @return Local device-scale-unadjusted Y coordinate of the point.
*/
- public float getYLocalDip() { return (mYAbsoluteCss - mScrollYCss) * mPageScaleFactor; }
+ public float getYLocalDip() {
+ return (mYAbsoluteCss - mScrollYCss) * mPageScaleFactor;
+ }
/**
* @return Physical (screen) X coordinate of the point.
*/
- public float getXPix() { return getXLocalDip() * mDeviceScaleFactor; }
+ public float getXPix() {
+ return getXLocalDip() * mDeviceScaleFactor;
+ }
/**
* @return Physical (screen) Y coordinate of the point.
*/
- public float getYPix() { return getYLocalDip() * mDeviceScaleFactor + mContentOffsetYPix; }
+ public float getYPix() {
+ return getYLocalDip() * mDeviceScaleFactor + mContentOffsetYPix;
+ }
/**
* Sets the point to the given absolute CSS (document) coordinates.
@@ -144,72 +156,100 @@ public class RenderCoordinates {
/**
* @return Horizontal scroll offset in CSS pixels.
*/
- public float getScrollX() { return mScrollXCss; }
+ public float getScrollX() {
+ return mScrollXCss;
+ }
/**
* @return Vertical scroll offset in CSS pixels.
*/
- public float getScrollY() { return mScrollYCss; }
+ public float getScrollY() {
+ return mScrollYCss;
+ }
/**
* @return Horizontal scroll offset in physical pixels.
*/
- public float getScrollXPix() { return fromLocalCssToPix(mScrollXCss); }
+ public float getScrollXPix() {
+ return fromLocalCssToPix(mScrollXCss);
+ }
/**
* @return Vertical scroll offset in physical pixels.
*/
- public float getScrollYPix() { return fromLocalCssToPix(mScrollYCss); }
+ public float getScrollYPix() {
+ return fromLocalCssToPix(mScrollYCss);
+ }
/**
* @return Horizontal scroll offset in physical pixels (approx, integer).
*/
- public int getScrollXPixInt() { return (int) Math.floor(getScrollXPix()); }
+ public int getScrollXPixInt() {
+ return (int) Math.floor(getScrollXPix());
+ }
/**
* @return Vertical scroll offset in physical pixels (approx, integer).
*/
- public int getScrollYPixInt() { return (int) Math.floor(getScrollYPix()); }
+ public int getScrollYPixInt() {
+ return (int) Math.floor(getScrollYPix());
+ }
/**
* @return Width of the content in CSS pixels.
*/
- public float getContentWidthCss() { return mContentWidthCss; }
+ public float getContentWidthCss() {
+ return mContentWidthCss;
+ }
/**
* @return Height of the content in CSS pixels.
*/
- public float getContentHeightCss() { return mContentHeightCss; }
+ public float getContentHeightCss() {
+ return mContentHeightCss;
+ }
/**
* @return Approximate width of the content in physical pixels.
*/
- public float getContentWidthPix() { return fromLocalCssToPix(mContentWidthCss); }
+ public float getContentWidthPix() {
+ return fromLocalCssToPix(mContentWidthCss);
+ }
/**
* @return Approximate height of the content in physical pixels.
*/
- public float getContentHeightPix() { return fromLocalCssToPix(mContentHeightCss); }
+ public float getContentHeightPix() {
+ return fromLocalCssToPix(mContentHeightCss);
+ }
/**
* @return Approximate width of the content in physical pixels (integer).
*/
- public int getContentWidthPixInt() { return (int) Math.ceil(getContentWidthPix()); }
+ public int getContentWidthPixInt() {
+ return (int) Math.ceil(getContentWidthPix());
+ }
/**
* @return Approximate height of the content in physical pixels (integer).
*/
- public int getContentHeightPixInt() { return (int) Math.ceil(getContentHeightPix()); }
+ public int getContentHeightPixInt() {
+ return (int) Math.ceil(getContentHeightPix());
+ }
/**
* @return Render-reported width of the viewport in CSS pixels.
*/
- public float getLastFrameViewportWidthCss() { return mLastFrameViewportWidthCss; }
+ public float getLastFrameViewportWidthCss() {
+ return mLastFrameViewportWidthCss;
+ }
/**
* @return Render-reported height of the viewport in CSS pixels.
*/
- public float getLastFrameViewportHeightCss() { return mLastFrameViewportHeightCss; }
+ public float getLastFrameViewportHeightCss() {
+ return mLastFrameViewportHeightCss;
+ }
/**
* @return Render-reported width of the viewport in physical pixels (approximate).
@@ -249,22 +289,30 @@ public class RenderCoordinates {
/**
* @return Current page scale factor (maps CSS pixels to DIP pixels).
*/
- public float getPageScaleFactor() { return mPageScaleFactor; }
+ public float getPageScaleFactor() {
+ return mPageScaleFactor;
+ }
/**
* @return Minimum page scale factor to be used with the content.
*/
- public float getMinPageScaleFactor() { return mMinPageScaleFactor; }
+ public float getMinPageScaleFactor() {
+ return mMinPageScaleFactor;
+ }
/**
* @return Maximum page scale factor to be used with the content.
*/
- public float getMaxPageScaleFactor() { return mMaxPageScaleFactor; }
+ public float getMaxPageScaleFactor() {
+ return mMaxPageScaleFactor;
+ }
/**
* @return Current device scale factor (maps DIP pixels to physical pixels).
*/
- public float getDeviceScaleFactor() { return mDeviceScaleFactor; }
+ public float getDeviceScaleFactor() {
+ return mDeviceScaleFactor;
+ }
/**
* @return Maximum possible horizontal scroll in physical pixels.
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java b/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java
index 9665dc0..22a43d5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java
@@ -32,7 +32,7 @@ class GamepadDevice {
// should correspond to "down" or "right".
private final float[] mAxisValues = new float[CanonicalAxisIndex.COUNT];
- private final float[] mButtonsValues = new float[CanonicalButtonIndex.COUNT];;
+ private final float[] mButtonsValues = new float[CanonicalButtonIndex.COUNT];
// When the user agent recognizes the attached inputDevice, it is recommended
// that it be remapped to a canonical ordering when possible. Devices that are
@@ -76,37 +76,51 @@ class GamepadDevice {
/**
* @return Device Id of the gamepad device.
*/
- public int getId() { return mDeviceId; }
+ public int getId() {
+ return mDeviceId;
+ }
/**
* @return Mapping status of the gamepad device.
*/
- public boolean isStandardGamepad() { return mIsStandardGamepad; }
+ public boolean isStandardGamepad() {
+ return mIsStandardGamepad;
+ }
/**
* @return Device name of the gamepad device.
*/
- public String getName() { return mDeviceName; }
+ public String getName() {
+ return mDeviceName;
+ }
/**
* @return Device index of the gamepad device.
*/
- public int getIndex() { return mDeviceIndex; }
+ public int getIndex() {
+ return mDeviceIndex;
+ }
/**
* @return The timestamp when the gamepad device was last interacted.
*/
- public long getTimestamp() { return mTimestamp; }
+ public long getTimestamp() {
+ return mTimestamp;
+ }
/**
* @return The axes state of the gamepad device.
*/
- public float[] getAxes() { return mAxisValues; }
+ public float[] getAxes() {
+ return mAxisValues;
+ }
/**
* @return The buttons state of the gamepad device.
*/
- public float[] getButtons() { return mButtonsValues; }
+ public float[] getButtons() {
+ return mButtonsValues;
+ }
/**
* Reset the axes and buttons data of the gamepad device everytime gamepad data access is
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java b/content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java
index 1d9fa1f..d344326 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java
@@ -85,16 +85,24 @@ public class BindingManagerImplTest extends InstrumentationTestCase {
}
@Override
- public int getServiceNumber() { throw new UnsupportedOperationException(); }
+ public int getServiceNumber() {
+ throw new UnsupportedOperationException();
+ }
@Override
- public boolean isInSandbox() { throw new UnsupportedOperationException(); }
+ public boolean isInSandbox() {
+ throw new UnsupportedOperationException();
+ }
@Override
- public IChildProcessService getService() { throw new UnsupportedOperationException(); }
+ public IChildProcessService getService() {
+ throw new UnsupportedOperationException();
+ }
@Override
- public void start(String[] commandLine) { throw new UnsupportedOperationException(); }
+ public void start(String[] commandLine) {
+ throw new UnsupportedOperationException();
+ }
@Override
public void setupConnection(String[] commandLine, FileDescriptorInfo[] filesToBeMapped,
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
index a2d5ad8..17cbbd6 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
@@ -225,7 +225,9 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testUncaughtJavaExceptionRaisesJavaScriptException() throws Throwable {
injectObjectAndReload(new Object() {
- public void method() { throw new RuntimeException("foo"); }
+ public void method() {
+ throw new RuntimeException("foo");
+ }
}, "testObject");
assertRaisesException("testObject.method()");
}
@@ -265,13 +267,17 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testReplaceInjectedObject() throws Throwable {
injectObjectAndReload(new Object() {
- public void method() { mTestController.setStringValue("object 1"); }
+ public void method() {
+ mTestController.setStringValue("object 1");
+ }
}, "testObject");
executeJavaScript("testObject.method()");
assertEquals("object 1", mTestController.waitForStringValue());
injectObjectAndReload(new Object() {
- public void method() { mTestController.setStringValue("object 2"); }
+ public void method() {
+ mTestController.setStringValue("object 2");
+ }
}, "testObject");
executeJavaScript("testObject.method()");
assertEquals("object 2", mTestController.waitForStringValue());
@@ -297,9 +303,17 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testCallOverloadedMethodWithDifferentNumberOfArguments() throws Throwable {
injectObjectAndReload(new Object() {
- public void method() { mTestController.setStringValue("0 args"); }
- public void method(int x) { mTestController.setStringValue("1 arg"); }
- public void method(int x, int y) { mTestController.setStringValue("2 args"); }
+ public void method() {
+ mTestController.setStringValue("0 args");
+ }
+
+ public void method(int x) {
+ mTestController.setStringValue("1 arg");
+ }
+
+ public void method(int x, int y) {
+ mTestController.setStringValue("2 args");
+ }
}, "testObject");
executeJavaScript("testObject.method()");
assertEquals("0 args", mTestController.waitForStringValue());
@@ -344,7 +358,10 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testSameObjectInjectedMultipleTimes() throws Throwable {
class TestObject {
private int mNumMethodInvocations;
- public void method() { mTestController.setIntValue(++mNumMethodInvocations); }
+
+ public void method() {
+ mTestController.setIntValue(++mNumMethodInvocations);
+ }
}
final TestObject testObject = new TestObject();
TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishedHelper =
@@ -373,7 +390,9 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
injectObjectAndReload(new Object() {
public Object getInnerObject() {
return new Object() {
- public void method(int x) { mTestController.setIntValue(x); }
+ public void method(int x) {
+ mTestController.setIntValue(x);
+ }
};
}
}, "testObject");
@@ -386,7 +405,10 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testReturnedObjectInjectedElsewhere() throws Throwable {
class InnerObject {
private int mNumMethodInvocations;
- public void method() { mTestController.setIntValue(++mNumMethodInvocations); }
+
+ public void method() {
+ mTestController.setIntValue(++mNumMethodInvocations);
+ }
}
final InnerObject innerObject = new InnerObject();
final Object object = new Object() {
@@ -501,7 +523,9 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testPublicInheritedMethod() throws Throwable {
class Base {
- public void method(int x) { mTestController.setIntValue(x); }
+ public void method(int x) {
+ mTestController.setIntValue(x);
+ }
}
class Derived extends Base {
}
@@ -527,11 +551,15 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testOverriddenMethod() throws Throwable {
class Base {
- public void method() { mTestController.setStringValue("base"); }
+ public void method() {
+ mTestController.setStringValue("base");
+ }
}
class Derived extends Base {
@Override
- public void method() { mTestController.setStringValue("derived"); }
+ public void method() {
+ mTestController.setStringValue("derived");
+ }
}
injectObjectAndReload(new Derived(), "testObject");
executeJavaScript("testObject.method()");
@@ -559,8 +587,13 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testReflectPublicMethod() throws Throwable {
injectObjectAndReload(new Object() {
- public Class<?> myGetClass() { return getClass(); }
- public String method() { return "foo"; }
+ public Class<?> myGetClass() {
+ return getClass();
+ }
+
+ public String method() {
+ return "foo";
+ }
}, "testObject");
assertEquals("foo", executeJavaScriptAndGetStringResult(
"testObject.myGetClass().getMethod('method', null).invoke(testObject, null)" +
@@ -571,7 +604,10 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testReflectPublicField() throws Throwable {
injectObjectAndReload(new Object() {
- public Class<?> myGetClass() { return getClass(); }
+ public Class<?> myGetClass() {
+ return getClass();
+ }
+
public String field = "foo";
}, "testObject");
assertEquals("foo", executeJavaScriptAndGetStringResult(
@@ -582,7 +618,10 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testReflectPrivateMethodRaisesException() throws Throwable {
injectObjectAndReload(new Object() {
- public Class<?> myGetClass() { return getClass(); }
+ public Class<?> myGetClass() {
+ return getClass();
+ }
+
private void method() {};
}, "testObject");
assertRaisesException("testObject.myGetClass().getMethod('method', null)");
@@ -597,7 +636,10 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testReflectPrivateFieldRaisesException() throws Throwable {
injectObjectAndReload(new Object() {
- public Class<?> myGetClass() { return getClass(); }
+ public Class<?> myGetClass() {
+ return getClass();
+ }
+
private int mField;
}, "testObject");
assertRaisesException("testObject.myGetClass().getField('field')");
@@ -611,7 +653,9 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testAllowNonAnnotatedMethods() throws Throwable {
injectObjectAndReload(new Object() {
- public String allowed() { return "foo"; }
+ public String allowed() {
+ return "foo";
+ }
}, "testObject", null);
// Test calling a method of an explicitly inherited class (Base#allowed()).
@@ -626,9 +670,13 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testAllowOnlyAnnotatedMethods() throws Throwable {
injectObjectAndReload(new Object() {
@JavascriptInterface
- public String allowed() { return "foo"; }
+ public String allowed() {
+ return "foo";
+ }
- public String disallowed() { return "bar"; }
+ public String disallowed() {
+ return "bar";
+ }
}, "testObject", JavascriptInterface.class);
// getClass() is an Object method and does not have the @JavascriptInterface annotation and
@@ -653,14 +701,20 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testAnnotationRequirementRetainsPropertyAcrossObjects() throws Throwable {
class Test {
@JavascriptInterface
- public String safe() { return "foo"; }
+ public String safe() {
+ return "foo";
+ }
- public String unsafe() { return "bar"; }
+ public String unsafe() {
+ return "bar";
+ }
}
class TestReturner {
@JavascriptInterface
- public Test getTest() { return new Test(); }
+ public Test getTest() {
+ return new Test();
+ }
}
// First test with safe mode off.
@@ -723,10 +777,14 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testCustomAnnotationRestriction() throws Throwable {
class Test {
@TestAnnotation
- public String checkTestAnnotationFoo() { return "bar"; }
+ public String checkTestAnnotationFoo() {
+ return "bar";
+ }
@JavascriptInterface
- public String checkJavascriptInterfaceFoo() { return "bar"; }
+ public String checkJavascriptInterfaceFoo() {
+ return "bar";
+ }
}
// Inject javascriptInterfaceObj and require the JavascriptInterface annotation.
@@ -758,10 +816,14 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testAddJavascriptInterfaceIsSafeByDefault() throws Throwable {
class Test {
- public String blocked() { return "bar"; }
+ public String blocked() {
+ return "bar";
+ }
@JavascriptInterface
- public String allowed() { return "bar"; }
+ public String allowed() {
+ return "bar";
+ }
}
// Manually inject the Test object, making sure to use the
@@ -794,13 +856,19 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testObjectsInspection() throws Throwable {
class Test {
@JavascriptInterface
- public String m1() { return "foo"; }
+ public String m1() {
+ return "foo";
+ }
@JavascriptInterface
- public String m2() { return "bar"; }
+ public String m2() {
+ return "bar";
+ }
@JavascriptInterface
- public String m2(int x) { return "bar " + x; }
+ public String m2(int x) {
+ return "bar " + x;
+ }
}
final String jsObjectKeysTestTemplate = "Object.keys(%s).toString()";
diff --git a/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java b/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
index 76e1867..20a0067 100644
--- a/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
+++ b/media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java
@@ -93,10 +93,14 @@ class AudioManagerAndroid {
}
@CalledByNative("AudioDeviceName")
- private String id() { return String.valueOf(mId); }
+ private String id() {
+ return String.valueOf(mId);
+ }
@CalledByNative("AudioDeviceName")
- private String name() { return mName; }
+ private String name() {
+ return mName;
+ }
}
// List if device models which have been vetted for good quality platform
diff --git a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
index ac2f733..3b9a8b0 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
@@ -82,10 +82,14 @@ class MediaCodecBridge {
}
@CalledByNative("DequeueInputResult")
- private int status() { return mStatus; }
+ private int status() {
+ return mStatus;
+ }
@CalledByNative("DequeueInputResult")
- private int index() { return mIndex; }
+ private int index() {
+ return mIndex;
+ }
}
/**
@@ -104,13 +108,19 @@ class MediaCodecBridge {
}
@CalledByNative("CodecInfo")
- private String codecType() { return mCodecType; }
+ private String codecType() {
+ return mCodecType;
+ }
@CalledByNative("CodecInfo")
- private String codecName() { return mCodecName; }
+ private String codecName() {
+ return mCodecName;
+ }
@CalledByNative("CodecInfo")
- private int direction() { return mDirection; }
+ private int direction() {
+ return mDirection;
+ }
}
private static class DequeueOutputResult {
@@ -132,22 +142,34 @@ class MediaCodecBridge {
}
@CalledByNative("DequeueOutputResult")
- private int status() { return mStatus; }
+ private int status() {
+ return mStatus;
+ }
@CalledByNative("DequeueOutputResult")
- private int index() { return mIndex; }
+ private int index() {
+ return mIndex;
+ }
@CalledByNative("DequeueOutputResult")
- private int flags() { return mFlags; }
+ private int flags() {
+ return mFlags;
+ }
@CalledByNative("DequeueOutputResult")
- private int offset() { return mOffset; }
+ private int offset() {
+ return mOffset;
+ }
@CalledByNative("DequeueOutputResult")
- private long presentationTimeMicroseconds() { return mPresentationTimeMicroseconds; }
+ private long presentationTimeMicroseconds() {
+ return mPresentationTimeMicroseconds;
+ }
@CalledByNative("DequeueOutputResult")
- private int numBytes() { return mNumBytes; }
+ private int numBytes() {
+ return mNumBytes;
+ }
}
/**
diff --git a/media/base/android/java/src/org/chromium/media/MediaDrmBridge.java b/media/base/android/java/src/org/chromium/media/MediaDrmBridge.java
index bec901b..221271a 100644
--- a/media/base/android/java/src/org/chromium/media/MediaDrmBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaDrmBridge.java
@@ -118,9 +118,17 @@ public class MediaDrmBridge {
mMimeType = mimeType;
}
- private int sessionId() { return mSessionId; }
- private byte[] initData() { return mInitData; }
- private String mimeType() { return mMimeType; }
+ private int sessionId() {
+ return mSessionId;
+ }
+
+ private byte[] initData() {
+ return mInitData;
+ }
+
+ private String mimeType() {
+ return mMimeType;
+ }
}
private static UUID getUUIDFromBytes(byte[] data) {
diff --git a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
index 3c2de12..0fef27b 100644
--- a/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java
@@ -296,13 +296,19 @@ public class MediaPlayerBridge {
}
@CalledByNative("AllowedOperations")
- private boolean canPause() { return mCanPause; }
+ private boolean canPause() {
+ return mCanPause;
+ }
@CalledByNative("AllowedOperations")
- private boolean canSeekForward() { return mCanSeekForward; }
+ private boolean canSeekForward() {
+ return mCanSeekForward;
+ }
@CalledByNative("AllowedOperations")
- private boolean canSeekBackward() { return mCanSeekBackward; }
+ private boolean canSeekBackward() {
+ return mCanSeekBackward;
+ }
}
/**
diff --git a/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java b/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
index 167837c..3ee1029 100644
--- a/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
+++ b/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java
@@ -109,7 +109,7 @@ public class DefaultAndroidKeyStore implements AndroidKeyStore {
signature = Signature.getInstance("NONEwithECDSA");
}
} catch (NoSuchAlgorithmException e) {
- ;
+ // Intentionally do nothing.
}
if (signature == null) {
diff --git a/remoting/android/cast/src/org/chromium/chromoting/CastExtensionHandler.java b/remoting/android/cast/src/org/chromium/chromoting/CastExtensionHandler.java
index 5c4a5ec..6b49e9a 100644
--- a/remoting/android/cast/src/org/chromium/chromoting/CastExtensionHandler.java
+++ b/remoting/android/cast/src/org/chromium/chromoting/CastExtensionHandler.java
@@ -300,7 +300,7 @@ public class CastExtensionHandler implements ClientExtension, ActivityLifecycleL
}
@Override
- public void onActivitySaveInstanceState (Activity activity, Bundle outState) {}
+ public void onActivitySaveInstanceState(Activity activity, Bundle outState) {}
@Override
public void onActivityStarted(Activity activity) {
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
index 8d509a6..e80d132 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
@@ -238,7 +238,7 @@ public class DesktopView extends SurfaceView implements DesktopViewInterface,
}
}, startTimeMs + 30);
}
- };
+ }
}
private void processAnimation() {
diff --git a/remoting/android/java/src/org/chromium/chromoting/DummyActivityLifecycleListener.java b/remoting/android/java/src/org/chromium/chromoting/DummyActivityLifecycleListener.java
index 76b8c6f..55fe271 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DummyActivityLifecycleListener.java
+++ b/remoting/android/java/src/org/chromium/chromoting/DummyActivityLifecycleListener.java
@@ -16,33 +16,33 @@ import android.view.MenuItem;
public class DummyActivityLifecycleListener implements ActivityLifecycleListener {
@Override
- public void onActivityCreated (Activity activity, Bundle savedInstanceState) {}
+ public void onActivityCreated(Activity activity, Bundle savedInstanceState) {}
@Override
- public void onActivityDestroyed (Activity activity) {}
+ public void onActivityDestroyed(Activity activity) {}
@Override
- public void onActivityPaused (Activity activity) {}
+ public void onActivityPaused(Activity activity) {}
@Override
- public void onActivityResumed (Activity activity) {}
+ public void onActivityResumed(Activity activity) {}
@Override
- public void onActivitySaveInstanceState (Activity activity, Bundle outState) {}
+ public void onActivitySaveInstanceState(Activity activity, Bundle outState) {}
@Override
- public void onActivityStarted (Activity activity) {}
+ public void onActivityStarted(Activity activity) {}
@Override
- public void onActivityStopped (Activity activity) {}
+ public void onActivityStopped(Activity activity) {}
@Override
public boolean onActivityCreatedOptionsMenu(Activity activity, Menu menu) {
- return false;
+ return false;
}
@Override
public boolean onActivityOptionsItemSelected(Activity activity, MenuItem item) {
- return false;
+ return false;
}
}
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
index 83af125..c5f56cd 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -467,10 +467,14 @@ public class JniInterface {
}
/** Position of cursor hotspot within cursor image. Called on the graphics thread. */
- public static Point getCursorHotspot() { return sCursorHotspot; }
+ public static Point getCursorHotspot() {
+ return sCursorHotspot;
+ }
/** Returns the current cursor shape. Called on the graphics thread. */
- public static Bitmap getCursorBitmap() { return sCursorBitmap; }
+ public static Bitmap getCursorBitmap() {
+ return sCursorBitmap;
+ }
//
// Third Party Authentication
diff --git a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java
index 67deaf6..2d3e760 100644
--- a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java
+++ b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java
@@ -43,7 +43,7 @@ public class InvalidationPreferencesTest extends InstrumentationTestCase {
* the two valid strings are properly converted and that the invalid string is dropped.
*/
HashSet<ModelType> expectedTypes = CollectionUtil.newHashSet(
- ModelType.BOOKMARK,ModelType.SESSION);
+ ModelType.BOOKMARK, ModelType.SESSION);
Set<ModelType> actualTypes = ModelType.syncTypesToModelTypes(
CollectionUtil.newHashSet("BOOKMARK", "SESSION", "0!!!INVALID"));
assertEquals(expectedTypes, actualTypes);
diff --git a/tools/android/checkstyle/chromium-style-5.0.xml b/tools/android/checkstyle/chromium-style-5.0.xml
index 141f93b..7f6b7ee 100644
--- a/tools/android/checkstyle/chromium-style-5.0.xml
+++ b/tools/android/checkstyle/chromium-style-5.0.xml
@@ -147,6 +147,9 @@
<module name="ParenPad">
<property name="severity" value="error"/>
</module>
+ <module name="MethodParamPad">
+ <property name="severity" value="error"/>
+ </module>
<module name="ImportOrder">
<property name="severity" value="error"/>
<message key="import.ordering" value="Wrong order for {0} import. Use :JavaImportOrganize (ECLIM) or Ctrl+Shift+O (Eclipse) to sort imports"/>
diff --git a/tools/android/memconsumer/java/src/org/chromium/memconsumer/MemConsumer.java b/tools/android/memconsumer/java/src/org/chromium/memconsumer/MemConsumer.java
index 17566f8db..23ad2b8 100644
--- a/tools/android/memconsumer/java/src/org/chromium/memconsumer/MemConsumer.java
+++ b/tools/android/memconsumer/java/src/org/chromium/memconsumer/MemConsumer.java
@@ -58,7 +58,7 @@ public class MemConsumer extends Activity {
EditText editText = (EditText) child;
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
- public boolean onEditorAction (TextView v, int actionId, KeyEvent event) {
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (v.getText().length() > 0) {
updateMemoryConsumption(Integer.parseInt(v.getText().toString()));
}
diff --git a/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java b/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
index f95d855..bffcb48 100644
--- a/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
+++ b/ui/android/java/src/org/chromium/ui/interpolators/BakedBezierInterpolator.java
@@ -150,7 +150,7 @@ public class BakedBezierInterpolator implements Interpolator {
}
int position = Math.min(
- (int)(input * (mValues.length - 1)),
+ (int) (input * (mValues.length - 1)),
mValues.length - 2);
float quantized = position * mStepSize;
diff --git a/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java b/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
index 797e03b..c59f465 100644
--- a/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
+++ b/ui/android/java/src/org/chromium/ui/picker/InputDialogContainer.java
@@ -249,7 +249,7 @@ public class InputDialogContainer {
mDialog.setButton(DialogInterface.BUTTON_POSITIVE,
mContext.getText(R.string.date_picker_dialog_set),
- (DialogInterface.OnClickListener)mDialog);
+ (DialogInterface.OnClickListener) mDialog);
mDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
mContext.getText(android.R.string.cancel),