• Andrew Grieve's avatar
    Android: Remove ApplicationStatus from @MainDex · 524c5cdd
    Andrew Grieve authored
    ApplicationStatus ends up pulling in a *lot* of code, because it ends up
    pulling in all of its listeners.
    
    This reduces the main dex size by 3400 methods.
    
    To get ApplicationStatus to not be included:
     * Made @MainDex applicable to methods
       * Changed ContextUtils and ChromeApplication to annotate methods
         rather than entire class.
     * Stopped using mainDexClasses.rules, in order to avoid -keep'ing all
       of ChromeApplication.attachBaseContext(). Really, all that's needed
       to be kept is the part of attachBaseContext() before the
       ChromiumMultiDexInstaller.install() call.
    
    Bug: 820570
    Change-Id: I39220b99f6d89b2429ba7406619a485179a3b2fc
    Reviewed-on: https://chromium-review.googlesource.com/963307
    Commit-Queue: agrieve <agrieve@chromium.org>
    Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
    Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#543831}
    524c5cdd
main_dex_classes.flags 1.77 KB