Skip to content

Commit

Permalink
Refactored AbstractFragment to not depend on AbstractInfoFragment (#487)
Browse files Browse the repository at this point in the history
Due to a previous refactoring, dataHolder was still of type
AbstractInfoFragment.DataHolder which should be just DataHolder
in AbstractFragment. Although AbstractInfoFragment inherits from
AbstractFragment the code works. However, on KitKat (4.4) some
devices reported a missing method which might be caused by this "weird"
inheriting. Hopefully this fixes that.
  • Loading branch information
poisdeux authored and SyncedSynapse committed Dec 5, 2017
1 parent 7e519eb commit 2aa4f93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/org/xbmc/kore/ui/AbstractFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

public class AbstractFragment extends Fragment {

private AbstractInfoFragment.DataHolder dataHolder;
private DataHolder dataHolder;

public void setDataHolder(AbstractInfoFragment.DataHolder dataHolder) {
public void setDataHolder(DataHolder dataHolder) {
this.dataHolder = dataHolder;
Bundle bundle = getArguments();
if (bundle == null) {
Expand All @@ -34,7 +34,7 @@ public void setDataHolder(AbstractInfoFragment.DataHolder dataHolder) {
}
}

public AbstractInfoFragment.DataHolder getDataHolder() {
public DataHolder getDataHolder() {
return dataHolder;
}

Expand All @@ -43,7 +43,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if( this.dataHolder == null ) {
this.dataHolder = new AbstractInfoFragment.DataHolder(-1);
this.dataHolder = new DataHolder(-1);
}

this.dataHolder.setBundle(getArguments());
Expand Down

0 comments on commit 2aa4f93

Please sign in to comment.