Loading core/java/android/net/PacProxySelector.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.ServiceManager; import android.util.Log; import com.android.net.IProxyService; import com.google.android.collect.Lists; import java.io.IOException; Loading Loading @@ -50,7 +51,7 @@ public class PacProxySelector extends ProxySelector { ServiceManager.getService(PROXY_SERVICE)); if (mProxyService == null) { // Added because of b10267814 where mako is restarting. Log.e(TAG, "PacManager: no proxy service"); Log.e(TAG, "PacProxyInstaller: no proxy service"); } mDefaultList = Lists.newArrayList(java.net.Proxy.NO_PROXY); } Loading core/java/android/net/ProxyInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class ProxyInfo implements Parcelable { } /** * Only used in PacManager after Local Proxy is bound. * Only used in PacProxyInstaller after Local Proxy is bound. * @hide */ public ProxyInfo(@NonNull Uri pacFileUrl, int localProxyPort) { Loading packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java +3 −4 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ import android.os.RemoteException; import android.util.Log; import com.android.net.IProxyPortListener; import com.google.android.collect.Lists; import com.google.android.collect.Sets; import java.io.IOException; import java.io.InputStream; Loading @@ -34,7 +34,6 @@ import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; Loading Loading @@ -361,7 +360,7 @@ public class ProxyServer extends Thread { try { mCallback.setProxyPort(port); } catch (RemoteException e) { Log.w(TAG, "Proxy failed to report port to PacManager", e); Log.w(TAG, "Proxy failed to report port to PacProxyInstaller", e); } } mPort = port; Loading @@ -372,7 +371,7 @@ public class ProxyServer extends Thread { try { callback.setProxyPort(mPort); } catch (RemoteException e) { Log.w(TAG, "Proxy failed to report port to PacManager", e); Log.w(TAG, "Proxy failed to report port to PacProxyInstaller", e); } } mCallback = callback; Loading packages/services/Proxy/src/com/android/proxyhandler/ProxyService.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ public class ProxyService extends Service { private static ProxyServer server = null; /** Keep these values up-to-date with PacManager.java */ /** Keep these values up-to-date with PacProxyInstaller.java */ public static final String KEY_PROXY = "keyProxy"; public static final String HOST = "localhost"; public static final String EXCL_LIST = ""; Loading services/core/java/com/android/server/connectivity/PacManager.java→services/core/java/com/android/server/connectivity/PacProxyInstaller.java +16 −15 Original line number Diff line number Diff line /** * Copyright (c) 2013, The Android Open Source Project /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.connectivity; import android.annotation.WorkerThread; Loading Loading @@ -52,7 +53,7 @@ import java.net.URLConnection; /** * @hide */ public class PacManager { public class PacProxyInstaller { private static final String PAC_PACKAGE = "com.android.pacprocessor"; private static final String PAC_SERVICE = "com.android.pacprocessor.PacService"; private static final String PAC_SERVICE_NAME = "com.android.net.IProxyService"; Loading @@ -60,7 +61,7 @@ public class PacManager { private static final String PROXY_PACKAGE = "com.android.proxyhandler"; private static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService"; private static final String TAG = "PacManager"; private static final String TAG = "PacProxyInstaller"; private static final String ACTION_PAC_REFRESH = "android.net.proxy.PAC_REFRESH"; Loading Loading @@ -145,10 +146,10 @@ public class PacManager { } } public PacManager(Context context, Handler handler, int proxyMessage) { public PacProxyInstaller(Context context, Handler handler, int proxyMessage) { mContext = context; mLastPort = -1; final HandlerThread netThread = new HandlerThread("android.pacmanager", final HandlerThread netThread = new HandlerThread("android.pacproxyinstaller", android.os.Process.THREAD_PRIORITY_DEFAULT); netThread.start(); mNetThreadHandler = new Handler(netThread.getLooper()); Loading @@ -163,16 +164,16 @@ public class PacManager { private AlarmManager getAlarmManager() { if (mAlarmManager == null) { mAlarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE); mAlarmManager = mContext.getSystemService(AlarmManager.class); } return mAlarmManager; } /** * Updates the PAC Manager with current Proxy information. This is called by * Updates the PAC Proxy Installer with current Proxy information. This is called by * the ProxyTracker directly before a broadcast takes place to allow * the PacManager to indicate that the broadcast should not be sent and the * PacManager will trigger a new broadcast when it is ready. * the PacProxyInstaller to indicate that the broadcast should not be sent and the * PacProxyInstaller will trigger a new broadcast when it is ready. * * @param proxy Proxy information that is about to be broadcast. * @return Returns whether the broadcast should be sent : either DO_ or DONT_SEND_BROADCAST Loading Loading
core/java/android/net/PacProxySelector.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.ServiceManager; import android.util.Log; import com.android.net.IProxyService; import com.google.android.collect.Lists; import java.io.IOException; Loading Loading @@ -50,7 +51,7 @@ public class PacProxySelector extends ProxySelector { ServiceManager.getService(PROXY_SERVICE)); if (mProxyService == null) { // Added because of b10267814 where mako is restarting. Log.e(TAG, "PacManager: no proxy service"); Log.e(TAG, "PacProxyInstaller: no proxy service"); } mDefaultList = Lists.newArrayList(java.net.Proxy.NO_PROXY); } Loading
core/java/android/net/ProxyInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class ProxyInfo implements Parcelable { } /** * Only used in PacManager after Local Proxy is bound. * Only used in PacProxyInstaller after Local Proxy is bound. * @hide */ public ProxyInfo(@NonNull Uri pacFileUrl, int localProxyPort) { Loading
packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java +3 −4 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ import android.os.RemoteException; import android.util.Log; import com.android.net.IProxyPortListener; import com.google.android.collect.Lists; import com.google.android.collect.Sets; import java.io.IOException; import java.io.InputStream; Loading @@ -34,7 +34,6 @@ import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; Loading Loading @@ -361,7 +360,7 @@ public class ProxyServer extends Thread { try { mCallback.setProxyPort(port); } catch (RemoteException e) { Log.w(TAG, "Proxy failed to report port to PacManager", e); Log.w(TAG, "Proxy failed to report port to PacProxyInstaller", e); } } mPort = port; Loading @@ -372,7 +371,7 @@ public class ProxyServer extends Thread { try { callback.setProxyPort(mPort); } catch (RemoteException e) { Log.w(TAG, "Proxy failed to report port to PacManager", e); Log.w(TAG, "Proxy failed to report port to PacProxyInstaller", e); } } mCallback = callback; Loading
packages/services/Proxy/src/com/android/proxyhandler/ProxyService.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ public class ProxyService extends Service { private static ProxyServer server = null; /** Keep these values up-to-date with PacManager.java */ /** Keep these values up-to-date with PacProxyInstaller.java */ public static final String KEY_PROXY = "keyProxy"; public static final String HOST = "localhost"; public static final String EXCL_LIST = ""; Loading
services/core/java/com/android/server/connectivity/PacManager.java→services/core/java/com/android/server/connectivity/PacProxyInstaller.java +16 −15 Original line number Diff line number Diff line /** * Copyright (c) 2013, The Android Open Source Project /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.connectivity; import android.annotation.WorkerThread; Loading Loading @@ -52,7 +53,7 @@ import java.net.URLConnection; /** * @hide */ public class PacManager { public class PacProxyInstaller { private static final String PAC_PACKAGE = "com.android.pacprocessor"; private static final String PAC_SERVICE = "com.android.pacprocessor.PacService"; private static final String PAC_SERVICE_NAME = "com.android.net.IProxyService"; Loading @@ -60,7 +61,7 @@ public class PacManager { private static final String PROXY_PACKAGE = "com.android.proxyhandler"; private static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService"; private static final String TAG = "PacManager"; private static final String TAG = "PacProxyInstaller"; private static final String ACTION_PAC_REFRESH = "android.net.proxy.PAC_REFRESH"; Loading Loading @@ -145,10 +146,10 @@ public class PacManager { } } public PacManager(Context context, Handler handler, int proxyMessage) { public PacProxyInstaller(Context context, Handler handler, int proxyMessage) { mContext = context; mLastPort = -1; final HandlerThread netThread = new HandlerThread("android.pacmanager", final HandlerThread netThread = new HandlerThread("android.pacproxyinstaller", android.os.Process.THREAD_PRIORITY_DEFAULT); netThread.start(); mNetThreadHandler = new Handler(netThread.getLooper()); Loading @@ -163,16 +164,16 @@ public class PacManager { private AlarmManager getAlarmManager() { if (mAlarmManager == null) { mAlarmManager = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE); mAlarmManager = mContext.getSystemService(AlarmManager.class); } return mAlarmManager; } /** * Updates the PAC Manager with current Proxy information. This is called by * Updates the PAC Proxy Installer with current Proxy information. This is called by * the ProxyTracker directly before a broadcast takes place to allow * the PacManager to indicate that the broadcast should not be sent and the * PacManager will trigger a new broadcast when it is ready. * the PacProxyInstaller to indicate that the broadcast should not be sent and the * PacProxyInstaller will trigger a new broadcast when it is ready. * * @param proxy Proxy information that is about to be broadcast. * @return Returns whether the broadcast should be sent : either DO_ or DONT_SEND_BROADCAST Loading