Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18227fa3 authored by Arc Wang's avatar Arc Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix resource problem in PrivateVolumeForgetTest" into sc-dev

parents ea1decfc 714d7be0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -63,7 +63,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec
            int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);

        LayoutInflater.from(context).inflate(R.layout.main_switch_bar, this);
        LayoutInflater.from(context).inflate(resourceId(context, "layout", "main_switch_bar"),
                this);

        setFocusable(true);
        setClickable(true);
@@ -255,4 +256,8 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec

        requestLayout();
    }

    private int resourceId(Context context, String type, String name) {
        return context.getResources().getIdentifier(name, type, context.getPackageName());
    }
}