In one of the standard examples - SampleSyncAdapter - there is such a fragment:
public static boolean authenticate(String username, String password, Handler handler, **final Context context**) { **final HttpResponse resp;** **final ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();** params.add(new BasicNameValuePair(PARAM_USERNAME, username)); params.add(new BasicNameValuePair(PARAM_PASSWORD, password)); HttpEntity entity = null; try { entity = new UrlEncodedFormEntity(params); } catch (**final UnsupportedEncodingException e**) { // this should never happen. throw new AssertionError(e); } **final HttpPost post = new HttpPost(AUTH_URI);** ...
Further, some variables are marked as final. What for?