package ῲ.ῲ.ඓ;

import android.content.Context;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import java.util.ArrayList;
import ῲ.ᨨ.㸾.K.AbstractMenuC1864;
import ῲ.ᨨ.㸾.K.AbstractMenuItemC1863;
import ῲ.ῲ.ඓ.AbstractC1890;
import ῲ.ῲ.ඓ.㳳.MenuC1899;
import ῲ.ῲ.ඓ.㳳.MenuItemC1904;
import ῲ.㴹.C2288;

/* renamed from: ῲ.ῲ.ඓ.㴹  reason: contains not printable characters */
/* compiled from: SupportActionModeWrapper */
public class C1935 extends ActionMode {

    /* renamed from: ῲ  reason: contains not printable characters */
    public final AbstractC1890 f6607;

    /* renamed from: K  reason: contains not printable characters */
    public final Context f6608;

    public C1935(Context context, AbstractC1890 r2) {
        this.f6608 = context;
        this.f6607 = r2;
    }

    public void finish() {
        this.f6607.m4901();
    }

    public View getCustomView() {
        return this.f6607.m4897();
    }

    public Menu getMenu() {
        return new MenuC1899(this.f6608, (AbstractMenuC1864) this.f6607.m4895());
    }

    public MenuInflater getMenuInflater() {
        return this.f6607.m4907();
    }

    public CharSequence getSubtitle() {
        return this.f6607.m4896();
    }

    public Object getTag() {
        return this.f6607.f6393;
    }

    public CharSequence getTitle() {
        return this.f6607.m4906();
    }

    public boolean getTitleOptionalHint() {
        return this.f6607.f6392;
    }

    public void invalidate() {
        this.f6607.m4900();
    }

    public boolean isTitleOptional() {
        return this.f6607.m4908();
    }

    public void setCustomView(View view) {
        this.f6607.m4903(view);
    }

    @Override // android.view.ActionMode
    public void setSubtitle(CharSequence charSequence) {
        this.f6607.m4904(charSequence);
    }

    public void setTag(Object obj) {
        this.f6607.f6393 = obj;
    }

    @Override // android.view.ActionMode
    public void setTitle(CharSequence charSequence) {
        this.f6607.m4899(charSequence);
    }

    public void setTitleOptionalHint(boolean z) {
        this.f6607.m4905(z);
    }

    @Override // android.view.ActionMode
    public void setSubtitle(int i) {
        this.f6607.m4902(i);
    }

    @Override // android.view.ActionMode
    public void setTitle(int i) {
        this.f6607.m4898(i);
    }

    /* renamed from: ῲ.ῲ.ඓ.㴹$K  reason: contains not printable characters */
    /* compiled from: SupportActionModeWrapper */
    public static class C1936 implements AbstractC1890.AbstractC1891 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final ArrayList<C1935> f6609 = new ArrayList<>();

        /* renamed from: ῲ  reason: contains not printable characters */
        public final Context f6610;

        /* renamed from: K  reason: contains not printable characters */
        public final ActionMode.Callback f6611;

        /* renamed from: 㸾  reason: contains not printable characters */
        public final C2288<Menu, Menu> f6612 = new C2288<>();

        public C1936(Context context, ActionMode.Callback callback) {
            this.f6610 = context;
            this.f6611 = callback;
        }

        @Override // ῲ.ῲ.ඓ.AbstractC1890.AbstractC1891
        /* renamed from: ῲ  reason: contains not printable characters */
        public boolean m5006(AbstractC1890 r2, Menu menu) {
            return this.f6611.onCreateActionMode(m5005(r2), m5007(menu));
        }

        @Override // ῲ.ῲ.ඓ.AbstractC1890.AbstractC1891
        /* renamed from: K  reason: contains not printable characters */
        public boolean m5009(AbstractC1890 r2, Menu menu) {
            return this.f6611.onPrepareActionMode(m5005(r2), m5007(menu));
        }

        /* renamed from: ῲ  reason: contains not printable characters */
        public ActionMode m5005(AbstractC1890 r5) {
            int size = this.f6609.size();
            for (int i = 0; i < size; i++) {
                C1935 r2 = this.f6609.get(i);
                if (r2 != null && r2.f6607 == r5) {
                    return r2;
                }
            }
            C1935 r0 = new C1935(this.f6610, r5);
            this.f6609.add(r0);
            return r0;
        }

        @Override // ῲ.ῲ.ඓ.AbstractC1890.AbstractC1891
        /* renamed from: K  reason: contains not printable characters */
        public boolean m5010(AbstractC1890 r4, MenuItem menuItem) {
            return this.f6611.onActionItemClicked(m5005(r4), new MenuItemC1904(this.f6610, (AbstractMenuItemC1863) menuItem));
        }

        @Override // ῲ.ῲ.ඓ.AbstractC1890.AbstractC1891
        /* renamed from: K  reason: contains not printable characters */
        public void m5008(AbstractC1890 r2) {
            this.f6611.onDestroyActionMode(m5005(r2));
        }

        /* renamed from: K  reason: contains not printable characters */
        public final Menu m5007(Menu menu) {
            Menu orDefault = this.f6612.getOrDefault(menu, null);
            if (orDefault != null) {
                return orDefault;
            }
            MenuC1899 r0 = new MenuC1899(this.f6610, (AbstractMenuC1864) menu);
            this.f6612.put(menu, r0);
            return r0;
        }
    }
}
