diff options
| author | Weilun Du <wdu@google.com> | 2017-11-29 11:30:53 -0800 |
|---|---|---|
| committer | Weilun Du <wdu@google.com> | 2017-12-01 17:59:56 -0800 |
| commit | f11e49ee4275312a94e8c52482bfac726d4f41cc (patch) | |
| tree | b837ab2cfdfb11ce3215198ab33d9d72055211c0 /apps | |
| parent | 8ab62faed3ee8d09444c2ef9dfd82b51df15fcf6 (diff) | |
| download | android_development-f11e49ee4275312a94e8c52482bfac726d4f41cc.tar.gz android_development-f11e49ee4275312a94e8c52482bfac726d4f41cc.tar.bz2 android_development-f11e49ee4275312a94e8c52482bfac726d4f41cc.zip | |
Fixed the bug where there are multiple developer options
BUG: 69679218
Change-Id: Ib44bf9441ecc7378d810cb55e5d9acdedbde99d6
Signed-off-by: Weilun Du <wdu@google.com>
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/Development/src/com/android/development/Development.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/Development/src/com/android/development/Development.java b/apps/Development/src/com/android/development/Development.java index 8a317cd27..649f56644 100644 --- a/apps/Development/src/com/android/development/Development.java +++ b/apps/Development/src/com/android/development/Development.java @@ -36,11 +36,10 @@ public class Development extends LauncherActivity protected void onSortResultList(List<ResolveInfo> results) { super.onSortResultList(results); Intent settingsIntent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS); - List<ResolveInfo> topItems = getPackageManager().queryIntentActivities( - settingsIntent, PackageManager.MATCH_DEFAULT_ONLY); - if (topItems != null) { - super.onSortResultList(topItems); - results.addAll(0, topItems); + //In API 26, there are multiplte developer settings activities, choose the one with highest priority + ResolveInfo topItem = getPackageManager().resolveActivity(settingsIntent, PackageManager.MATCH_DEFAULT_ONLY); + if (topItem != null) { + results.add(0, topItem); } } } |
