Java Code Examples for android.os.Bundle.EMPTY

The following are Jave code examples for showing how to use EMPTY of the android.os.Bundle class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: android-banklink   File: Extensions.java   View Source Code Vote up 5 votes
@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;
}
 
Example 2
Project: AI-Powered-Intelligent-Banking-Platform   File: AuthorizationManager.java   View Source Code Vote up 5 votes
/**
 * 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);
    }
}
 
Example 3
Project: letv   File: jk.java   View Source Code Vote up 4 votes
public static Bundle e(Context context) {
    ApplicationInfo b = b(context);
    return (b == null || b.metaData == null) ? Bundle.EMPTY : b.metaData;
}
 
Example 4
Project: DroidIPC   File: BundleReceiveDecorator.java   View Source Code Vote up 4 votes
public Bundle onReceiver(Bundle bundle){
	return Bundle.EMPTY;
}
 
Example 5
Project: DroidIPC   File: BundleReceiveDecorator.java   View Source Code Vote up 4 votes
@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;
}
 
Example 6
Project: aos-MediaLib   File: ScrapeDetailResult.java   View Source Code Vote up 4 votes
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;
}