[tbb-bugs] #27065 [Applications/Tor Browser]: TBA: Delete AccountManager usage from Tabs

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Aug 7 21:18:53 UTC 2018


#27065: TBA: Delete AccountManager usage from Tabs
------------------------------------------+------------------------
     Reporter:  sysrqb                    |      Owner:  tbb-team
         Type:  defect                    |     Status:  new
     Priority:  Medium                    |  Milestone:
    Component:  Applications/Tor Browser  |    Version:
     Severity:  Normal                    |   Keywords:  tbb-mobile
Actual Points:                            |  Parent ID:  #26858
       Points:                            |   Reviewer:
      Sponsor:                            |
------------------------------------------+------------------------
 When the app is started/restarted, it creates an
 `OnAccountsUpdatedListener` using the Android `AccountManager` in
 `Tabs.attachToContext()`. When a new account is added, the Listener calls
 `queuePersistAllTabs()` where the current tabs are cached in the local
 database on disk. We should avoid all of this. We already deleted most of
 the FxA and Sync related code, we can probably delete this, too.

 {{{
         mAccountManager = AccountManager.get(appContext);

         mAccountListener = new OnAccountsUpdateListener() {
             @Override
             public void onAccountsUpdated(Account[] accounts) {
                 queuePersistAllTabs();
             }
         };

         // The listener will run on the background thread (see 2nd
 argument).
         mAccountManager.addOnAccountsUpdatedListener(mAccountListener,
 ThreadUtils.getBackgroundHandler(), false);
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27065>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list