当前位置: 首页>>代码示例>>Java>>正文


Java AQUtility.debug方法代码示例

本文整理汇总了Java中com.androidquery.util.AQUtility.debug方法的典型用法代码示例。如果您正苦于以下问题:Java AQUtility.debug方法的具体用法?Java AQUtility.debug怎么用?Java AQUtility.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.androidquery.util.AQUtility的用法示例。


在下文中一共展示了AQUtility.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getClient

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private static DefaultHttpClient getClient()
{
	if (client == null || !REUSE_CLIENT)
	{
		AQUtility.debug("creating http client");
		HttpParams httpParams = new BasicHttpParams();
		//httpParams.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
		HttpConnectionParams.setConnectionTimeout(httpParams, NET_TIMEOUT);
		HttpConnectionParams.setSoTimeout(httpParams, NET_TIMEOUT);
		//ConnManagerParams.setMaxConnectionsPerRoute(httpParams, new ConnPerRouteBean(NETWORK_POOL));
		ConnManagerParams.setMaxConnectionsPerRoute(httpParams, new ConnPerRouteBean(25));
		//Added this line to avoid issue at: http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt
		HttpConnectionParams.setSocketBufferSize(httpParams, 8192);
		SchemeRegistry registry = new SchemeRegistry();
		registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
		registry.register(new Scheme("https", ssf == null ? SSLSocketFactory.getSocketFactory() : ssf, 443));
		ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(httpParams, registry);
		client = new DefaultHttpClient(cm, httpParams);
	}
	return client;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:22,代码来源:AbstractAjaxCallback.java

示例2: expired

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
@Override
public boolean expired(AbstractAjaxCallback<?, ?> cb, AjaxStatus status)
{
	int code = status.getCode();
	if (code == 200)
		return false;
	String error = status.getError();
	if (error != null && error.contains("OAuthException"))
	{
		AQUtility.debug("fb token expired");
		return true;
	}
	String url = cb.getUrl();
	if (code == 400 && (url.endsWith("/likes") || url.endsWith("/comments") || url.endsWith("/checkins")))
	{
		return false;
	}
	if (code == 403 && (url.endsWith("/feed") || url.contains("method=delete")))
	{
		return false;
	}
	return code == 400 || code == 401 || code == 403;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:24,代码来源:FacebookHandle.java

示例3: work

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private void work()
{
	Location loc = getBestLocation();
	Timer timer = new Timer(false);
	if (networkEnabled)
	{
		AQUtility.debug("register net");
		networkListener = new Listener();
		lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, interval, 0, networkListener, Looper.getMainLooper());
		timer.schedule(networkListener, timeout);
	}
	if (gpsEnabled)
	{
		AQUtility.debug("register gps");
		gpsListener = new Listener();
		lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, interval, 0, gpsListener, Looper.getMainLooper());
		timer.schedule(gpsListener, timeout);
	}
	if (iteration > 1 && loc != null)
	{
		n++;
		callback(loc);
	}
	initTime = System.currentTimeMillis();
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:26,代码来源:LocationAjaxCallback.java

示例4: fileGet

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
protected T fileGet(String url, File file, AjaxStatus status) {

        try {
            byte[] data = null;

            if (isStreamingContent()) {
                status.file(file);
            } else {
                data = AQUtility.toBytes(new FileInputStream(file));
            }

            return transform(url, data, status);
        } catch (Exception e) {
            AQUtility.debug(e);
            return null;
        }
    }
 
开发者ID:bblue000,项目名称:ExoPlayerDemo,代码行数:18,代码来源:AbstractAjaxCallback.java

示例5: async

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
/**
 * Starts the async process.
 *
 * @param context the context
 */
public void async(Context context) {

    if (status == null) {
        status = new AjaxStatus();
        status.redirect(url).refresh(refresh);
    } else if (status.getDone()) {
        status.reset();
        result = null;
    }

    showProgress(true);

    if (ah != null) {

        if (!ah.authenticated()) {
            AQUtility.debug("auth needed", url);
            ah.auth(this);
            return;
        }
    }

    work(context);

}
 
开发者ID:bblue000,项目名称:ExoPlayerDemo,代码行数:30,代码来源:AbstractAjaxCallback.java

示例6: doInBackground

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
@Override
protected String doInBackground(Void... params) {
    Activity activity = activityContainer.get();
    if (null == activity) {
        return "";
    }
    try {
        versionCode = activity.getPackageManager()
                .getPackageInfo(activity.getPackageName(), 0).versionCode;
    } catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace();
    }
    locale = activity.getResources().getConfiguration().locale.toString();//Locale.getDefault().toString();
    AQUtility.debug("locale", locale);
    String response = "";

    AjaxCallback<String> cb = new AjaxCallback<String>();
    cb.url(MESSAGEURL).type(String.class);

    aq.sync(cb);

    response = cb.getResult();
    return response;
}
 
开发者ID:recoilme,项目名称:freemp,代码行数:25,代码来源:UpdateUtils.java

示例7: add2list

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
public void add2list(String artist,String yearS,String trackS,String title,String album,String composer,
                     String path,String folder, long lastModified,String filename,int duration,int albumId){
    int year = 0;
    int track = 0;

    try {
        if (!yearS.equals("")) {
            if (yearS.length()>3) {
                yearS = yearS.substring(0,4);
            }
            year  = Integer.parseInt(yearS.replaceAll("[^\\d.]", ""));
        }

        if (!trackS.equals(""))
            track = Integer.parseInt(trackS.replaceAll("[^\\d.]", ""));
    } catch (Exception e) {AQUtility.debug(e.toString());}

    allTracks.add(new Track(
            artist.equals("") ?"unknown": StringUtils.capitalizeFully(artist),
            title.equals("") ?filename:StringUtils.capitalizeFully(title),
            album,
            composer,
            year,
            track,
            duration,
            path,
            folder,
            lastModified,
            albumId));
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:31,代码来源:MakePlaylistFS.java

示例8: setScrollListener

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private Common setScrollListener()
{
	AbsListView lv = (AbsListView) view;
	Common common = (Common) lv.getTag(AQuery.TAG_SCROLL_LISTENER);
	if (common == null)
	{
		common = new Common();
		lv.setOnScrollListener(common);
		lv.setTag(AQuery.TAG_SCROLL_LISTENER, common);
		AQUtility.debug("set scroll listenr");
	}
	return common;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:14,代码来源:AbstractAQuery.java

示例9: makeSharedFile

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
/**
 * Create a temporary file on EXTERNAL storage (sdcard) that holds the cached content of the url.
 * Returns null if url is not cached, or the system cannot create such file (sdcard is absent, such as in emulator).
 * <p/>
 * The returned file is accessable to all apps, therefore it is ideal for sharing content (such as photo) via the intent mechanism.
 * <p/>
 * <br>
 * <br>
 * Example Usage:
 * <p/>
 * <pre>
 * 	Intent intent = new Intent(Intent.ACTION_SEND);
 * 	intent.setType("image/jpeg");
 * 	intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
 * 	startActivityForResult(Intent.createChooser(intent, "Share via:"), 0);
 * </pre>
 * <p/>
 * <br>
 * The temp file will be deleted when AQUtility.cleanCacheAsync is invoked, or the file can be explicitly deleted after use.
 *
 * @param url      The url of the desired cached content.
 * @param filename The desired file name, which might be used by other apps to describe the content, such as an email attachment.
 * @return temp file
 */
public File makeSharedFile(String url, String filename)
{
	File file = null;
	try
	{
		File cached = getCachedFile(url);
		if (cached != null)
		{
			File temp = AQUtility.getTempDir();
			if (temp != null)
			{
				file = new File(temp, filename);
				file.createNewFile();
				FileInputStream fis = new FileInputStream(cached);
				FileOutputStream fos = new FileOutputStream(file);
				FileChannel ic = fis.getChannel();
				FileChannel oc = fos.getChannel();
				try
				{
					ic.transferTo(0, ic.size(), oc);
				}
				finally
				{
					AQUtility.close(fis);
					AQUtility.close(fos);
					AQUtility.close(ic);
					AQUtility.close(oc);
				}
			}
		}
	}
	catch (Exception e)
	{
		AQUtility.debug(e);
	}
	return file;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:62,代码来源:AbstractAQuery.java

示例10: onClick

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
@Override
public void onClick(DialogInterface dialog, int which)
{
	Account acc = accs[which];
	AQUtility.debug("acc", acc.name);
	setActiveAccount(act, acc.name);
	auth(acc);
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:9,代码来源:GoogleHandle.java

示例11: httpDelete

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private void httpDelete(String url, AjaxStatus status) throws IOException
{
	AQUtility.debug("get", url);
	url = patchUrl(url);
	HttpDelete del = new HttpDelete(url);
	httpDo(del, url, status);
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:8,代码来源:AbstractAjaxCallback.java

示例12: hide

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private void hide()
{
	if (dialog != null)
	{
		try
		{
			dialog.hide();
		}
		catch (Exception e)
		{
			AQUtility.debug(e);
		}
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:15,代码来源:FacebookHandle.java

示例13: auth

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
protected void auth()
{
	if (act.isFinishing())
		return;
	boolean ok = sso();
	AQUtility.debug("authing", ok);
	if (!ok)
	{
		webAuth();
	}
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:12,代码来源:FacebookHandle.java

示例14: extractToken

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
private String extractToken(String url)
{
	Uri uri = Uri.parse(url.replace('#', '?'));
	String token = uri.getQueryParameter("access_token");
	AQUtility.debug("token", token);
	return token;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:8,代码来源:FacebookHandle.java

示例15: reauth

import com.androidquery.util.AQUtility; //导入方法依赖的package包/类
@Override
public boolean reauth(final AbstractAjaxCallback<?, ?> cb)
{
	AQUtility.debug("reauth requested");
	token = null;
	AQUtility.post(new Runnable()
	{
		@Override
		public void run()
		{
			auth(cb);
		}
	});
	return false;
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:16,代码来源:FacebookHandle.java


注:本文中的com.androidquery.util.AQUtility.debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。