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

Side by Side Diff: src/org/adblockplus/android/ProxyService.java

Issue 10102005: ABP/Android Process chunked requests (Closed)
Patch Set: ABP/Android Process chunked requests Created April 9, 2013, 7:39 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/org/adblockplus/brazil/RequestHandler.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the Adblock Plus, 2 * This file is part of the Adblock Plus,
3 * Copyright (C) 2006-2012 Eyeo GmbH 3 * Copyright (C) 2006-2012 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 { 845 {
846 @Override 846 @Override
847 public void onReceive(Context ctx, Intent intent) 847 public void onReceive(Context ctx, Intent intent)
848 { 848 {
849 String action = intent.getAction(); 849 String action = intent.getAction();
850 Log.i(TAG, "Action: " + action); 850 Log.i(TAG, "Action: " + action);
851 // Connectivity change 851 // Connectivity change
852 if (ConnectivityManager.CONNECTIVITY_ACTION.equals(action)) 852 if (ConnectivityManager.CONNECTIVITY_ACTION.equals(action))
853 { 853 {
854 ConnectivityManager connectivityManager = (ConnectivityManager) getSyste mService(Context.CONNECTIVITY_SERVICE); 854 ConnectivityManager connectivityManager = (ConnectivityManager) getSyste mService(Context.CONNECTIVITY_SERVICE);
855 // TODO Should we use ConnectivityManagerCompat.getNetworkInfoFromBroadc ast() instead?
Andrey Novikov 2013/04/09 07:42:10 Disregard this, it does not belong to this patch s
855 NetworkInfo info = connectivityManager.getActiveNetworkInfo(); 856 NetworkInfo info = connectivityManager.getActiveNetworkInfo();
856 if (info == null) 857 if (info == null)
857 return; 858 return;
858 String typeName = info.getTypeName(); 859 String typeName = info.getTypeName();
859 String subtypeName = info.getSubtypeName(); 860 String subtypeName = info.getSubtypeName();
860 boolean available = info.isAvailable(); 861 boolean available = info.isAvailable();
861 862
862 Log.i(TAG, "Network Type: " + typeName + ", subtype: " + subtypeName + " , available: " + available); 863 Log.i(TAG, "Network Type: " + typeName + ", subtype: " + subtypeName + " , available: " + available);
863 if (info.getType() == ConnectivityManager.TYPE_WIFI) 864 if (info.getType() == ConnectivityManager.TYPE_WIFI)
864 { 865 {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 @Override 928 @Override
928 public void log(int level, Object obj, String message) 929 public void log(int level, Object obj, String message)
929 { 930 {
930 if (level <= logLevel) 931 if (level <= logLevel)
931 { 932 {
932 Log.println(7 - level, obj != null ? obj.toString() : TAG, message); 933 Log.println(7 - level, obj != null ? obj.toString() : TAG, message);
933 } 934 }
934 } 935 }
935 } 936 }
936 } 937 }
OLDNEW
« no previous file with comments | « no previous file | src/org/adblockplus/brazil/RequestHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld