File tree 1 file changed +8
-0
lines changed
app/src/main/java/com/auth0/android/lock/app
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,10 @@ class DemoActivity : AppCompatActivity() {
162
162
}
163
163
}
164
164
165
+ // For demo purposes because options change dynamically, we release the resources of Lock here.
166
+ // In a real app, you will have a single instance and release its resources in Activity#OnDestroy.
167
+ lock?.onDestroy(this )
168
+ // Create a new instance with the updated configuration
165
169
lock = builder.build(this )
166
170
startActivity(lock!! .newIntent(this ))
167
171
}
@@ -179,6 +183,10 @@ class DemoActivity : AppCompatActivity() {
179
183
builder.useCode()
180
184
}
181
185
186
+ // For demo purposes because options change dynamically, we release the resources of Lock here.
187
+ // In a real app, you will have a single instance and release its resources in Activity#OnDestroy.
188
+ passwordlessLock?.onDestroy(this )
189
+ // Create a new instance with the updated configuration
182
190
passwordlessLock = builder.build(this )
183
191
startActivity(passwordlessLock!! .newIntent(this ))
184
192
}
You can’t perform that action at this time.
0 commit comments