Skip to content

Commit

Permalink
add behaviour for assist app
Browse files Browse the repository at this point in the history
  • Loading branch information
TBog committed Oct 3, 2023
1 parent 5b1d4b1 commit eb06a5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/rocks/tbog/tblauncher/Behaviour.java
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,10 @@ public void onNewIntent() {
ShortcutUtil.addShortcut(mTBLauncherActivity, intent);
return;
}
if (Intent.ACTION_ASSIST.equals(action)) {
executeButtonAction("button-assist");
return;
}
}

executeButtonAction("button-home");
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
<string name="letters_toggle">Letter icons</string>
<string name="button_launcher">Launcher button</string>
<string name="button_home">Home button</string>
<string name="button_assist">Opened as assist app</string>
<string name="icon_contrast">Contrast</string>
<string name="icon_brightness">Brightness</string>
<string name="icon_hue">Hue</string>
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,13 @@
android:key="button-home"
android:title="@string/button_home" />

<ListPreference
android:defaultValue="showSearchBar"
android:entries="@array/gestureEntries"
android:entryValues="@array/gestureValues"
android:key="button-assist"
android:title="@string/button_assist" />

<androidx.preference.SwitchPreference
android:defaultValue="true"
android:key="behaviour-widget-after-launch"
Expand Down

0 comments on commit eb06a5e

Please sign in to comment.