diff options
author | Christopher Tate <ctate@google.com> | 2014-03-26 14:42:56 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2014-03-26 14:42:56 -0700 |
commit | 95ead2c58989c89b7037de377e990ad19d8db3e0 (patch) | |
tree | fad99b3d673d8eac98a50b8192f0b6e3cdd6585a /services/appwidget/java | |
parent | 0046b16ec7af940049344803afbb52953f100df3 (diff) | |
download | frameworks_base-95ead2c58989c89b7037de377e990ad19d8db3e0.zip frameworks_base-95ead2c58989c89b7037de377e990ad19d8db3e0.tar.gz frameworks_base-95ead2c58989c89b7037de377e990ad19d8db3e0.tar.bz2 |
Don't crash when handling unlinked widget bindings
A host can have an 'instance' the other end of which is still
unlinked to a concrete provider. Don't crash when we hit those.
Bug 13651057
Change-Id: I5a29afb0e6a7ab30976862aee04bd33f609543fa
Diffstat (limited to 'services/appwidget/java')
-rw-r--r-- | services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java index b84df79..b7c1704 100644 --- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java @@ -158,7 +158,7 @@ class AppWidgetServiceImpl { final int N = instances.size(); for (int i = 0; i < N; i++) { Provider p = instances.get(i).provider; - if (p.info != null && pkg.equals(p.info.provider.getPackageName())) { + if (p != null && p.info != null && pkg.equals(p.info.provider.getPackageName())) { return true; } } |