aboutsummaryrefslogtreecommitdiffstats
path: root/cgeo-contacts/src
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-07-17 19:20:35 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-07-17 19:20:35 +0200
commit65eb16770153f1751c353713b7b4a355470954ad (patch)
tree52fdfcbe990f1106b61cba40bc4dc67840cdfe44 /cgeo-contacts/src
parentdf8983c679179c1713ee711d7afed484d617e36c (diff)
downloadcgeo-65eb16770153f1751c353713b7b4a355470954ad.zip
cgeo-65eb16770153f1751c353713b7b4a355470954ad.tar.gz
cgeo-65eb16770153f1751c353713b7b4a355470954ad.tar.bz2
switch to Java 1.7
At least since march both ADT and Android Studio support Java 7 features in Android development. Let's use them.
Diffstat (limited to 'cgeo-contacts/src')
-rw-r--r--cgeo-contacts/src/cgeo/contacts/ContactsActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java b/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
index 098f5b9..bbda493 100644
--- a/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
+++ b/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
@@ -73,7 +73,7 @@ public final class ContactsActivity extends Activity {
}
private void selectContact(final List<Pair<Integer, String>> contacts) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (Pair<Integer, String> p : contacts) {
list.add(p.second);
}
@@ -105,13 +105,13 @@ public final class ContactsActivity extends Activity {
final String[] selectionArgs = new String[] { like ? "%" + searchName + "%" : searchName };
Cursor cursor = null;
- List<Pair<Integer, String>> result = new ArrayList<Pair<Integer, String>>();
+ List<Pair<Integer, String>> result = new ArrayList<>();
try {
cursor = getContentResolver().query(uri, projection, selection, selectionArgs, null);
while (cursor != null && cursor.moveToNext()) {
int foundId = cursor.getInt(0);
String foundName = cursor.getString(1);
- result.add(new Pair<Integer, String>(foundId, foundName));
+ result.add(new Pair<>(foundId, foundName));
}
} catch (Exception e) {
Log.e(LOG_TAG, "ContactsActivity.getContactId", e);