diff options
| author | Adam Powell <adamp@google.com> | 2013-05-31 14:39:48 -0700 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2013-05-31 15:00:24 -0700 |
| commit | 04fe6ebb9f919f196ec06a19bebc09b8e943f95b (patch) | |
| tree | c6b80f3a8d5ff34227de7b97395883139787ef38 /core/java/android/app/Dialog.java | |
| parent | c1e0ca9fee17cb56a992ae107d3b1aa534290b2d (diff) | |
Fix a bug resolving the correct icon/logo in action bars
Remove some abstraction-breaking magic in ActionBarView and replace it
with proper resolution of the icon/logo when creating a window. The
old implementation relied on the ActionBarView's context being an
Activity.
Bug 9171554
Change-Id: Idbbb1942622195dcb55e8119f2d64287b07bb509
Diffstat (limited to 'core/java/android/app/Dialog.java')
| -rw-r--r-- | core/java/android/app/Dialog.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index b3d99c5242f0..634fa30c1c40 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -16,6 +16,8 @@ package android.app; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; import com.android.internal.app.ActionBarImpl; import com.android.internal.policy.PolicyManager; @@ -264,6 +266,9 @@ public class Dialog implements DialogInterface, Window.Callback, mDecor = mWindow.getDecorView(); if (mActionBar == null && mWindow.hasFeature(Window.FEATURE_ACTION_BAR)) { + final ApplicationInfo info = mContext.getApplicationInfo(); + mWindow.setDefaultIcon(info.icon); + mWindow.setDefaultLogo(info.logo); mActionBar = new ActionBarImpl(this); } |
