Merge "fix 3185231: Dragging app to info button doesn't work"

This commit is contained in:
Patrick Dubroy
2011-01-05 15:43:21 -08:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 4 deletions

View File

@@ -550,7 +550,6 @@
InstalledAppDetails. -->
<activity android:name=".applications.InstalledAppDetailsTop"
android:label="@string/application_info_label"
android:theme="@android:style/Theme.Holo.DialogWhenLarge"
android:exported="true">
</activity>
<activity-alias android:name=".applications.InstalledAppDetails"

View File

@@ -408,10 +408,11 @@ public class InstalledAppDetails extends Fragment
if (mMoveInProgress) {
return true;
}
String packageName = getArguments().getString(ARG_PACKAGE_NAME);
final Bundle args = getArguments();
String packageName = (args != null) ? args.getString(ARG_PACKAGE_NAME) : null;
if (packageName == null) {
Intent intent = (Intent)getArguments().getParcelable("intent");
Intent intent = (args == null) ?
getActivity().getIntent() : (Intent) args.getParcelable("intent");
if (intent != null) {
packageName = intent.getData().getSchemeSpecificPart();
}

View File

@@ -8,6 +8,7 @@ public class InstalledAppDetailsTop extends PreferenceActivity {
public Intent getIntent() {
Intent modIntent = new Intent(super.getIntent());
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, InstalledAppDetails.class.getName());
modIntent.putExtra(EXTRA_NO_HEADERS, true);
return modIntent;
}
}