Fix bug #15782664 Need to remove Search and Up affordances from App Info
- make AppInfo like a shortcut Change-Id: I6f63cdbebce8e245cc5a8a673afcbdfc309d901a
This commit is contained in:
@@ -450,6 +450,11 @@ public class SettingsActivity extends Activity
|
|||||||
return (categories != null) && categories.contains("com.android.settings.SHORTCUT");
|
return (categories != null) && categories.contains("com.android.settings.SHORTCUT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isAppInfoIntent(final Intent intent) {
|
||||||
|
String action = intent.getAction();
|
||||||
|
return (action != null) && action.equals("android.settings.APPLICATION_DETAILS_SETTINGS");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedState) {
|
protected void onCreate(Bundle savedState) {
|
||||||
super.onCreate(savedState);
|
super.onCreate(savedState);
|
||||||
@@ -472,7 +477,7 @@ public class SettingsActivity extends Activity
|
|||||||
// Getting Intent properties can only be done after the super.onCreate(...)
|
// Getting Intent properties can only be done after the super.onCreate(...)
|
||||||
final String initialFragmentName = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
|
final String initialFragmentName = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
|
||||||
|
|
||||||
mIsShortcut = isShortCutIntent(intent) ||
|
mIsShortcut = isShortCutIntent(intent) || isAppInfoIntent(intent) ||
|
||||||
intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SHORTCUT, false);
|
intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SHORTCUT, false);
|
||||||
|
|
||||||
mIsShowingDashboard = (initialFragmentName == null) && !mIsShortcut;
|
mIsShowingDashboard = (initialFragmentName == null) && !mIsShortcut;
|
||||||
|
Reference in New Issue
Block a user