admin
6 天以前 7f0825f8195a522ed7e8bcdb6347f3a719e06c74
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.weikou.beibeivideo.util;
 
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
 
import org.json.JSONObject;
 
import java.util.Iterator;
 
/**
 * Created by weikou2015 on 2016/9/8.
 */
public class UtilBundle {
 
    public static Bundle pushBundle(Bundle bundle) {
        Bundle bundle1 = new Bundle();
        try {
            JSONObject object = new JSONObject(bundle.getBundle("Bundle").getString("customContent"));
            Iterator<String> str = object.keys();
            while (str.hasNext()) {
                String key = str.next();
                bundle1.putString(key, object.optString(key));
            }
            return bundle1;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bundle;
    }
 
}