OSDN Git Service

Fix wrong dump output of *Info#flags
authorYohei Yukawa <yukawa@google.com>
Thu, 31 Aug 2017 07:26:01 +0000 (00:26 -0700)
committerYohei Yukawa <yukawa@google.com>
Thu, 31 Aug 2017 15:24:48 +0000 (15:24 +0000)
commit8f272178a00b9e5f1da7ec4e9898f50f850ed275
tree7155847118ae7d22c8340746f60c5a98f5d14ea8
parent8d1a86ca0f0c2aa10928e47a1bcc6bfab7e741ba
Fix wrong dump output of *Info#flags

This CL follows up to a previous CL [1] that introduced an ability to
control filtering level of
 - ActivityInfo#dump()
 - ApplicationInfo#dump()
 - ComponentInfo#dump()
 - ProviderInfo#dump()
 - ResolveInfo#dump()
 - ServiceInfo#dump()
but also masked following outputs as an unexpected side effect.
 - ActivityInfo#flags
 - ApplicationInfo#flags
 - ProviderInfo#flags
 - ServiceInfo#flags

With this CL, above *Info#flags are correctly dumped again.

 [1]: I0d01565babb87e68b840c9756a2ea730d699efc7
      6ac42aeed905181b484f97a53db57a17134ef7a8

Test: Manually tested as follows.
 1. make -j SoftKeyboard
 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
 3. adb shell dumpsys input_method
    -> Check 'com.example.android.softkeyboard' section
      -> make sure ServiceInfo#flags=0x0
      -> make sure ApplicationInfo#flags=0x38a8be44
           FLAG_HAS_CODE (1<<2)
           FLAG_ALLOW_CLEAR_USER_DATA (1<<6)
           FLAG_SUPPORTS_SMALL_SCREENS (1<<9)
           FLAG_SUPPORTS_NORMAL_SCREENS (1<<10)
           FLAG_SUPPORTS_LARGE_SCREENS (1<<11)
           FLAG_RESIZEABLE_FOR_SCREENS (1<<12)
           FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13)
           FLAG_ALLOW_BACKUP (1<<15)
           FLAG_SUPPORTS_XLARGE_SCREENS (1<<19)
           FLAG_STOPPED (1<<21)
           FLAG_SUPPORTS_RTL (1<<22)
           FLAG_INSTALLED (1<<23)
           FLAG_FULL_BACKUP_ONLY (1<<26)
           FLAG_EXTRACT_NATIVE_LIBS (1<<28)
           FLAG_HARDWARE_ACCELERATED (1<<29)
Fixes: 65057767
Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0
core/java/android/content/pm/ActivityInfo.java
core/java/android/content/pm/ApplicationInfo.java
core/java/android/content/pm/ComponentInfo.java
core/java/android/content/pm/ProviderInfo.java
core/java/android/content/pm/ResolveInfo.java
core/java/android/content/pm/ServiceInfo.java