diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/app/PendingIntent.java | 18 | ||||
-rw-r--r-- | core/java/android/content/res/Configuration.java | 8 | ||||
-rw-r--r-- | core/java/android/database/DatabaseUtils.java | 12 | ||||
-rw-r--r-- | core/java/android/preference/Preference.java | 3 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/CalendarView.java | 2 |
6 files changed, 28 insertions, 17 deletions
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index 2897ee0..97de4f4 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -202,8 +202,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should start * the activity. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intent Intent of the activity to be launched. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, @@ -229,8 +228,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should start * the activity. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intent Intent of the activity to be launched. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, @@ -315,8 +313,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should start * the activity. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intents Array of Intents of the activities to be launched. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, @@ -361,8 +358,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should start * the activity. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intents Array of Intents of the activities to be launched. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, @@ -425,8 +421,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should perform * the broadcast. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intent The Intent to be broadcast. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, @@ -475,8 +470,7 @@ public final class PendingIntent implements Parcelable { * * @param context The Context in which this PendingIntent should start * the service. - * @param requestCode Private request code for the sender (currently - * not used). + * @param requestCode Private request code for the sender * @param intent An Intent describing the service to be started. * @param flags May be {@link #FLAG_ONE_SHOT}, {@link #FLAG_NO_CREATE}, * {@link #FLAG_CANCEL_CURRENT}, {@link #FLAG_UPDATE_CURRENT}, diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 86d6ee7..add8399 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -853,11 +853,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration changed |= ActivityInfo.CONFIG_SCREEN_SIZE; screenHeightDp = delta.screenHeightDp; } - if (delta.smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) { - changed |= ActivityInfo.CONFIG_SCREEN_SIZE; + if (delta.smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED + && smallestScreenWidthDp != delta.smallestScreenWidthDp) { + changed |= ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; smallestScreenWidthDp = delta.smallestScreenWidthDp; } - if (delta.densityDpi != DENSITY_DPI_UNDEFINED) { + if (delta.densityDpi != DENSITY_DPI_UNDEFINED && + densityDpi != delta.densityDpi) { changed |= ActivityInfo.CONFIG_DENSITY; densityDpi = delta.densityDpi; } diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java index 1fc1226..e2d9724 100644 --- a/core/java/android/database/DatabaseUtils.java +++ b/core/java/android/database/DatabaseUtils.java @@ -792,6 +792,18 @@ public class DatabaseUtils { } /** + * Query the table to check whether a table is empty or not + * @param db the database the table is in + * @param table the name of the table to query + * @return True if the table is empty + * @hide + */ + public static boolean queryIsEmpty(SQLiteDatabase db, String table) { + long isEmpty = longForQuery(db, "select exists(select 1 from " + table + ")", null); + return isEmpty == 0; + } + + /** * Utility method to run the query on the db and return the value in the * first column of the first row. */ diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java index e343e83..6c02965 100644 --- a/core/java/android/preference/Preference.java +++ b/core/java/android/preference/Preference.java @@ -1072,6 +1072,9 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis || (mOrder == DEFAULT_ORDER && another.mOrder != DEFAULT_ORDER)) { // Do order comparison return mOrder - another.mOrder; + } else if (mTitle == another.mTitle) { + // If titles are null or share same object comparison + return 0; } else if (mTitle == null) { return 1; } else if (another.mTitle == null) { diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index dbbcde6..c2676f1 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -1472,9 +1472,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager if (lastHoverTarget != null) { lastHoverTarget.next = hoverTarget; } else { - lastHoverTarget = hoverTarget; mFirstHoverTarget = hoverTarget; } + lastHoverTarget = hoverTarget; // Dispatch the event to the child. if (action == MotionEvent.ACTION_HOVER_ENTER) { diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java index 361eca4..a19c6a8 100644 --- a/core/java/android/widget/CalendarView.java +++ b/core/java/android/widget/CalendarView.java @@ -247,7 +247,7 @@ public class CalendarView extends FrameLayout { /** * Which month should be displayed/highlighted [0-11]. */ - private int mCurrentMonthDisplayed; + private int mCurrentMonthDisplayed = -1; /** * Used for tracking during a scroll. |