标签:
@Override
publicObject clone(){
returnnewIntent(this);
}
publicIntent(Intent o){
this.mAction = o.mAction;
this.mData = o.mData;
this.mType = o.mType;
this.mPackage = o.mPackage;
this.mComponent = o.mComponent;
this.mFlags = o.mFlags;
//下面几个是引用对象被重新创建了,是深拷贝
if(o.mCategories != null){
this.mCategories =newHashSet<String>(o.mCategories);
}
if(o.mExtras != null){
this.mExtras =newBundle(o.mExtras);
}
if(o.mSourceBounds != null){
this.mSourceBounds =newRect(o.mSourceBounds);
}
}
标签:
原文地址:http://www.cnblogs.com/Doing-what-I-love/p/5621189.html