Skip to content
Snippets Groups Projects
Commit 9000f7ab authored by Cole Faust's avatar Cole Faust Committed by Automerger Merge Worker
Browse files

Fix errorprone warnings that should be errors am: 50b73ca5 am: f812cb35

parents 1b37d166 f812cb35
No related branches found
No related tags found
No related merge requests found
......@@ -394,7 +394,7 @@ class DefaultApnSettingsLoader implements ApnSettingsLoader {
private void loadFromResources(final int subId, final String apnName, final List<Apn> apns) {
Log.i(MmsService.TAG, "Loading APNs from resources, apnName=" + apnName);
final int[] mccMnc = Utils.getMccMnc(mContext, subId);
if (mccMnc[0] == 0 && mccMnc[0] == 0) {
if (mccMnc[0] == 0) {
Log.w(MmsService.TAG, "Can not get valid mcc/mnc from system");
return;
}
......
......@@ -188,7 +188,6 @@ public class EncodedStringValue implements Cloneable {
*/
@Override
public Object clone() throws CloneNotSupportedException {
super.clone();
int len = mData.length;
byte[] dstBytes = new byte[len];
System.arraycopy(mData, 0, dstBytes, 0, len);
......
......@@ -190,7 +190,7 @@ public class DatabaseWrapper {
}
if (mLog) {
printTiming(t1, String.format(Locale.US,
"insertWithOnConflict with ", searchTable));
"insertWithOnConflict with %s", searchTable));
}
}
......
......@@ -203,7 +203,6 @@ public class EncodedStringValue implements Cloneable {
*/
@Override
public Object clone() throws CloneNotSupportedException {
super.clone();
int len = mData.length;
byte[] dstBytes = new byte[len];
System.arraycopy(mData, 0, dstBytes, 0, len);
......
......@@ -360,6 +360,7 @@ public class ConversationActivity extends BugleActionBarActivity
return mUiState.shouldResumeComposeMessage();
}
@SuppressWarnings("MissingSuperCall") // TODO: fix me
@Override
protected void onActivityResult(final int requestCode, final int resultCode,
final Intent data) {
......
......@@ -105,6 +105,7 @@ public abstract class AbstractConversationListActivity extends BugleActionBarAc
return isInConversationListSelectMode();
}
@SuppressWarnings("MissingSuperCall") // TODO: fix me
@Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
}
......
......@@ -44,10 +44,14 @@ public class CameraManagerTest extends BugleTestCase {
CameraManager.setCameraWrapper(MockCameraFactory.createCameraWrapper());
assertEquals(false, CameraManager.get().hasAnyCamera());
assertEquals(false, CameraManager.get().hasFrontAndBackCamera());
boolean threw = false;
try {
CameraManager.get().selectCamera(CameraInfo.CAMERA_FACING_BACK);
fail("selectCamera should have thrown");
} catch (AssertionError e) {
threw = true;
}
if (!threw) {
fail("selectCamera should have thrown");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment