1
1
/*
2
- * Copyright (c) 2018-present, iQIYI, Inc. All rights reserved.
3
- *
4
- * Redistribution and use in source and binary forms, with or without modification,
5
- * are permitted provided that the following conditions are met:
6
- *
7
- * 1. Redistributions of source code must retain the above copyright notice,
8
- * this list of conditions and the following disclaimer.
9
- *
10
- * 2. Redistributions in binary form must reproduce the above copyright notice,
11
- * this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
12
- *
13
- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
14
- * from this software without specific prior written permission.
15
- *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
19
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- *
24
- */
2
+ * Copyright (c) 2018-present, iQIYI, Inc. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without modification,
5
+ * are permitted provided that the following conditions are met:
6
+ *
7
+ * 1. Redistributions of source code must retain the above copyright notice,
8
+ * this list of conditions and the following disclaimer.
9
+ *
10
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ * this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
12
+ *
13
+ * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
14
+ * from this software without specific prior written permission.
15
+ *
16
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
19
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+ *
24
+ */
25
25
package org .qiyi .video .svg .fragment ;
26
26
27
27
import android .annotation .SuppressLint ;
34
34
import org .qiyi .video .svg .life .ActivityFragLifecycle ;
35
35
import org .qiyi .video .svg .log .Logger ;
36
36
import org .qiyi .video .svg .remote .IRemoteManager ;
37
- import org .qiyi .video .svg .remote .IRemoteManagerTreeNode ;
38
37
39
38
import java .util .Collections ;
40
39
import java .util .HashSet ;
@@ -56,8 +55,6 @@ public class RemoteManagerFragment extends Fragment {
56
55
57
56
private final Set <RemoteManagerFragment > childRemoteManagerFrags = new HashSet <>();
58
57
59
- private final FragmentRemoteManagerTreeNode remoteManagerTreeNode = new FragmentRemoteManagerTreeNode ();
60
-
61
58
public RemoteManagerFragment () {
62
59
this (new ActivityFragLifecycle ());
63
60
}
@@ -192,28 +189,10 @@ private Fragment getParentFragmentUsingHint() {
192
189
return fragment != null ? fragment : parentFragmentHint ;
193
190
}
194
191
195
- private class FragmentRemoteManagerTreeNode implements IRemoteManagerTreeNode {
196
- @ Override
197
- public Set <IRemoteManager > getDescendants () {
198
- Set <RemoteManagerFragment > descendantFragments = getDescendantRemoteManagerFragments ();
199
- Set <IRemoteManager > descendants = new HashSet <>(descendantFragments .size ());
200
- for (RemoteManagerFragment fragment : descendantFragments ) {
201
- if (fragment .getRemoteManager () != null ) {
202
- descendants .add (fragment .getRemoteManager ());
203
- }
204
- }
205
- return descendants ;
206
- }
207
- }
208
-
209
192
public ActivityFragLifecycle getLifecycle () {
210
193
return lifecycle ;
211
194
}
212
195
213
- public FragmentRemoteManagerTreeNode getRemoteManagerTreeNode () {
214
- return remoteManagerTreeNode ;
215
- }
216
-
217
196
public void setRemoteManager (IRemoteManager remoteManager ) {
218
197
this .remoteManager = remoteManager ;
219
198
}
0 commit comments