File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 20
20
import android .widget .EditText ;
21
21
import android .widget .Toast ;
22
22
import androidx .appcompat .app .AppCompatActivity ;
23
- import com .google .firebase .FirebaseApp ;
24
23
25
24
/** Activity for tester to compose and submit feedback. */
26
25
public class FeedbackActivity extends AppCompatActivity {
@@ -41,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
41
40
super .onCreate (savedInstanceState );
42
41
releaseName = getIntent ().getStringExtra (RELEASE_NAME_EXTRA_KEY );
43
42
screenshot = getIntent ().getParcelableExtra (SCREENSHOT_EXTRA_KEY );
44
- feedbackSender = FirebaseApp .getInstance (). get ( FeedbackSender . class );
43
+ feedbackSender = FeedbackSender .getInstance ();
45
44
setContentView (R .layout .activity_feedback );
46
45
}
47
46
Original file line number Diff line number Diff line change 15
15
package com .google .firebase .appdistribution .impl ;
16
16
17
17
import android .graphics .Bitmap ;
18
+ import androidx .annotation .NonNull ;
18
19
import com .google .android .gms .tasks .Task ;
20
+ import com .google .firebase .FirebaseApp ;
21
+ import com .google .firebase .appdistribution .FirebaseAppDistribution ;
22
+ import com .google .firebase .appdistribution .internal .FirebaseAppDistributionProxy ;
19
23
20
24
/** Sends tester feedback to the Tester API. */
21
25
class FeedbackSender {
@@ -26,6 +30,11 @@ class FeedbackSender {
26
30
this .testerApiClient = testerApiClient ;
27
31
}
28
32
33
+ @ NonNull
34
+ static FeedbackSender getInstance () {
35
+ return FirebaseApp .getInstance ().get (FeedbackSender .class );
36
+ }
37
+
29
38
/** Send feedback text and screenshot to the Tester API for the given release. */
30
39
Task <Void > sendFeedback (String releaseName , String feedbackText , Bitmap screenshot ) {
31
40
return testerApiClient
You can’t perform that action at this time.
0 commit comments