mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Remove geocoding activity from history by FLAG_ACTIVITY_CLEAR_TOP
With this, it's not opened again with onBackPressed in location view. But it still opens again when app was interrupted and being shown again. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
1676c9f6da
commit
95afdf7c81
@ -196,13 +196,11 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".location.LocationPickerActivity"
|
android:name=".location.LocationPickerActivity"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme" />
|
||||||
android:noHistory="true"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".location.GeocodingActivity"
|
android:name=".location.GeocodingActivity"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme" />
|
||||||
android:noHistory="true"/>
|
|
||||||
|
|
||||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
|
@ -115,6 +115,7 @@ class GeocodingActivity :
|
|||||||
val geocodingResult = GeocodingResult(address.latitude, address.longitude, address.displayName)
|
val geocodingResult = GeocodingResult(address.latitude, address.longitude, address.displayName)
|
||||||
|
|
||||||
val intent = Intent(this, LocationPickerActivity::class.java)
|
val intent = Intent(this, LocationPickerActivity::class.java)
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
intent.putExtra(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
intent.putExtra(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
||||||
intent.putExtra(BundleKeys.KEY_GEOCODING_RESULT, geocodingResult)
|
intent.putExtra(BundleKeys.KEY_GEOCODING_RESULT, geocodingResult)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
@ -197,6 +198,7 @@ class GeocodingActivity :
|
|||||||
|
|
||||||
override fun onMenuItemActionCollapse(menuItem: MenuItem): Boolean {
|
override fun onMenuItemActionCollapse(menuItem: MenuItem): Boolean {
|
||||||
val intent = Intent(context, LocationPickerActivity::class.java)
|
val intent = Intent(context, LocationPickerActivity::class.java)
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
intent.putExtra(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
intent.putExtra(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user