@ -34,34 +29,44 @@ public class AdvancedSettingsActivity extends Activity {
@@ -34,34 +29,44 @@ public class AdvancedSettingsActivity extends Activity {
@ -194,7 +203,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -194,7 +203,7 @@ public class AdvancedSettingsActivity extends Activity {
messageHandler=newMessageHandler();
}
staticclassMessageHandlerextendsHandler{
privateclassMessageHandlerextendsHandler{
@Override
publicvoidhandleMessage(Messagemsg){
@ -214,10 +223,9 @@ public class AdvancedSettingsActivity extends Activity {
@@ -214,10 +223,9 @@ public class AdvancedSettingsActivity extends Activity {
@ -231,7 +239,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -231,7 +239,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -245,7 +253,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -245,7 +253,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -258,7 +266,8 @@ public class AdvancedSettingsActivity extends Activity {
@@ -258,7 +266,8 @@ public class AdvancedSettingsActivity extends Activity {
@ -272,7 +281,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -272,7 +281,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -286,7 +295,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -286,7 +295,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -299,7 +308,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -299,7 +308,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -313,7 +322,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -313,7 +322,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -326,7 +335,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -326,7 +335,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -339,7 +348,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -339,7 +348,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -353,7 +362,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -353,7 +362,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -367,7 +376,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -367,7 +376,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -381,7 +390,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -381,7 +390,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -395,7 +404,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -395,7 +404,7 @@ public class AdvancedSettingsActivity extends Activity {
@ -409,8 +418,8 @@ public class AdvancedSettingsActivity extends Activity {
@@ -409,8 +418,8 @@ public class AdvancedSettingsActivity extends Activity {
@ -422,7 +431,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -422,7 +431,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr1(RelativeLayoutview){
privatevoidr1(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -434,7 +443,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -434,7 +443,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr2(RelativeLayoutview){
privatevoidr2(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -446,7 +455,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -446,7 +455,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidrClearHistoryExit(RelativeLayoutview){
privatevoidrClearHistoryExit(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -458,7 +467,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -458,7 +467,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidrClearCookiesExit(RelativeLayoutview){
privatevoidrClearCookiesExit(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -470,7 +479,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -470,7 +479,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr3(RelativeLayoutview){
privatevoidr3(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -482,7 +491,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -482,7 +491,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr4(RelativeLayoutview){
privatevoidr4(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -500,7 +509,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -500,7 +509,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr5(RelativeLayoutview){
privatevoidr5(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -512,7 +521,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -512,7 +521,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr6(RelativeLayoutview){
privatevoidr6(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -524,7 +533,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -524,7 +533,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr7(RelativeLayoutview){
privatevoidr7(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -536,7 +545,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -536,7 +545,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr8(RelativeLayoutview){
privatevoidr8(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -584,7 +593,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -584,7 +593,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr11(RelativeLayoutview){
privatevoidr11(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -597,7 +606,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -597,7 +606,7 @@ public class AdvancedSettingsActivity extends Activity {
}
voidr12(RelativeLayoutview){
privatevoidr12(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -609,7 +618,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -609,7 +618,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr13(RelativeLayoutview){
privatevoidr13(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -620,7 +629,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -620,7 +629,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr14(RelativeLayoutview){
privatevoidr14(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -631,7 +640,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -631,7 +640,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidr15(RelativeLayoutview){
privatevoidr15(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -678,7 +687,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -678,7 +687,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidrIncognitoCookies(RelativeLayoutview){
privatevoidrIncognitoCookies(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -691,8 +700,8 @@ public class AdvancedSettingsActivity extends Activity {
@@ -691,8 +700,8 @@ public class AdvancedSettingsActivity extends Activity {
@ -702,7 +711,7 @@ public class AdvancedSettingsActivity extends Activity {
@@ -702,7 +711,7 @@ public class AdvancedSettingsActivity extends Activity {
});
}
voidrClearCache(RelativeLayoutview){
privatevoidrClearCache(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -723,11 +732,10 @@ public class AdvancedSettingsActivity extends Activity {
@@ -723,11 +732,10 @@ public class AdvancedSettingsActivity extends Activity {
@ -737,11 +745,11 @@ public class AdvancedSettingsActivity extends Activity {
@@ -737,11 +745,11 @@ public class AdvancedSettingsActivity extends Activity {
if(mSystemBrowser){
try{
Browser.clearHistory(getContentResolver());
}catch(NullPointerExceptionignored){
}catch(Exceptionignored){
}
}
SettingsController.setClearHistory(true);
Utils.trimCache(AdvancedSettingsActivity.this);
Utils.trimCache(this);
messageHandler.sendEmptyMessage(1);
}
@ -752,21 +760,23 @@ public class AdvancedSettingsActivity extends Activity {
@@ -752,21 +760,23 @@ public class AdvancedSettingsActivity extends Activity {
messageHandler.sendEmptyMessage(2);
}
voidr9(RelativeLayoutview){
privatevoidr9(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
publicvoidonClick(Viewv){
try{
importFromStockBrowser();
}catch(Exceptione){
// ignored exception
// TODO add logging
}
}
});
}
voidr10(RelativeLayoutview){
privatevoidr10(RelativeLayoutview){
view.setOnClickListener(newOnClickListener(){
@Override
@ -809,20 +819,18 @@ public class AdvancedSettingsActivity extends Activity {
@@ -809,20 +819,18 @@ public class AdvancedSettingsActivity extends Activity {
@ -837,13 +845,10 @@ public class AdvancedSettingsActivity extends Activity {
@@ -837,13 +845,10 @@ public class AdvancedSettingsActivity extends Activity {
@ -9,9 +9,13 @@ public class HistoryItem implements Comparable<HistoryItem> {
@@ -9,9 +9,13 @@ public class HistoryItem implements Comparable<HistoryItem> {
// private variables
privateintmId;
privateStringmUrl;
privateStringmTitle;
privateBitmapmBitmap;
privateintmImageId;
// Empty constructor
@ -47,7 +51,7 @@ public class HistoryItem implements Comparable<HistoryItem> {
@@ -47,7 +51,7 @@ public class HistoryItem implements Comparable<HistoryItem> {
returnthis.mId;
}
publicintgetImageId(){
publicintgetImageId(){
returnthis.mImageId;
}
@ -56,7 +60,7 @@ public class HistoryItem implements Comparable<HistoryItem> {
@@ -56,7 +60,7 @@ public class HistoryItem implements Comparable<HistoryItem> {
this.mId=id;
}
publicvoidsetImageId(intid){
publicvoidsetImageId(intid){
this.mImageId=id;
}
@ -97,5 +101,4 @@ public class HistoryItem implements Comparable<HistoryItem> {
@@ -97,5 +101,4 @@ public class HistoryItem implements Comparable<HistoryItem> {
@ -26,15 +28,14 @@ public class LightningDownloadListener implements DownloadListener {
@@ -26,15 +28,14 @@ public class LightningDownloadListener implements DownloadListener {
@ -47,6 +48,4 @@ public class LightningDownloadListener implements DownloadListener {
@@ -47,6 +48,4 @@ public class LightningDownloadListener implements DownloadListener {
@ -21,9 +23,11 @@ public class ReplacingInputStream extends FilterInputStream {
@@ -21,9 +23,11 @@ public class ReplacingInputStream extends FilterInputStream {
privatebooleanisMatchFound(){
Iterator<Integer>inIter=inQueue.iterator();
for(inti=0;i<search.length;i++)
if(!inIter.hasNext()||search[i]!=inIter.next())
for(inti=0;i<search.length;i++){
if(!inIter.hasNext()||search[i]!=inIter.next()){
returnfalse;
}
}
returntrue;
}
@ -32,10 +36,11 @@ public class ReplacingInputStream extends FilterInputStream {
@@ -32,10 +36,11 @@ public class ReplacingInputStream extends FilterInputStream {
while(inQueue.size()<search.length){
intnext=super.read();
inQueue.offer(next);
if(next==-1)
if(next==-1){
break;
}
}
}
@Override
@ -47,34 +52,39 @@ public class ReplacingInputStream extends FilterInputStream {
@@ -47,34 +52,39 @@ public class ReplacingInputStream extends FilterInputStream {
@ -86,6 +96,4 @@ public class ReplacingInputStream extends FilterInputStream {
@@ -86,6 +96,4 @@ public class ReplacingInputStream extends FilterInputStream {