Skip to content
This repository was archived by the owner on Jul 27, 2019. It is now read-only.

Commit e21e7b1

Browse files
committed
Added lifecycle methods for checking user auth status.
1 parent 26c4909 commit e21e7b1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

asset-browser-ui/app/src/main/java/com/adobe/assetbrowserui/MainActivity.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.adobe.assetbrowserui;
22

3+
import android.content.Intent;
34
import android.os.Bundle;
45
import android.support.design.widget.FloatingActionButton;
56
import android.support.design.widget.Snackbar;
@@ -71,6 +72,42 @@ private void showAuthenticatedUI() {
7172

7273
}
7374

75+
@Override
76+
protected void onResume() {
77+
super.onResume();
78+
mAuthSessionHelper.onResume();
79+
}
80+
81+
@Override
82+
protected void onPause() {
83+
super.onPause();
84+
mAuthSessionHelper.onPause();
85+
}
86+
87+
@Override
88+
protected void onStart() {
89+
super.onStart();
90+
mAuthSessionHelper.onStart();
91+
}
92+
93+
@Override
94+
protected void onStop() {
95+
super.onStop();
96+
mAuthSessionHelper.onStop();
97+
}
98+
99+
@Override
100+
protected void onDestroy() {
101+
super.onDestroy();
102+
mAuthSessionHelper.onDestroy();
103+
}
104+
105+
@Override
106+
public void onActivityResult(int requestCode, int resultCode, Intent data) {
107+
super.onActivityResult(requestCode, resultCode, data);
108+
mAuthSessionHelper.onActivityResult(requestCode, resultCode, data);
109+
}
110+
74111
@Override
75112
public boolean onCreateOptionsMenu(Menu menu) {
76113
// Inflate the menu; this adds items to the action bar if it is present.

0 commit comments

Comments
 (0)