@@ -115,7 +115,7 @@ private void multipleUploadBegins() {
115
115
116
116
Timber .d ("Multiple upload begins" );
117
117
118
- final ProgressDialog dialog = new ProgressDialog (MultipleShareActivity . this );
118
+ final ProgressDialog dialog = new ProgressDialog (this );
119
119
dialog .setIndeterminate (false );
120
120
dialog .setProgressStyle (ProgressDialog .STYLE_HORIZONTAL );
121
121
dialog .setMax (photosList .size ());
@@ -145,12 +145,12 @@ public void onUploadStarted(Contribution contribution) {
145
145
146
146
uploadsList .setImageOnlyMode (true );
147
147
148
- categorizationFragment = (CategorizationFragment ) this . getSupportFragmentManager ().findFragmentByTag ("categorization" );
148
+ categorizationFragment = (CategorizationFragment ) getSupportFragmentManager ().findFragmentByTag ("categorization" );
149
149
if (categorizationFragment == null ) {
150
150
categorizationFragment = new CategorizationFragment ();
151
151
}
152
152
// FIXME: Stops the keyboard from being shown 'stale' while moving out of this fragment into the next
153
- View target = this . getCurrentFocus ();
153
+ View target = getCurrentFocus ();
154
154
if (target != null ) {
155
155
InputMethodManager imm = (InputMethodManager ) target .getContext ().getSystemService (Context .INPUT_METHOD_SERVICE );
156
156
imm .hideSoftInputFromWindow (target .getWindowToken (), 0 );
@@ -203,7 +203,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
203
203
@ Override
204
204
protected void onCreate (Bundle savedInstanceState ) {
205
205
super .onCreate (savedInstanceState );
206
- uploadController = new UploadController (this );
206
+ uploadController = new UploadController ();
207
207
208
208
setContentView (R .layout .activity_multiple_uploads );
209
209
app = CommonsApplication .getInstance ();
@@ -221,18 +221,19 @@ protected void onCreate(Bundle savedInstanceState) {
221
221
@ Override
222
222
protected void onDestroy () {
223
223
super .onDestroy ();
224
+ getSupportFragmentManager ().removeOnBackStackChangedListener (this );
224
225
uploadController .cleanup ();
225
226
}
226
227
227
228
private void showDetail (int i ) {
228
229
if (mediaDetails == null ||!mediaDetails .isVisible ()) {
229
230
mediaDetails = new MediaDetailPagerFragment (true );
230
- this . getSupportFragmentManager ()
231
+ getSupportFragmentManager ()
231
232
.beginTransaction ()
232
233
.replace (R .id .uploadsFragmentContainer , mediaDetails )
233
234
.addToBackStack (null )
234
235
.commit ();
235
- this . getSupportFragmentManager ().executePendingTransactions ();
236
+ getSupportFragmentManager ().executePendingTransactions ();
236
237
}
237
238
mediaDetails .showImage (i );
238
239
}
@@ -267,7 +268,7 @@ protected void onAuthCookieAcquired(String authCookie) {
267
268
uploadsList = (MultipleUploadListFragment ) getSupportFragmentManager ().findFragmentByTag ("uploadsList" );
268
269
if (uploadsList == null ) {
269
270
uploadsList = new MultipleUploadListFragment ();
270
- this . getSupportFragmentManager ()
271
+ getSupportFragmentManager ()
271
272
.beginTransaction ()
272
273
.add (R .id .uploadsFragmentContainer , uploadsList , "uploadsList" )
273
274
.commit ();
0 commit comments