SupportActionModeWrapper.java
4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
package android.support.v7.view;
import android.annotation.TargetApi;
import android.content.Context;
import android.support.annotation.RestrictTo;
import android.support.v4.internal.view.SupportMenu;
import android.support.v4.internal.view.SupportMenuItem;
import android.support.v4.util.SimpleArrayMap;
import android.support.v7.view.menu.MenuWrapperFactory;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import java.util.ArrayList;
@TargetApi(11)
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public class SupportActionModeWrapper
extends android.view.ActionMode
{
final Context a;
final ActionMode b;
public SupportActionModeWrapper(Context paramContext, ActionMode paramActionMode)
{
this.a = paramContext;
this.b = paramActionMode;
}
public void finish()
{
this.b.finish();
}
public View getCustomView()
{
return this.b.getCustomView();
}
public Menu getMenu()
{
return MenuWrapperFactory.wrapSupportMenu(this.a, (SupportMenu)this.b.getMenu());
}
public MenuInflater getMenuInflater()
{
return this.b.getMenuInflater();
}
public CharSequence getSubtitle()
{
return this.b.getSubtitle();
}
public Object getTag()
{
return this.b.getTag();
}
public CharSequence getTitle()
{
return this.b.getTitle();
}
public boolean getTitleOptionalHint()
{
return this.b.getTitleOptionalHint();
}
public void invalidate()
{
this.b.invalidate();
}
public boolean isTitleOptional()
{
return this.b.isTitleOptional();
}
public void setCustomView(View paramView)
{
this.b.setCustomView(paramView);
}
public void setSubtitle(int paramInt)
{
this.b.setSubtitle(paramInt);
}
public void setSubtitle(CharSequence paramCharSequence)
{
this.b.setSubtitle(paramCharSequence);
}
public void setTag(Object paramObject)
{
this.b.setTag(paramObject);
}
public void setTitle(int paramInt)
{
this.b.setTitle(paramInt);
}
public void setTitle(CharSequence paramCharSequence)
{
this.b.setTitle(paramCharSequence);
}
public void setTitleOptionalHint(boolean paramBoolean)
{
this.b.setTitleOptionalHint(paramBoolean);
}
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static class CallbackWrapper
implements ActionMode.Callback
{
final android.view.ActionMode.Callback a;
final Context b;
final ArrayList<SupportActionModeWrapper> c;
final SimpleArrayMap<Menu, Menu> d;
public CallbackWrapper(Context paramContext, android.view.ActionMode.Callback paramCallback)
{
this.b = paramContext;
this.a = paramCallback;
this.c = new ArrayList();
this.d = new SimpleArrayMap();
}
private Menu a(Menu paramMenu)
{
Menu localMenu2 = (Menu)this.d.get(paramMenu);
Menu localMenu1 = localMenu2;
if (localMenu2 == null)
{
localMenu1 = MenuWrapperFactory.wrapSupportMenu(this.b, (SupportMenu)paramMenu);
this.d.put(paramMenu, localMenu1);
}
return localMenu1;
}
public android.view.ActionMode getActionModeWrapper(ActionMode paramActionMode)
{
int j = this.c.size();
int i = 0;
while (i < j)
{
SupportActionModeWrapper localSupportActionModeWrapper = (SupportActionModeWrapper)this.c.get(i);
if ((localSupportActionModeWrapper != null) && (localSupportActionModeWrapper.b == paramActionMode)) {
return localSupportActionModeWrapper;
}
i += 1;
}
paramActionMode = new SupportActionModeWrapper(this.b, paramActionMode);
this.c.add(paramActionMode);
return paramActionMode;
}
public boolean onActionItemClicked(ActionMode paramActionMode, MenuItem paramMenuItem)
{
return this.a.onActionItemClicked(getActionModeWrapper(paramActionMode), MenuWrapperFactory.wrapSupportMenuItem(this.b, (SupportMenuItem)paramMenuItem));
}
public boolean onCreateActionMode(ActionMode paramActionMode, Menu paramMenu)
{
return this.a.onCreateActionMode(getActionModeWrapper(paramActionMode), a(paramMenu));
}
public void onDestroyActionMode(ActionMode paramActionMode)
{
this.a.onDestroyActionMode(getActionModeWrapper(paramActionMode));
}
public boolean onPrepareActionMode(ActionMode paramActionMode, Menu paramMenu)
{
return this.a.onPrepareActionMode(getActionModeWrapper(paramActionMode), a(paramMenu));
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/view/SupportActionModeWrapper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/