Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 8493083: ABP/Android UI (Closed)

Created:
Oct. 5, 2012, 9:42 a.m. by Andrey Novikov
Modified:
Nov. 27, 2012, 10:51 a.m.
Reviewers:
Felix Dahlke
CC:
Wladimir Palant
Visibility:
Public.

Description

ABP/Android UI

Patch Set 1 #

Total comments: 55

Patch Set 2 : ABP/Android UI #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1210 lines, -0 lines) Patch
A res/layout/about.xml View 1 chunk +18 lines, -0 lines 0 comments Download
A res/layout/configuration.xml View 1 chunk +36 lines, -0 lines 0 comments Download
A res/layout/preferences.xml View 1 chunk +70 lines, -0 lines 0 comments Download
A res/menu/menu_preferences.xml View 1 chunk +10 lines, -0 lines 0 comments Download
A res/xml/preferences.xml View 1 chunk +14 lines, -0 lines 0 comments Download
A res/xml/preferences_advanced.xml View 1 chunk +70 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/AboutDialog.java View 1 1 chunk +87 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/AdvancedPreferences.java View 1 1 chunk +240 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/BootBroadcastReceiver.java View 1 chunk +20 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/ConfigurationActivity.java View 1 chunk +38 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/Preferences.java View 1 1 chunk +473 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/RefreshableListPreference.java View 1 1 chunk +57 lines, -0 lines 0 comments Download
A src/org/adblockplus/android/SummarizedPreferences.java View 1 1 chunk +77 lines, -0 lines 0 comments Download

Messages

Total messages: 6
Andrey Novikov
Oct. 5, 2012, 9:42 a.m. (2012-10-05 09:42:53 UTC) #1
Wladimir Palant
For reference: the original review for this code was http://codereview.adblockplus.org/8363097/
Oct. 5, 2012, 10:14 a.m. (2012-10-05 10:14:08 UTC) #2
Felix Dahlke
Done reviewing. I found a couple of nuts to pick, but no bugs :) On ...
Oct. 9, 2012, 2:27 p.m. (2012-10-09 14:27:29 UTC) #3
Andrey Novikov
http://codereview.adblockplus.org/8493083/diff/1/src/org/adblockplus/android/AboutDialog.java File src/org/adblockplus/android/AboutDialog.java (right): http://codereview.adblockplus.org/8493083/diff/1/src/org/adblockplus/android/AboutDialog.java#newcode20 src/org/adblockplus/android/AboutDialog.java:20: private static Context mContext = null; On 2012/10/09 14:27:29, ...
Oct. 12, 2012, 1:19 p.m. (2012-10-12 13:19:14 UTC) #4
Andrey Novikov
Oct. 12, 2012, 1:24 p.m. (2012-10-12 13:24:52 UTC) #5
Felix Dahlke
Oct. 12, 2012, 1:29 p.m. (2012-10-12 13:29:46 UTC) #6
LGTM!

http://codereview.adblockplus.org/8493083/diff/1/src/org/adblockplus/android/...
File src/org/adblockplus/android/AdvancedPreferences.java (right):

http://codereview.adblockplus.org/8493083/diff/1/src/org/adblockplus/android/...
src/org/adblockplus/android/AdvancedPreferences.java:123: try
On 2012/10/12 13:19:14, Andrey Novikov wrote:
> On 2012/10/09 14:27:29, Felix H. Dahlke wrote:
> > The same code for getting the package info is in AboutDialog. Maybe this
> > warrants a utility method that ignores the exception? In this case that
would
> > simplify the following lines to:
> > 
> > PackageInfo pi = Utils.getPackageInfo(this);
> > versionCode = pi.versionCode;
> > 
> > But if it becomes utility code, we can't really ignore the exception safely
> > anymore, we should throw a RuntimeException or log an error.
> 
> NameNotFoundException is thrown when a given package, application, or
component
> name can not be found. It definitely finds caller package info.
> 
> AboutDialog also reads versionName which is not needed here, that's why I do
not
> put it into utility function.

That's why I suggested to return a PackageInfo object instead of just the
versionCode.

Powered by Google App Engine
This is Rietveld