Merge "Tabs -> spaces in frameworks/base."

This commit is contained in:
John Spurlock
2014-02-25 19:57:33 +00:00
committed by Android (Google) Code Review
56 changed files with 290 additions and 290 deletions

View File

@@ -1030,7 +1030,7 @@ public class Activity extends ContextThemeWrapper
/**
* Called after {@link #onCreate} — or after {@link #onRestart} when
* the activity had been stopped, but is now again being displayed to the
* user. It will be followed by {@link #onResume}.
* user. It will be followed by {@link #onResume}.
*
* <p><em>Derived classes must call through to the super class's
* implementation of this method. If they do not, an exception will be

View File

@@ -1059,7 +1059,7 @@ final class ApplicationPackageManager extends PackageManager {
}
@Override
public void installPackageWithVerificationAndEncryption(Uri packageURI,
public void installPackageWithVerificationAndEncryption(Uri packageURI,
IPackageInstallObserver observer, int flags, String installerPackageName,
VerificationParams verificationParams, ContainerEncryptionParams encryptionParams) {
try {

View File

@@ -714,7 +714,7 @@ class ApplicationThreadProxy implements IApplicationThread {
}
public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
throws RemoteException {
throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IApplicationThread.descriptor);
data.writeStrongBinder(token);
@@ -884,7 +884,7 @@ class ApplicationThreadProxy implements IApplicationThread {
}
public final void scheduleServiceArgs(IBinder token, boolean taskRemoved, int startId,
int flags, Intent args) throws RemoteException {
int flags, Intent args) throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IApplicationThread.descriptor);
data.writeStrongBinder(token);

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -172,7 +172,7 @@ public class AppWidgetProviderInfo implements Parcelable {
* <p>This field corresponds to the <code>android:previewImage</code> attribute in
* the <code>&lt;receiver&gt;</code> element in the AndroidManifest.xml file.
*/
public int previewImage;
public int previewImage;
/**
* The rules by which a widget can be resized. See {@link #RESIZE_NONE},

View File

@@ -361,7 +361,7 @@ public class GeomagneticField {
mP[0] = new float[] { 1.0f };
mPDeriv[0] = new float[] { 0.0f };
for (int n = 1; n <= maxN; n++) {
mP[n] = new float[n + 1];
mP[n] = new float[n + 1];
mPDeriv[n] = new float[n + 1];
for (int m = 0; m <= n; m++) {
if (n == m) {

View File

@@ -815,7 +815,7 @@ public final class NdefRecord implements Parcelable {
throw new FormatException("expected TNF_UNCHANGED in non-leading chunk");
} else if (!inChunk && tnf == NdefRecord.TNF_UNCHANGED) {
throw new FormatException("" +
"unexpected TNF_UNCHANGED in first chunk or unchunked record");
"unexpected TNF_UNCHANGED in first chunk or unchunked record");
}
int typeLength = buffer.get() & 0xFF;

View File

@@ -171,10 +171,10 @@ public class Broadcaster
public void broadcast(Message msg)
{
synchronized (this) {
if (mReg == null) {
return;
}
if (mReg == null) {
return;
}
int senderWhat = msg.what;
Registration start = mReg;
Registration r = start;

View File

@@ -191,7 +191,7 @@ abstract class GenericInflater<T, P extends GenericInflater.Parent> {
public void setFactory(Factory<T> factory) {
if (mFactorySet) {
throw new IllegalStateException("" +
"A factory has already been set on this inflater");
"A factory has already been set on this inflater");
}
if (factory == null) {
throw new NullPointerException("Given factory can not be null");

View File

@@ -26,9 +26,9 @@ public class BackgroundColorSpan extends CharacterStyle
private final int mColor;
public BackgroundColorSpan(int color) {
mColor = color;
}
public BackgroundColorSpan(int color) {
mColor = color;
}
public BackgroundColorSpan(Parcel src) {
mColor = src.readInt();
@@ -46,12 +46,12 @@ public class BackgroundColorSpan extends CharacterStyle
dest.writeInt(mColor);
}
public int getBackgroundColor() {
return mColor;
}
public int getBackgroundColor() {
return mColor;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.bgColor = mColor;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.bgColor = mColor;
}
}

View File

@@ -24,7 +24,7 @@ import android.text.TextPaint;
* ones may just implement {@link UpdateAppearance}.
*/
public abstract class CharacterStyle {
public abstract void updateDrawState(TextPaint tp);
public abstract void updateDrawState(TextPaint tp);
/**
* A given CharacterStyle can only applied to a single region of a given

View File

@@ -26,9 +26,9 @@ public class ForegroundColorSpan extends CharacterStyle
private final int mColor;
public ForegroundColorSpan(int color) {
mColor = color;
}
public ForegroundColorSpan(int color) {
mColor = color;
}
public ForegroundColorSpan(Parcel src) {
mColor = src.readInt();
@@ -46,12 +46,12 @@ public class ForegroundColorSpan extends CharacterStyle
dest.writeInt(mColor);
}
public int getForegroundColor() {
return mColor;
}
public int getForegroundColor() {
return mColor;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setColor(mColor);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setColor(mColor);
}
}

View File

@@ -21,18 +21,18 @@ import android.text.TextPaint;
public class MaskFilterSpan extends CharacterStyle implements UpdateAppearance {
private MaskFilter mFilter;
private MaskFilter mFilter;
public MaskFilterSpan(MaskFilter filter) {
mFilter = filter;
}
public MaskFilterSpan(MaskFilter filter) {
mFilter = filter;
}
public MaskFilter getMaskFilter() {
return mFilter;
}
public MaskFilter getMaskFilter() {
return mFilter;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setMaskFilter(mFilter);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setMaskFilter(mFilter);
}
}

View File

@@ -26,7 +26,7 @@ public abstract class MetricAffectingSpan
extends CharacterStyle
implements UpdateLayout {
public abstract void updateMeasureState(TextPaint p);
public abstract void updateMeasureState(TextPaint p);
/**
* Returns "this" for most MetricAffectingSpans, but for

View File

@@ -21,18 +21,18 @@ import android.text.TextPaint;
public class RasterizerSpan extends CharacterStyle implements UpdateAppearance {
private Rasterizer mRasterizer;
private Rasterizer mRasterizer;
public RasterizerSpan(Rasterizer r) {
mRasterizer = r;
}
public RasterizerSpan(Rasterizer r) {
mRasterizer = r;
}
public Rasterizer getRasterizer() {
return mRasterizer;
}
public Rasterizer getRasterizer() {
return mRasterizer;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setRasterizer(mRasterizer);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setRasterizer(mRasterizer);
}
}

View File

@@ -23,11 +23,11 @@ import android.text.TextUtils;
public class RelativeSizeSpan extends MetricAffectingSpan implements ParcelableSpan {
private final float mProportion;
private final float mProportion;
public RelativeSizeSpan(float proportion) {
mProportion = proportion;
}
public RelativeSizeSpan(float proportion) {
mProportion = proportion;
}
public RelativeSizeSpan(Parcel src) {
mProportion = src.readFloat();
@@ -45,17 +45,17 @@ public class RelativeSizeSpan extends MetricAffectingSpan implements ParcelableS
dest.writeFloat(mProportion);
}
public float getSizeChange() {
return mProportion;
}
public float getSizeChange() {
return mProportion;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setTextSize(ds.getTextSize() * mProportion);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setTextSize(ds.getTextSize() * mProportion);
}
@Override
public void updateMeasureState(TextPaint ds) {
ds.setTextSize(ds.getTextSize() * mProportion);
}
@Override
public void updateMeasureState(TextPaint ds) {
ds.setTextSize(ds.getTextSize() * mProportion);
}
}

View File

@@ -23,11 +23,11 @@ import android.text.TextUtils;
public class ScaleXSpan extends MetricAffectingSpan implements ParcelableSpan {
private final float mProportion;
private final float mProportion;
public ScaleXSpan(float proportion) {
mProportion = proportion;
}
public ScaleXSpan(float proportion) {
mProportion = proportion;
}
public ScaleXSpan(Parcel src) {
mProportion = src.readFloat();
@@ -45,17 +45,17 @@ public class ScaleXSpan extends MetricAffectingSpan implements ParcelableSpan {
dest.writeFloat(mProportion);
}
public float getScaleX() {
return mProportion;
}
public float getScaleX() {
return mProportion;
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setTextScaleX(ds.getTextScaleX() * mProportion);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setTextScaleX(ds.getTextScaleX() * mProportion);
}
@Override
public void updateMeasureState(TextPaint ds) {
ds.setTextScaleX(ds.getTextScaleX() * mProportion);
}
@Override
public void updateMeasureState(TextPaint ds) {
ds.setTextScaleX(ds.getTextScaleX() * mProportion);
}
}

View File

@@ -40,8 +40,8 @@ public class StrikethroughSpan extends CharacterStyle
public void writeToParcel(Parcel dest, int flags) {
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setStrikeThruText(true);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setStrikeThruText(true);
}
}

View File

@@ -33,17 +33,17 @@ import android.text.TextUtils;
*/
public class StyleSpan extends MetricAffectingSpan implements ParcelableSpan {
private final int mStyle;
private final int mStyle;
/**
*
* @param style An integer constant describing the style for this span. Examples
* include bold, italic, and normal. Values are constants defined
* in {@link android.graphics.Typeface}.
*/
public StyleSpan(int style) {
mStyle = style;
}
/**
*
* @param style An integer constant describing the style for this span. Examples
* include bold, italic, and normal. Values are constants defined
* in {@link android.graphics.Typeface}.
*/
public StyleSpan(int style) {
mStyle = style;
}
public StyleSpan(Parcel src) {
mStyle = src.readInt();
@@ -61,19 +61,19 @@ public class StyleSpan extends MetricAffectingSpan implements ParcelableSpan {
dest.writeInt(mStyle);
}
/**
* Returns the style constant defined in {@link android.graphics.Typeface}.
*/
public int getStyle() {
return mStyle;
}
/**
* Returns the style constant defined in {@link android.graphics.Typeface}.
*/
public int getStyle() {
return mStyle;
}
@Override
@Override
public void updateDrawState(TextPaint ds) {
apply(ds, mStyle);
}
@Override
@Override
public void updateMeasureState(TextPaint paint) {
apply(paint, mStyle);
}

View File

@@ -40,8 +40,8 @@ public class UnderlineSpan extends CharacterStyle
public void writeToParcel(Parcel dest, int flags) {
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setUnderlineText(true);
}
@Override
public void updateDrawState(TextPaint ds) {
ds.setUnderlineText(true);
}
}

View File

@@ -117,7 +117,7 @@ public class LocalePicker extends ListFragment {
/** - TODO: Enable when zz_ZY Pseudolocale is complete
* if (!localeList.contains("zz_ZY")) {
* localeList.add("zz_ZY");
* }
* }
*/
}
String[] locales = new String[localeList.size()];

View File

@@ -252,26 +252,26 @@ public class AccessPointParserHelper {
if (!validateEapValue(eapValue)) {
throw new SAXException();
}
if (eapValue.equals("TLS")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
} else if (eapValue.equals("TTLS")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TTLS);
} else if (eapValue.equals("PEAP")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.PEAP);
}
if (eapValue.equals("TLS")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
} else if (eapValue.equals("TTLS")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TTLS);
} else if (eapValue.equals("PEAP")) {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.PEAP);
}
eap = false;
}
if (phase2) {
String phase2Value = new String(ch, start, length);
if (phase2Value.equals("PAP")) {
if (phase2Value.equals("PAP")) {
config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.PAP);
} else if (phase2Value.equals("MSCHAP")) {
} else if (phase2Value.equals("MSCHAP")) {
config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAP);
} else if (phase2Value.equals("MSCHAPV2")) {
} else if (phase2Value.equals("MSCHAPV2")) {
config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAPV2);
} else if (phase2Value.equals("GTC")) {
} else if (phase2Value.equals("GTC")) {
config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
}
}
phase2 = false;
}
if (identity) {

View File

@@ -53,7 +53,7 @@ public class TranslucentFancyActivity extends Activity
* describe what is to be displayed in the screen.
*/
@Override
protected void onCreate(Bundle icicle)
protected void onCreate(Bundle icicle)
{
// Be sure to call the super class.
super.onCreate(icicle);

View File

@@ -32,7 +32,7 @@ public class AbortReceiver extends BroadcastReceiver
public void onReceive(Context context, Intent intent)
{
//Log.i("AbortReceiver", "onReceiveIntent!");
//Log.i("AbortReceiver", "onReceiveIntent!");
try {
IBinder caller = intent.getIBinderExtra("caller");
Parcel data = Parcel.obtain();

View File

@@ -24,19 +24,19 @@ import android.os.Process;
import android.util.Log;
public class RemoteSubActivityScreen extends SubActivityScreen {
Handler mHandler = new Handler();
boolean mFirst = false;
Handler mHandler = new Handler();
boolean mFirst = false;
public RemoteSubActivityScreen() {
}
@Override
public void onCreate(Bundle icicle) {
// We are running in a remote process, so want to have the sub-activity
// sending the result back in the original process.
// We are running in a remote process, so want to have the sub-activity
// sending the result back in the original process.
Intent intent = getIntent();
intent.setClass(this, SubActivityScreen.class);
intent.setClass(this, SubActivityScreen.class);
super.onCreate(icicle);
boolean kill = intent.getBooleanExtra("kill", false);
@@ -44,16 +44,16 @@ public class RemoteSubActivityScreen extends SubActivityScreen {
// + " kill=" + kill);
if (kill) {
// After finishing initialization, kill the process! But only if
// this is the first time...
if (icicle == null) {
mHandler.post(new Runnable() {
public void run() {
handleBeforeStopping();
Process.killProcess(Process.myPid());
}
});
}
// After finishing initialization, kill the process! But only if
// this is the first time...
if (icicle == null) {
mHandler.post(new Runnable() {
public void run() {
handleBeforeStopping();
Process.killProcess(Process.myPid());
}
});
}
}
}
}

View File

@@ -44,24 +44,24 @@ public class SubActivityScreen extends Activity {
// Move on to the next thing that will generate a result... but only
// if we are being launched for the first time.
if (icicle == null) {
if (mMode == PENDING_RESULT_MODE) {
PendingIntent apr = createPendingResult(1, null,
Intent.FILL_IN_ACTION);
Intent res = new Intent();
if (mMode == PENDING_RESULT_MODE) {
PendingIntent apr = createPendingResult(1, null,
Intent.FILL_IN_ACTION);
Intent res = new Intent();
res.putExtra("tkey", "tval");
res.setAction("test");
try {
apr.send(this, RESULT_OK, res);
} catch (PendingIntent.CanceledException e) {
}
} else if (mMode < CHILD_OFFSET) {
Intent intent = new Intent();
intent.setClass(this, SubActivityScreen.class);
intent.putExtra("mode", CHILD_OFFSET+mMode);
//System.out.println("*** Starting from onStart: " + intent);
startActivityForResult(intent, 1);
return;
}
try {
apr.send(this, RESULT_OK, res);
} catch (PendingIntent.CanceledException e) {
}
} else if (mMode < CHILD_OFFSET) {
Intent intent = new Intent();
intent.setClass(this, SubActivityScreen.class);
intent.putExtra("mode", CHILD_OFFSET+mMode);
//System.out.println("*** Starting from onStart: " + intent);
startActivityForResult(intent, 1);
return;
}
}
}
@@ -77,15 +77,15 @@ public class SubActivityScreen extends Activity {
//Log.i("foo", "SubActivityScreen pid=" + Process.myPid() + " onResume");
if (mMode >= CHILD_OFFSET) {
// Wait a little bit, to give our parent time to kill itself
// if that is something it is into.
try {
Thread.sleep(500);
} catch (InterruptedException e) {
setResult(RESULT_CANCELED, (new Intent()).setAction("Interrupted!"));
finish();
return;
}
// Wait a little bit, to give our parent time to kill itself
// if that is something it is into.
try {
Thread.sleep(500);
} catch (InterruptedException e) {
setResult(RESULT_CANCELED, (new Intent()).setAction("Interrupted!"));
finish();
return;
}
//System.out.println("Resuming sub-activity: mode=" + mMode);
switch (mMode-CHILD_OFFSET) {
case NO_RESULT_MODE:

View File

@@ -51,8 +51,8 @@ public class DatabaseCursorTest extends AndroidTestCase implements PerformanceTe
@Override
protected void setUp() throws Exception {
super.setUp();
File dbDir = getContext().getDir("tests", Context.MODE_PRIVATE);
mDatabaseFile = new File(dbDir, "database_test.db");
File dbDir = getContext().getDir("tests", Context.MODE_PRIVATE);
mDatabaseFile = new File(dbDir, "database_test.db");
if (mDatabaseFile.exists()) {
mDatabaseFile.delete();

View File

@@ -41,8 +41,8 @@ public class DatabaseStatementTest extends AndroidTestCase implements Performanc
@Override
protected void setUp() throws Exception {
super.setUp();
File dbDir = getContext().getDir("tests", Context.MODE_PRIVATE);
mDatabaseFile = new File(dbDir, "database_test.db");
File dbDir = getContext().getDir("tests", Context.MODE_PRIVATE);
mDatabaseFile = new File(dbDir, "database_test.db");
if (mDatabaseFile.exists()) {
mDatabaseFile.delete();

View File

@@ -21,11 +21,11 @@ public class LayerRasterizer extends Rasterizer {
native_instance = nativeConstructor();
}
/** Add a new layer (above any previous layers) to the rasterizer.
The layer will extract those fields that affect the mask from
the specified paint, but will not retain a reference to the paint
object itself, so it may be reused without danger of side-effects.
*/
/** Add a new layer (above any previous layers) to the rasterizer.
The layer will extract those fields that affect the mask from
the specified paint, but will not retain a reference to the paint
object itself, so it may be reused without danger of side-effects.
*/
public void addLayer(Paint paint, float dx, float dy) {
nativeAddLayer(native_instance, paint.mNativePaint, dx, dy);
}

View File

@@ -38,7 +38,7 @@ public class LinearGradient extends Shader {
private TileMode mTileMode;
/** Create a shader that draws a linear gradient along a line.
/** Create a shader that draws a linear gradient along a line.
@param x0 The x-coordinate for the start of the gradient line
@param y0 The y-coordinate for the start of the gradient line
@param x1 The x-coordinate for the end of the gradient line
@@ -48,8 +48,8 @@ public class LinearGradient extends Shader {
each corresponding color in the colors array. If this is null,
the the colors are distributed evenly along the gradient line.
@param tile The Shader tiling mode
*/
public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[],
*/
public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[],
TileMode tile) {
if (colors.length < 2) {
throw new IllegalArgumentException("needs >= 2 number of colors");
@@ -70,7 +70,7 @@ public class LinearGradient extends Shader {
tile.nativeInt);
}
/** Create a shader that draws a linear gradient along a line.
/** Create a shader that draws a linear gradient along a line.
@param x0 The x-coordinate for the start of the gradient line
@param y0 The y-coordinate for the start of the gradient line
@param x1 The x-coordinate for the end of the gradient line
@@ -78,8 +78,8 @@ public class LinearGradient extends Shader {
@param color0 The color at the start of the gradient line.
@param color1 The color at the end of the gradient line.
@param tile The Shader tiling mode
*/
public LinearGradient(float x0, float y0, float x1, float y1, int color0, int color1,
*/
public LinearGradient(float x0, float y0, float x1, float y1, int color0, int color1,
TileMode tile) {
mType = TYPE_COLOR_START_AND_COLOR_END;
mX0 = x0;
@@ -118,7 +118,7 @@ public class LinearGradient extends Shader {
private native long nativeCreate1(float x0, float y0, float x1, float y1,
int colors[], float positions[], int tileMode);
private native long nativeCreate2(float x0, float y0, float x1, float y1,
private native long nativeCreate2(float x0, float y0, float x1, float y1,
int color0, int color1, int tileMode);
private native long nativePostCreate1(long native_shader, float x0, float y0, float x1, float y1,
int colors[], float positions[], int tileMode);

View File

@@ -37,17 +37,17 @@ public class RadialGradient extends Shader {
private TileMode mTileMode;
/** Create a shader that draws a radial gradient given the center and radius.
/** Create a shader that draws a radial gradient given the center and radius.
@param x The x-coordinate of the center of the radius
@param y The y-coordinate of the center of the radius
@param radius Must be positive. The radius of the circle for this gradient
@param radius Must be positive. The radius of the circle for this gradient
@param colors The colors to be distributed between the center and edge of the circle
@param positions May be NULL. The relative position of
each corresponding color in the colors array. If this is NULL,
the the colors are distributed evenly between the center and edge of the circle.
@param tile The Shader tiling mode
*/
public RadialGradient(float x, float y, float radius,
*/
public RadialGradient(float x, float y, float radius,
int colors[], float positions[], TileMode tile) {
if (radius <= 0) {
throw new IllegalArgumentException("radius must be > 0");
@@ -70,15 +70,15 @@ public class RadialGradient extends Shader {
tile.nativeInt);
}
/** Create a shader that draws a radial gradient given the center and radius.
/** Create a shader that draws a radial gradient given the center and radius.
@param x The x-coordinate of the center of the radius
@param y The y-coordinate of the center of the radius
@param radius Must be positive. The radius of the circle for this gradient
@param radius Must be positive. The radius of the circle for this gradient
@param color0 The color at the center of the circle.
@param color1 The color at the edge of the circle.
@param tile The Shader tiling mode
*/
public RadialGradient(float x, float y, float radius,
*/
public RadialGradient(float x, float y, float radius,
int color0, int color1, TileMode tile) {
if (radius <= 0) {
throw new IllegalArgumentException("radius must be > 0");
@@ -119,7 +119,7 @@ public class RadialGradient extends Shader {
private static native long nativeCreate1(float x, float y, float radius,
int colors[], float positions[], int tileMode);
private static native long nativeCreate2(float x, float y, float radius,
private static native long nativeCreate2(float x, float y, float radius,
int color0, int color1, int tileMode);
private static native long nativePostCreate1(long native_shader, float x, float y, float radius,

View File

@@ -1610,7 +1610,7 @@ public class LocationManager {
* @hide
*/
public boolean sendNiResponse(int notifId, int userResponse) {
try {
try {
return mService.sendNiResponse(notifId, userResponse);
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in sendNiResponse: ", e);

View File

@@ -85,8 +85,8 @@ public class MediaInserterTest extends InstrumentationTestCase {
super.setUp();
mMockProvider = EasyMock.createMock(IContentProvider.class);
mMediaInserter = new MediaInserter(mMockProvider,
mPackageName, TEST_BUFFER_SIZE);
mPackageName = getInstrumentation().getContext().getPackageName();
mPackageName, TEST_BUFFER_SIZE);
mPackageName = getInstrumentation().getContext().getPackageName();
mFilesCounter = 0;
mAudioCounter = 0;
mVideoCounter = 0;
@@ -224,19 +224,19 @@ public class MediaInserterTest extends InstrumentationTestCase {
@SmallTest
public void testInsertContentsWithDifferentSizePerContentType() throws Exception {
EasyMock.expect(mMockProvider.bulkInsert(mPackageName,
MediaUriMatcher.expectMediaUri(sFilesUri),
MediaUriMatcher.expectMediaUri(sFilesUri),
(ContentValues[]) EasyMock.anyObject())).andReturn(1);
EasyMock.expectLastCall().times(1);
EasyMock.expect(mMockProvider.bulkInsert(mPackageName,
MediaUriMatcher.expectMediaUri(sAudioUri),
MediaUriMatcher.expectMediaUri(sAudioUri),
(ContentValues[]) EasyMock.anyObject())).andReturn(1);
EasyMock.expectLastCall().times(2);
EasyMock.expect(mMockProvider.bulkInsert(mPackageName,
MediaUriMatcher.expectMediaUri(sVideoUri),
MediaUriMatcher.expectMediaUri(sVideoUri),
(ContentValues[]) EasyMock.anyObject())).andReturn(1);
EasyMock.expectLastCall().times(3);
EasyMock.expect(mMockProvider.bulkInsert(mPackageName,
MediaUriMatcher.expectMediaUri(sImagesUri),
MediaUriMatcher.expectMediaUri(sImagesUri),
(ContentValues[]) EasyMock.anyObject())).andReturn(1);
EasyMock.expectLastCall().times(4);
EasyMock.replay(mMockProvider);

View File

@@ -262,7 +262,7 @@ public class GLES10 {
native private static void _nativeClassInit();
static {
_nativeClassInit();
_nativeClassInit();
}
private static Buffer _colorPointer;

View File

@@ -22,7 +22,7 @@ package android.opengl;
public class GLES10Ext {
native private static void _nativeClassInit();
static {
_nativeClassInit();
_nativeClassInit();
}
// C function GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent )

View File

@@ -147,7 +147,7 @@ public class GLES11 extends GLES10 {
native private static void _nativeClassInit();
static {
_nativeClassInit();
_nativeClassInit();
}
private static Buffer _pointSizePointerOES;

View File

@@ -132,7 +132,7 @@ public class GLES11Ext {
native private static void _nativeClassInit();
static {
_nativeClassInit();
_nativeClassInit();
}
private static final int GL_BYTE = GLES10.GL_BYTE;

View File

@@ -864,13 +864,13 @@ public class GLES30 extends GLES20 {
int buffer
);
// C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode )
// C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode )
public static native void glTransformFeedbackVaryings(
public static native void glTransformFeedbackVaryings(
int program,
String[] varyings,
int bufferMode
);
);
// C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name )
@@ -1245,14 +1245,14 @@ public class GLES30 extends GLES20 {
int size
);
// C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
// C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
public static native void glGetUniformIndices(
public static native void glGetUniformIndices(
int program,
String[] uniformNames,
int[] uniformIndices,
int uniformIndicesOffset
);
);
// C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )

View File

@@ -39,7 +39,7 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
native private static void _nativeClassInit();
static {
_nativeClassInit();
_nativeClassInit();
}
Buffer _colorPointer = null;

View File

@@ -1005,7 +1005,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
mState = BluetoothAdapter.STATE_OFF;
// enable
handleEnable(mQuietEnable);
} else if (mBinding || mBluetooth != null) {
} else if (mBinding || mBluetooth != null) {
Message userMsg = mHandler.obtainMessage(MESSAGE_USER_SWITCHED);
userMsg.arg2 = 1 + msg.arg2;
// if user is switched when service is being binding
@@ -1014,7 +1014,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
if (DBG) {
Log.d(TAG, "delay MESSAGE_USER_SWITCHED " + userMsg.arg2);
}
}
}
break;
}
}

View File

@@ -598,7 +598,7 @@ final class ActivityRecord {
int requestCode, int resultCode,
Intent resultData) {
ActivityResult r = new ActivityResult(from, resultWho,
requestCode, resultCode, resultData);
requestCode, resultCode, resultData);
if (results == null) {
results = new ArrayList<ResultInfo>();
}

View File

@@ -523,7 +523,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
}
void pauseChildStacks(ActivityRecord parent, boolean userLeaving, boolean uiSleeping) {
// TODO: Put all stacks in supervisor and iterate through them instead.
// TODO: Put all stacks in supervisor and iterate through them instead.
for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {

View File

@@ -226,9 +226,9 @@ public class AccountManagerServiceTest extends AndroidTestCase {
final Handler handler) {
}
@Override
public void invalidateCache(int userId) {
}
@Override
public void invalidateCache(int userId) {
}
}
static public class MyMockContext extends MockContext {

View File

@@ -12,7 +12,7 @@ import junit.framework.*;
public interface FailureDetailView {
// The following definition was removed for compatibility with Android
// libraries.
// /**
// /**
// * Returns the component used to present the TraceView
// */
// public Component getComponent();

View File

@@ -117,7 +117,7 @@ public class GraphReader {
}
@Override
public void execute(CommandStack stack) {
public void execute(CommandStack stack) {
Filter filter = null;
try {
filter = stack.getFactory().createFilterByClassName(mClassName,

View File

@@ -81,11 +81,11 @@ public class InputTypeActivity extends Activity {
/* Uri Edit Text */
mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT|EditorInfo.TYPE_TEXT_VARIATION_URI,
R.string.uri_edit_text_label));
R.string.uri_edit_text_label));
/* Email Address Edit Text */
mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT|EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS,
R.string.email_address_edit_text_label));
R.string.email_address_edit_text_label));
/* Email Subject Text */
mLayout.addView(buildEntryView(EditorInfo.TYPE_CLASS_TEXT|EditorInfo.TYPE_TEXT_VARIATION_EMAIL_SUBJECT,
@@ -142,7 +142,7 @@ public class InputTypeActivity extends Activity {
private View buildEntryView(int inputType, int label) {
View view = mInflater.inflate(R.layout.sample_edit_text, mParent, false);
View view = mInflater.inflate(R.layout.sample_edit_text, mParent, false);
EditText editText = (EditText) view.findViewById(R.id.data);
editText.setInputType(inputType);

View File

@@ -24,26 +24,26 @@ import com.android.imftest.R;
public class BigEditTextActivityNonScrollablePanScanTests extends ImfBaseTestCase<BigEditTextActivityNonScrollablePanScan> {
public final String TAG = "BigEditTextActivityNonScrollablePanScanTests";
public final String TAG = "BigEditTextActivityNonScrollablePanScanTests";
public BigEditTextActivityNonScrollablePanScanTests() {
super(BigEditTextActivityNonScrollablePanScan.class);
}
@LargeTest
public void testAppAdjustmentPanScan() {
// Give the IME 2 seconds to appear.
pause(2000);
@LargeTest
public void testAppAdjustmentPanScan() {
// Give the IME 2 seconds to appear.
pause(2000);
View rootView = ((BigEditTextActivityNonScrollablePanScan) mTargetActivity).getRootView();
View servedView = ((BigEditTextActivityNonScrollablePanScan) mTargetActivity).getDefaultFocusedView();
assertNotNull(rootView);
assertNotNull(servedView);
destructiveCheckImeInitialState(rootView, servedView);
View rootView = ((BigEditTextActivityNonScrollablePanScan) mTargetActivity).getRootView();
View servedView = ((BigEditTextActivityNonScrollablePanScan) mTargetActivity).getDefaultFocusedView();
assertNotNull(rootView);
assertNotNull(servedView);
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -24,14 +24,14 @@ import com.android.imftest.R;
public class BigEditTextActivityNonScrollableResizeTests extends ImfBaseTestCase<BigEditTextActivityNonScrollableResize> {
public final String TAG = "BigEditTextActivityNonScrollableResizeTests";
public final String TAG = "BigEditTextActivityNonScrollableResizeTests";
public BigEditTextActivityNonScrollableResizeTests() {
super(BigEditTextActivityNonScrollableResize.class);
}
@LargeTest
public void testAppAdjustmentPanScan() { // Give the IME 2 seconds to appear.
@LargeTest
public void testAppAdjustmentPanScan() { // Give the IME 2 seconds to appear.
pause(2000);
View rootView = ((BigEditTextActivityNonScrollableResize) mTargetActivity).getRootView();
@@ -43,6 +43,6 @@ public class BigEditTextActivityNonScrollableResizeTests extends ImfBaseTestCase
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -24,14 +24,14 @@ import com.android.imftest.R;
public class BigEditTextActivityScrollablePanScanTests extends ImfBaseTestCase<BigEditTextActivityScrollablePanScan> {
public final String TAG = "BigEditTextActivityScrollablePanScanTests";
public final String TAG = "BigEditTextActivityScrollablePanScanTests";
public BigEditTextActivityScrollablePanScanTests() {
super(BigEditTextActivityScrollablePanScan.class);
}
@LargeTest
public void testAppAdjustmentPanScan() { // Give the IME 2 seconds to appear.
@LargeTest
public void testAppAdjustmentPanScan() { // Give the IME 2 seconds to appear.
pause(2000);
View rootView = ((BigEditTextActivityScrollablePanScan) mTargetActivity).getRootView();
@@ -43,6 +43,6 @@ public class BigEditTextActivityScrollablePanScanTests extends ImfBaseTestCase<B
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -24,15 +24,15 @@ import com.android.imftest.R;
public class BigEditTextActivityScrollableResizeTests extends ImfBaseTestCase<BigEditTextActivityScrollableResize> {
public final String TAG = "BigEditTextActivityScrollableResizeTests";
public final String TAG = "BigEditTextActivityScrollableResizeTests";
public BigEditTextActivityScrollableResizeTests() {
super(BigEditTextActivityScrollableResize.class);
}
@LargeTest
public void testAppAdjustmentPanScan() {
// Give the IME 2 seconds to appear.
@LargeTest
public void testAppAdjustmentPanScan() {
// Give the IME 2 seconds to appear.
pause(2000);
View rootView = ((BigEditTextActivityScrollableResize) mTargetActivity).getRootView();
@@ -44,6 +44,6 @@ public class BigEditTextActivityScrollableResizeTests extends ImfBaseTestCase<Bi
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -24,14 +24,14 @@ import com.android.imftest.R;
public class BottomEditTextActivityPanScanTests extends ImfBaseTestCase<BottomEditTextActivityPanScan> {
public final String TAG = "BottomEditTextActivityPanScanTests";
public final String TAG = "BottomEditTextActivityPanScanTests";
public BottomEditTextActivityPanScanTests() {
super(BottomEditTextActivityPanScan.class);
}
@LargeTest
public void testAppAdjustmentPanScan() {
@LargeTest
public void testAppAdjustmentPanScan() {
// Give the IME 2 seconds to appear.
pause(2000);
@@ -44,6 +44,6 @@ public class BottomEditTextActivityPanScanTests extends ImfBaseTestCase<BottomEd
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -23,8 +23,8 @@ import android.widget.Button;
public class ButtonActivityTest extends ImfBaseTestCase<ButtonActivity> {
final public String TAG = "ButtonActivityTest";
final public String TAG = "ButtonActivityTest";
public ButtonActivityTest() {
super(ButtonActivity.class);
}

View File

@@ -22,21 +22,21 @@ import android.view.View;
public class OneEditTextActivityNotSelectedTests extends ImfBaseTestCase<OneEditTextActivityNotSelected> {
public final String TAG = "OneEditTextActivityNotSelectedTests";
public final String TAG = "OneEditTextActivityNotSelectedTests";
public OneEditTextActivityNotSelectedTests() {
super(OneEditTextActivityNotSelected.class);
}
@LargeTest
public void testSoftKeyboardNoAutoPop() {
// Give the IME 2 seconds to appear.
pause(2000);
assertFalse(mImm.isAcceptingText());
View rootView = ((OneEditTextActivityNotSelected) mTargetActivity).getRootView();
@LargeTest
public void testSoftKeyboardNoAutoPop() {
// Give the IME 2 seconds to appear.
pause(2000);
assertFalse(mImm.isAcceptingText());
View rootView = ((OneEditTextActivityNotSelected) mTargetActivity).getRootView();
View servedView = ((OneEditTextActivityNotSelected) mTargetActivity).getDefaultFocusedView();
assertNotNull(rootView);
@@ -45,6 +45,6 @@ public class OneEditTextActivityNotSelectedTests extends ImfBaseTestCase<OneEdit
destructiveCheckImeInitialState(rootView, servedView);
verifyEditTextAdjustment(servedView, rootView.getMeasuredHeight());
}
}
}

View File

@@ -37,7 +37,7 @@ public class ActivityManagerPermissionTests extends TestCase {
}
@SmallTest
public void testREORDER_TASKS() {
public void testREORDER_TASKS() {
try {
mAm.moveTaskToFront(0, 0, null);
fail("IActivityManager.moveTaskToFront did not throw SecurityException as"
@@ -67,7 +67,7 @@ public class ActivityManagerPermissionTests extends TestCase {
} catch (RemoteException e) {
fail("Unexpected remote exception");
}
}
}
@SmallTest
public void testCHANGE_CONFIGURATION() {

View File

@@ -32,7 +32,7 @@ import junit.framework.TestCase;
*/
public class ServiceManagerPermissionTests extends TestCase {
@SmallTest
public void testAddService() {
public void testAddService() {
try {
// The security in the service manager is that you can't replace
// a service that is already published.
@@ -43,7 +43,7 @@ public class ServiceManagerPermissionTests extends TestCase {
} catch (SecurityException e) {
// expected
}
}
}
@SmallTest
public void testSetPermissionController() {

View File

@@ -41,7 +41,7 @@ public class WindowManagerPermissionTests extends TestCase {
}
@SmallTest
public void testMANAGE_APP_TOKENS() {
public void testMANAGE_APP_TOKENS() {
try {
mWm.pauseKeyDispatching(null);
fail("IWindowManager.pauseKeyDispatching did not throw SecurityException as"