當前位置: 首頁>>代碼示例>>Java>>正文


Java Bundle.EMPTY屬性代碼示例

本文整理匯總了Java中android.os.Bundle.EMPTY屬性的典型用法代碼示例。如果您正苦於以下問題:Java Bundle.EMPTY屬性的具體用法?Java Bundle.EMPTY怎麽用?Java Bundle.EMPTY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.EMPTY屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: mapToBundle

@NonNull
@CheckResult
static Bundle mapToBundle(@NonNull Map<String, String> map) {
  final int mapSize = map.size();
  if (mapSize == 0) {
    return Bundle.EMPTY;
  }
  final Bundle bundle = new Bundle(mapSize);
  for (String key : map.keySet()) {
    bundle.putString(key, map.get(key));
  }
  return bundle;
}
 
開發者ID:swedbank,項目名稱:android-banklink,代碼行數:13,代碼來源:Extensions.java

示例2: AuthorizationManager

/**
 * Create a new Auth Manager based on the supplied product id
 *
 * This will throw an error if our assets/api_key.txt file, our package name, and our signing key don't match the product ID, this is
 * a common sticking point for the application not working
 * @param context
 * @param productId
 */
public AuthorizationManager(@NotNull Context context, @NotNull String productId){
    mContext = context;
    mProductId = productId;

    try {
        mAuthManager = new AmazonAuthorizationManager(mContext, Bundle.EMPTY);
    }catch(IllegalArgumentException e){
        //This error will be thrown if the main project doesn't have the assets/api_key.txt file in it--this contains the security credentials from Amazon
        Util.showAuthToast(mContext, "APIKey is incorrect or does not exist.");
        Log.e(TAG, "Unable to Use Amazon Authorization Manager. APIKey is incorrect or does not exist. Does assets/api_key.txt exist in the main application?", e);
    }
}
 
開發者ID:vaibhavs4424,項目名稱:AI-Powered-Intelligent-Banking-Platform,代碼行數:20,代碼來源:AuthorizationManager.java

示例3: e

public static Bundle e(Context context) {
    ApplicationInfo b = b(context);
    return (b == null || b.metaData == null) ? Bundle.EMPTY : b.metaData;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:jk.java

示例4: onReceiver

public Bundle onReceiver(Bundle bundle){
	return Bundle.EMPTY;
}
 
開發者ID:devyok,項目名稱:DroidIPC,代碼行數:3,代碼來源:BundleReceiveDecorator.java

示例5: handle

@Override
public Bundle handle(Bundle bundle) {
	
	Parcel data = Parcel.obtain();
	Parcel reply = Parcel.obtain();
	
	data.writeBundle(bundle);
	
	try {
		mRemoteCallback.transact(ServiceContext.CALLBACK, data, reply, 0);
		
		Bundle result = reply.readBundle();
		
		return result;
		
	} catch (RemoteException e) {
		e.printStackTrace();
	} finally {
		
		data.recycle();
		reply.recycle();
		
	}
	
	return Bundle.EMPTY;
}
 
開發者ID:devyok,項目名稱:DroidIPC,代碼行數:26,代碼來源:BundleReceiveDecorator.java

示例6: ScrapeDetailResult

public ScrapeDetailResult(BaseTags tag, boolean isMovie, Bundle extras, ScrapeStatus status, Throwable reason) {
    super(checkStatus(tag, status), reason);
    this.tag = tag;
    this.isMovie = isMovie;
    this.extras = extras != null ? extras : Bundle.EMPTY;
}
 
開發者ID:archos-sa,項目名稱:aos-MediaLib,代碼行數:6,代碼來源:ScrapeDetailResult.java


注:本文中的android.os.Bundle.EMPTY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。