mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081401: Remove unnecessary autoboxing. r=rnewman
This commit is contained in:
parent
d70c7ef050
commit
637bf7a19b
@ -671,7 +671,7 @@ public class ContactService implements GeckoEventListener {
|
||||
if (typeConstant == BaseTypes.TYPE_CUSTOM) {
|
||||
type = cursor.getString(cursor.getColumnIndex(typeLabelColumn));
|
||||
} else {
|
||||
type = getKeyFromMapValue(typeMap, Integer.valueOf(typeConstant));
|
||||
type = getKeyFromMapValue(typeMap, typeConstant);
|
||||
}
|
||||
|
||||
// Since an object may have multiple types, it may have already been added,
|
||||
@ -712,7 +712,7 @@ public class ContactService implements GeckoEventListener {
|
||||
if (typeConstant == Phone.TYPE_CUSTOM) {
|
||||
type = cursor.getString(cursor.getColumnIndex(Phone.LABEL));
|
||||
} else {
|
||||
type = getKeyFromMapValue(mPhoneTypesMap, Integer.valueOf(typeConstant));
|
||||
type = getKeyFromMapValue(mPhoneTypesMap, typeConstant);
|
||||
}
|
||||
|
||||
// Since a phone may have multiple types, it may have already been added,
|
||||
@ -759,7 +759,7 @@ public class ContactService implements GeckoEventListener {
|
||||
if (typeConstant == StructuredPostal.TYPE_CUSTOM) {
|
||||
type = cursor.getString(cursor.getColumnIndex(StructuredPostal.LABEL));
|
||||
} else {
|
||||
type = getKeyFromMapValue(mAddressTypesMap, Integer.valueOf(typeConstant));
|
||||
type = getKeyFromMapValue(mAddressTypesMap, typeConstant);
|
||||
}
|
||||
|
||||
// Since an email may have multiple types, it may have already been added,
|
||||
@ -984,7 +984,7 @@ public class ContactService implements GeckoEventListener {
|
||||
}
|
||||
|
||||
String returnStatus = "KO";
|
||||
Long newRawContactId = new Long(-1);
|
||||
Long newRawContactId = -1L;
|
||||
|
||||
// Insert the contact!
|
||||
ContentProviderResult[] insertResults = applyBatch(newContactOptions);
|
||||
@ -1476,7 +1476,7 @@ public class ContactService implements GeckoEventListener {
|
||||
|
||||
private void getContactsCount(final String requestID) {
|
||||
Cursor cursor = getAllRawContactIdsCursor();
|
||||
Integer numContacts = Integer.valueOf(cursor.getCount());
|
||||
Integer numContacts = cursor.getCount();
|
||||
cursor.close();
|
||||
|
||||
sendCallbackToJavascript("Android:Contacts:Count", requestID, new String[] {"count"},
|
||||
|
@ -103,7 +103,8 @@ public abstract class AbstractTransactionalProvider extends ContentProvider {
|
||||
if (isInBatch == null) {
|
||||
return false;
|
||||
}
|
||||
return isInBatch.booleanValue();
|
||||
|
||||
return isInBatch;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1065,7 +1065,7 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
|
||||
Long additional = values.getAsLong(History.VISITS);
|
||||
|
||||
// Increment visit count by a specified amount, or default to increment by 1
|
||||
values.put(History.VISITS, existing + ((additional != null) ? additional.longValue() : 1));
|
||||
values.put(History.VISITS, existing + ((additional != null) ? additional : 1));
|
||||
}
|
||||
|
||||
updated += db.update(TABLE_HISTORY, values, "_id = ?",
|
||||
|
@ -11,6 +11,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import android.os.Build;
|
||||
import org.json.JSONObject;
|
||||
import org.mozilla.gecko.AppConstants;
|
||||
import org.mozilla.gecko.AppConstants.Versions;
|
||||
@ -36,6 +37,7 @@ import org.mozilla.gecko.TelemetryContract.Method;
|
||||
import org.mozilla.gecko.background.common.GlobalConstants;
|
||||
import org.mozilla.gecko.background.healthreport.HealthReportConstants;
|
||||
import org.mozilla.gecko.db.BrowserContract.SuggestedSites;
|
||||
import org.mozilla.gecko.updater.UpdateServiceHelper;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
@ -325,7 +327,7 @@ OnSharedPreferenceChangeListener
|
||||
// all) in the action bar.
|
||||
updateActionBarTitle(R.string.settings_title);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < 13) {
|
||||
if (Build.VERSION.SDK_INT < 13) {
|
||||
// Affected by Bug 1015209 -- no detach/attach.
|
||||
// If we try rejigging fragments, we'll crash, so don't
|
||||
// enable locale switching at all.
|
||||
@ -1056,17 +1058,17 @@ OnSharedPreferenceChangeListener
|
||||
if (PREFS_MENU_CHAR_ENCODING.equals(prefName)) {
|
||||
setCharEncodingState(((String) newValue).equals("true"));
|
||||
} else if (PREFS_UPDATER_AUTODOWNLOAD.equals(prefName)) {
|
||||
org.mozilla.gecko.updater.UpdateServiceHelper.registerForUpdates(this, (String) newValue);
|
||||
UpdateServiceHelper.registerForUpdates(this, (String) newValue);
|
||||
} else if (PREFS_HEALTHREPORT_UPLOAD_ENABLED.equals(prefName)) {
|
||||
// The healthreport pref only lives in Android, so we do not persist
|
||||
// to Gecko, but we do broadcast intent to the health report
|
||||
// background uploader service, which will start or stop the
|
||||
// repeated background upload attempts.
|
||||
broadcastHealthReportUploadPref(this, ((Boolean) newValue).booleanValue());
|
||||
broadcastHealthReportUploadPref(this, (Boolean) newValue);
|
||||
} else if (PREFS_GEO_REPORTING.equals(prefName)) {
|
||||
broadcastStumblerPref(this, ((Boolean) newValue).booleanValue());
|
||||
broadcastStumblerPref(this, (Boolean) newValue);
|
||||
// Translate boolean value to int for geo reporting pref.
|
||||
newValue = ((Boolean) newValue) ? 1 : 0;
|
||||
newValue = (Boolean) newValue ? 1 : 0;
|
||||
} else if (handlers.containsKey(prefName)) {
|
||||
PrefHandler handler = handlers.get(prefName);
|
||||
handler.onChange(this, preference, newValue);
|
||||
|
@ -103,7 +103,7 @@ public class IconGridInput extends PromptInput implements OnItemClickListener {
|
||||
|
||||
@Override
|
||||
public Object getValue() {
|
||||
return new Integer(mSelected);
|
||||
return mSelected;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -311,7 +311,7 @@ public class PromptInput {
|
||||
|
||||
@Override
|
||||
public Object getValue() {
|
||||
return new Integer(spinner.getSelectedItemPosition());
|
||||
return spinner.getSelectedItemPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ class DatabaseHelper {
|
||||
// About the same implementation as getFolderIdFromGuid from LocalBrowserDB because it is declared private and we can't use reflections to access it
|
||||
protected long getFolderIdFromGuid(String guid) {
|
||||
ContentResolver resolver = mActivity.getContentResolver();
|
||||
long folderId = Long.valueOf(-1);
|
||||
long folderId = -1L;
|
||||
Uri bookmarksUri = buildUri(BrowserDataType.BOOKMARKS);
|
||||
Cursor c = null;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user