Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
We use build flavours heavily with a lot of common code. The refactoring support in AS is really good but it continually catches us out when it doesn't work across all flavours in a project. It's a big gap for serious product development.
ar...@google.com <ar...@google.com> #3
We at my company need this same feature. We have a lot of white labels and need refactor the same class across flavours. :(
Description
Platforms affected: 24 and up
When a noHistory activity launches another with a SwipeRefreshLayout and setRefreshing(true) is called immediately, the previous activity is "waiting to stop" (according to dumpsys) until a 10 second timeout expires:
04-06 20:59:26.319 1550-1561/system_process I/ActivityManager: START u0 {cmp=com.erraticduck.swiperefreshtest/.BActivity} from uid 10060 on display 0
04-06 20:59:26.451 1550-1573/system_process I/ActivityManager: Displayed com.erraticduck.swiperefreshtest/.BActivity: +125ms
04-06 20:59:36.328 1550-1564/system_process W/ActivityManager: Launch timeout has expired, giving up wake lock!
Manifest:
<activity
android:name=".MainActivity"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".BActivity" />
MainActivity launches BActivity normally with no special flags.
Expected behavior: Once BActivity is launched, MainActivity is destroyed and user can no longer navigate back to it.
Actual behavior: MainActivity is stuck in "waiting to stop" state, onStop() is never called, and user can still navigate back within 10 seconds.
Source code: