Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdfac783 authored by Arc Wang's avatar Arc Wang
Browse files

Add android:configChanges for SettingsHomepageActivity

When resuming Settings app of large screen devices,
SettingsHomepageActivity will be re-created for
Activity resized. It produces unnecessary Activity
destroy and re-create.

This change prevents SettingsHomepageActivity from
configuration changes for screenSize|screenLayout.

Bug: 198361315
Test: manual
      1. Launch Settings app by a Settings shortcut widget.
      2. Move Settings app to background.
      3. Click Settings shortcut widget again.
         Observe if SettingsHomepageActivity re-creates.
Change-Id: I4d71330f6a1760768ba4443e192f66b0a2cbb6bf
parent f6a8f6c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@
                  android:taskAffinity="com.android.settings.root"
                  android:launchMode="singleTask"
                  android:exported="true"
                  android:configChanges="keyboard|keyboardHidden">
                  android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout">
            <intent-filter android:priority="1">
                <action android:name="android.settings.SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
+3 −0
Original line number Diff line number Diff line
@@ -208,6 +208,9 @@ public class SettingsHomepageActivity extends FragmentActivity implements
            return;
        }

        // To prevent launchDeepLinkIntentToRight again for configuration change.
        intent.setAction(null);

        targetIntent.setFlags(targetIntent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);

        targetIntent.putExtra(EXTRA_IS_FROM_SETTINGS_HOMEPAGE, true);