質問編集履歴
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -81,3 +81,97 @@
|
|
81
81
|
|
82
82
|
|
83
83
|
解決策をご教示ください。
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
【追記】
|
88
|
+
|
89
|
+
A地点からB地点の間に、Android Studioは、下記のコードを実行するようです(デバッグ中に判明)。
|
90
|
+
|
91
|
+
```Java
|
92
|
+
|
93
|
+
final void performRestart() {
|
94
|
+
|
95
|
+
mFragments.noteStateNotSaved();
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
if (mToken != null && mParent == null) {
|
100
|
+
|
101
|
+
// No need to check mStopped, the roots will check if they were actually stopped.
|
102
|
+
|
103
|
+
WindowManagerGlobal.getInstance().setStoppedState(mToken, false /* stopped */);
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
if (mStopped) {
|
110
|
+
|
111
|
+
mStopped = false;
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
synchronized (mManagedCursors) {
|
116
|
+
|
117
|
+
final int N = mManagedCursors.size();
|
118
|
+
|
119
|
+
for (int i=0; i<N; i++) {
|
120
|
+
|
121
|
+
ManagedCursor mc = mManagedCursors.get(i);
|
122
|
+
|
123
|
+
if (mc.mReleased || mc.mUpdated) {
|
124
|
+
|
125
|
+
if (!mc.mCursor.requery()) {
|
126
|
+
|
127
|
+
if (getApplicationInfo().targetSdkVersion
|
128
|
+
|
129
|
+
>= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
130
|
+
|
131
|
+
throw new IllegalStateException(
|
132
|
+
|
133
|
+
"trying to requery an already closed cursor "
|
134
|
+
|
135
|
+
+ mc.mCursor);//←A-1
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
mc.mReleased = false;
|
142
|
+
|
143
|
+
mc.mUpdated = false;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
mCalled = false;
|
154
|
+
|
155
|
+
mInstrumentation.callActivityOnRestart(this);
|
156
|
+
|
157
|
+
if (!mCalled) {
|
158
|
+
|
159
|
+
throw new SuperNotCalledException(
|
160
|
+
|
161
|
+
"Activity " + mComponent.toShortString() +
|
162
|
+
|
163
|
+
" did not call through to super.onRestart()");
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
performStart();
|
168
|
+
|
169
|
+
}
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
```
|
174
|
+
|
175
|
+
このコードの「throw new IllegalStateException("trying to requery an already closed cursor "+ mc.mCursor);」が実行され(上記「A-1」)、その後フリーズします。
|
176
|
+
|
177
|
+
これがフリーズと関係あるのでしょうか?(throwではあるが、エラーではない・・・?いかし、IllegalStateExceptionを検索すると、「不正または不適切~」とヒット)
|
2
誤字修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
アクティビティを起動中にフリーズ
|
1
|
+
アクティビティを起動中にフリーズ
|
test
CHANGED
File without changes
|
1
誤字修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
アクティビティを起動中にフリーズ
|
1
|
+
アクティビティを起動中にフリーズ叔父修正
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
```Java
|
14
14
|
|
15
|
-
public class u
|
15
|
+
public class ui_menu extends AppCompatActivity {
|
16
16
|
|
17
17
|
MediaPlayer mediaPlayer = MediaPlayer.create(getApplicationContext(), R.raw.apoptosis);
|
18
18
|
|