StatSummarizer and SummaryListener are based on the same-named classes from the
routerconsole. Data is stored in memory using an AndroidPlot SimpleXYSeries.
Only the last 30 points are currently stored.
zzz and sponge pointed out that the router needs to be managed by whatever
Activity happens to be active (in case an automatic start is required). This
commit reverses the initial migration of I2PActivityBase to a Fragment (code is
broken now).
There are a lot of changes here:
- The main_content FrameLayout is now main_fragment (more logical name).
- TunnelEntry now stores a Context instead of a TunnelEntryLoader (so
it can be instantiated inside the detail Fragment).
- The activity_navdrawer layout is now an alias to a one-pane or two-pane
layout depending on screen size.
- Subclasses of I2PActivityBase can now override canUseTwoPanes() to enable
and use the two-pane layout (for devices that support it).
The navigation drawer has been (mostly) migrated to link to Activities instead
of Fragments. Only Activities can be searched via the inbuild Android search
function, which uses Intents.
- Migrated I2PActivityBase and subclasses to Fragment
- Added new MainActivity with navigation drawer to handle Fragments
- Added MainFragment to navigation drawer
Code compiles, installs and runs. Known bugs created:
- Some buttons now fail (can't use an Intent with a Fragment)
-> Migrate usage of Intents to Fragment transactions
- New install/upgrade dialogs are commented out
-> Migrate old Dialogs to DialogFragments
The path in project.properties will require local overriding. I tried directly
referencing the SDK with ${sdk.dir} but the build fails with an absolute path
to a library.
- Clean up debug text on main screen
- Move most logging from System.err.println to Util
- Stub out HTTP auth handler
- Don't restart Peers page on orientation change
- Add inbound/outbound arrows, not loaded yet
- Tweak log levels
- Switch from URI to Uri in the WV Client
- Canonicalize resource URIs if necessary
- Switch from HashMap to SharedPrefs in CacheProvider
- Use cache when going forward too
- CacheProvider remove old entries in onCreate()
- CacheProvider cleanup
- gc on router stop
- Add reload menu item
- Don't return to welcome page on activity restart
- Notification on client tunnels up/down
- Hide start/stop in menu as appropriate
- Prep for actually stopping and releasing service
- Stop service when stopping router
- Switch from singleTask to SingleTop
- Use SharedPrefs to remember whether to start router