本文整理汇总了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;
}
示例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;
}
示例4: onReceiver
public Bundle onReceiver(Bundle bundle){
return Bundle.EMPTY;
}
示例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;
}
示例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;
}