diff options
author | Vasu Nori <vnori@google.com> | 2011-01-27 15:00:38 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-27 15:00:38 -0800 |
commit | 242fa0eb73d555eb025c39cf212030f00cb53cb4 (patch) | |
tree | c30d2031e593792ec90424592c8caeeb3314d34f | |
parent | 57e7aa12d960cc20b2620b367be39e921f1a145d (diff) | |
parent | ce3b35a7b0b80061692d9fa1977cee68b365728c (diff) | |
download | frameworks_base-242fa0eb73d555eb025c39cf212030f00cb53cb4.zip frameworks_base-242fa0eb73d555eb025c39cf212030f00cb53cb4.tar.gz frameworks_base-242fa0eb73d555eb025c39cf212030f00cb53cb4.tar.bz2 |
am ce3b35a7: Merge "bug:3398527 return List insttead of ArrayList from public API" into honeycomb
* commit 'ce3b35a7b0b80061692d9fa1977cee68b365728c':
bug:3398527 return List insttead of ArrayList from public API
-rw-r--r-- | api/11.xml | 2 | ||||
-rw-r--r-- | api/current.xml | 2 | ||||
-rw-r--r-- | core/java/android/database/DefaultDatabaseErrorHandler.java | 4 | ||||
-rw-r--r-- | core/java/android/database/sqlite/SQLiteDatabase.java | 7 | ||||
-rw-r--r-- | core/tests/coretests/src/android/database/DatabaseGeneralTest.java | 3 |
5 files changed, 10 insertions, 8 deletions
@@ -70101,7 +70101,7 @@ </parameter> </method> <method name="getAttachedDbs" - return="java.util.ArrayList<android.util.Pair<java.lang.String, java.lang.String>>" + return="java.util.List<android.util.Pair<java.lang.String, java.lang.String>>" abstract="false" native="false" synchronized="false" diff --git a/api/current.xml b/api/current.xml index b6aabb7..d3b61e8 100644 --- a/api/current.xml +++ b/api/current.xml @@ -70123,7 +70123,7 @@ </parameter> </method> <method name="getAttachedDbs" - return="java.util.ArrayList<android.util.Pair<java.lang.String, java.lang.String>>" + return="java.util.List<android.util.Pair<java.lang.String, java.lang.String>>" abstract="false" native="false" synchronized="false" diff --git a/core/java/android/database/DefaultDatabaseErrorHandler.java b/core/java/android/database/DefaultDatabaseErrorHandler.java index 61337dd..a9e39c3 100644 --- a/core/java/android/database/DefaultDatabaseErrorHandler.java +++ b/core/java/android/database/DefaultDatabaseErrorHandler.java @@ -16,7 +16,7 @@ package android.database; import java.io.File; -import java.util.ArrayList; +import java.util.List; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; @@ -65,7 +65,7 @@ public final class DefaultDatabaseErrorHandler implements DatabaseErrorHandler { return; } - ArrayList<Pair<String, String>> attachedDbs = null; + List<Pair<String, String>> attachedDbs = null; try { // Close the database, which will cause subsequent operations to fail. // before that, get the attached database list first. diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 1a43b30..b3fd914 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -40,6 +40,7 @@ import dalvik.system.BlockGuard; import java.io.File; import java.lang.ref.WeakReference; import java.util.ArrayList; +import java.util.List; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; @@ -2504,7 +2505,7 @@ public class SQLiteDatabase extends SQLiteClosable { String lastnode = path.substring((indx != -1) ? ++indx : 0); // get list of attached dbs and for each db, get its size and pagesize - ArrayList<Pair<String, String>> attachedDbs = db.getAttachedDbs(); + List<Pair<String, String>> attachedDbs = db.getAttachedDbs(); if (attachedDbs == null) { continue; } @@ -2560,7 +2561,7 @@ public class SQLiteDatabase extends SQLiteClosable { * @return ArrayList of pairs of (database name, database file path) or null if the database * is not open. */ - public ArrayList<Pair<String, String>> getAttachedDbs() { + public List<Pair<String, String>> getAttachedDbs() { if (!isOpen()) { return null; } @@ -2613,7 +2614,7 @@ public class SQLiteDatabase extends SQLiteClosable { */ public boolean isDatabaseIntegrityOk() { verifyDbIsOpen(); - ArrayList<Pair<String, String>> attachedDbs = null; + List<Pair<String, String>> attachedDbs = null; try { attachedDbs = getAttachedDbs(); if (attachedDbs == null) { diff --git a/core/tests/coretests/src/android/database/DatabaseGeneralTest.java b/core/tests/coretests/src/android/database/DatabaseGeneralTest.java index cd38bf0..6786700 100644 --- a/core/tests/coretests/src/android/database/DatabaseGeneralTest.java +++ b/core/tests/coretests/src/android/database/DatabaseGeneralTest.java @@ -37,6 +37,7 @@ import junit.framework.Assert; import java.io.File; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Locale; public class DatabaseGeneralTest extends AndroidTestCase implements PerformanceTestCase { @@ -1130,7 +1131,7 @@ public class DatabaseGeneralTest extends AndroidTestCase implements PerformanceT assertTrue(new File(attachedDb1File).exists()); assertNotNull(dbObj); assertTrue(dbObj.isOpen()); - ArrayList<Pair<String, String>> attachedDbs = dbObj.getAttachedDbs(); + List<Pair<String, String>> attachedDbs = dbObj.getAttachedDbs(); try { errorHandler.onCorruption(dbObj); assertFalse(dbfile.exists()); |