summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMindy Pereira <mindyp@google.com>2012-04-16 09:45:29 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-16 09:45:29 -0700
commit7c886acf2e60d7f4a02197401d1d046ef3b870b4 (patch)
treeed715d1d260a1739516233da3d6a16cac97a9c9f /core
parenta0e9d0f60eb33e480be7e02b08863be588f4df7d (diff)
parentf937313944e0e9dfa4375a275710e420c2a92554 (diff)
downloadframeworks_base-7c886acf2e60d7f4a02197401d1d046ef3b870b4.zip
frameworks_base-7c886acf2e60d7f4a02197401d1d046ef3b870b4.tar.gz
frameworks_base-7c886acf2e60d7f4a02197401d1d046ef3b870b4.tar.bz2
Merge "Perform null check on empty view before doing accessibility check."
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/AdapterView.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java
index 1a2231e..abfc577 100644
--- a/core/java/android/widget/AdapterView.java
+++ b/core/java/android/widget/AdapterView.java
@@ -650,7 +650,8 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
mEmptyView = emptyView;
// If not explicitly specified this view is important for accessibility.
- if (emptyView.getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+ if (emptyView != null
+ && emptyView.getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
emptyView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
}