fix 3185231: Dragging app to info button doesn't work
When dragging an app from all apps to the info button, it is currently showing an empty dialog.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user