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

Commit 4179e9b8 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Adding broadcast receiver to handle SESSION_COMMIT broadcast

> Disabling Install shortcut broadcast for O and above
> Adding a preference to control automatic icon addition on homescreen
> Adding icons on homescreen for new installs based on the above preference

Bug: 32920609
Bug: 27967412
Change-Id: I92e5cb7c841fb445dc8bc058d975f212ee54f8d1
parent b07a355f
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -58,12 +58,21 @@
        <!-- Intent received used to install shortcuts from other applications -->
        <receiver
            android:name="com.android.launcher3.InstallShortcutReceiver"
            android:permission="com.android.launcher.permission.INSTALL_SHORTCUT">
            android:permission="com.android.launcher.permission.INSTALL_SHORTCUT"
            android:enabled="@bool/enable_install_shortcut_api" >
            <intent-filter>
                <action android:name="com.android.launcher.action.INSTALL_SHORTCUT" />
            </intent-filter>
        </receiver>

        <!-- Intent received when a session is committed -->
        <receiver
            android:name="com.android.launcher3.SessionCommitReceiver" >
            <intent-filter>
                <action android:name="android.content.pm.action.SESSION_COMMITTED" />
            </intent-filter>
        </receiver>

        <!-- Intent received used to initialize a restored widget -->
        <receiver android:name="com.android.launcher3.AppWidgetsRestoredReceiver" >
            <intent-filter>
+2 −0
Original line number Diff line number Diff line
@@ -18,4 +18,6 @@

<resources>
    <bool name="notification_badging_enabled">true</bool>

    <bool name="enable_install_shortcut_api">false</bool>
</resources>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -18,4 +18,6 @@

<resources>
    <bool name="notification_badging_enabled">false</bool>

    <bool name="enable_install_shortcut_api">true</bool>
</resources>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -179,6 +179,11 @@
    <!-- Text explaining that rotation is disabled in Display settings. 'Display' refers to the Display section in system settings [CHAR LIMIT=100] -->
    <string name="allow_rotation_blocked_desc">Current Display setting doesn\'t permit rotation</string>

    <!-- Label for the setting that allows the automatic placement of launcher shortcuts for applications and games installed on the device [CHAR LIMIT=40] -->
    <string name="auto_add_shortcuts_label">Add icon to Home screen</string>
    <!-- Text description of the setting that allows the automatic placement of launcher shortcuts for applications and games installed on the device [CHAR LIMIT=NONE] -->
    <string name="auto_add_shortcuts_description">For new apps</string>

    <!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
    <string name="package_state_unknown">Unknown</string>

+7 −0
Original line number Diff line number Diff line
@@ -23,4 +23,11 @@
            android:persistent="true"
    />

    <SwitchPreference
        android:key="pref_add_icon_to_home"
        android:title="@string/auto_add_shortcuts_label"
        android:summary="@string/auto_add_shortcuts_description"
        android:defaultValue="true"
        android:persistent="true"
        />
</PreferenceScreen>
Loading