Merge "Ensure that hasFirstRunActivity is only called when necessary" into jb-ub-now-kermit
This commit is contained in:
commit
13b563bcae
|
@ -4309,12 +4309,13 @@ public class Launcher extends Activity
|
|||
}
|
||||
|
||||
private boolean shouldRunFirstRunActivity() {
|
||||
return !ActivityManager.isRunningInTestHarness();
|
||||
return !ActivityManager.isRunningInTestHarness() &&
|
||||
!mSharedPrefs.getBoolean(FIRST_RUN_ACTIVITY_DISPLAYED, false);
|
||||
}
|
||||
|
||||
public void showFirstRunActivity() {
|
||||
if (shouldRunFirstRunActivity() && hasFirstRunActivity()
|
||||
&& !mSharedPrefs.getBoolean(FIRST_RUN_ACTIVITY_DISPLAYED, false)) {
|
||||
if (shouldRunFirstRunActivity() &&
|
||||
hasFirstRunActivity()) {
|
||||
Intent firstRunIntent = getFirstRunActivity();
|
||||
if (firstRunIntent != null) {
|
||||
startActivity(firstRunIntent);
|
||||
|
|
Loading…
Reference in New Issue