Skip to content

Init project#2

Merged
sreilly merged 14 commits into
duckduckgo:masterfrom
TheInfiniteKind:develop
Feb 10, 2017
Merged

Init project#2
sreilly merged 14 commits into
duckduckgo:masterfrom
TheInfiniteKind:develop

Conversation

@fgei
Copy link
Copy Markdown
Contributor

@fgei fgei commented Jan 18, 2017

Remove code to have a browse-only app.
Add travis support to the repo.

fgei added 14 commits January 17, 2017 16:27
added all the file with a new proper project structure.
this will build a working browser-only version of the DDG app
Execution failed for task ':app:packageDebugAndroidTest'.
> Duplicate files copied in APK LICENSE.txt
fix with: 	  packagingOptions.exclude 'LICENSE.txt'
… intent bug

- Add to the manifest the PROCESS_TEXT intent filter to add DDG to the text selection toolbar. Handle the intent in the DDG activity when supported (SDK >= 23).
- Fix a bug that show the keyboard even when opening the app with a current session.
- Fix a bug when a new intent some time isn't processed correctly, handling everything now in ActivityCompat.onResumeFragments, so we can always process it properly and fragments are correctly attached and visible at this point.
@sreilly sreilly merged commit fe42f1d into duckduckgo:master Feb 10, 2017
@ghost ghost mentioned this pull request May 1, 2019
cmonfortep added a commit that referenced this pull request Oct 15, 2020
* change pulsing fire button animation to a more prominent one

* tweak animation to be more time visible

* Add param to indicate if fire button is highlighted

* fix pixels for FireDialog DaxCta

* add pixels for Fire dialog options + cta visibility

* use new variant keys for second experiment

* Run fire button animation only during 1h 

* Pin the toolbar when promoting Fire button
aitorvs pushed a commit that referenced this pull request May 6, 2021
CDRussell added a commit that referenced this pull request Nov 11, 2024
…5096)

Task/Issue URL: https://app.asana.com/0/608920331025315/1207446004465151/f 

### Description
Sets up new remote config handling for autofill subfeature: `canImportFromGooglePasswordManager`

This dictates whether we offer up the option to import passwords directly from Google Password Manager or not. 

Additional config:
| Key | Type | Description |
|--------|--------|--------|
| `launchUrl` | `String` | The initial URL to launch for Google Password Manager |
| `javascriptConfig` | `String` | The config to pass onto the JS layer handling GPM imports |

### Steps to test this PR
- QA optional; they'll be tested more easily in the branches above


**Optional**
- [x] Apply patch below
- [x] Fresh install, launch app and allow time for remote config to be downloaded
- [x] Open `Device Explorer` and check values look correct in `shared_prefs/com.duckduckgo.feature.toggle.autofill.xml`



### Patch
```
Index: privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt b/privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt
--- a/privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt	(revision Staged)
+++ b/privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt	(date 1730729845774)
@@ -27,4 +27,5 @@
     TrackingParametersFeatureName("trackingParameters"),
 }
 
-const val PRIVACY_REMOTE_CONFIG_URL = "https://staticcdn.duckduckgo.com/trackerblocking/config/v4/android-config.json"
+// in use for ship review build #2 const val PRIVACY_REMOTE_CONFIG_URL = "https://jsonblob.com/api/1299412335805194240"
+const val PRIVACY_REMOTE_CONFIG_URL = "https://jsonblob.com/api/1301563859532636160"
```
@anikiki anikiki mentioned this pull request Jul 28, 2025
18 tasks
anikiki added a commit that referenced this pull request Jul 28, 2025
Task/Issue URL:
https://app.asana.com/1/137249556945/project/414730916066338/task/1210860582231062?focus=true

### Description

This PR fixes an issue when using the "Web Search" context menu did not
work sometimes.

### Steps to test this PR

- [x] Use a physical device
- [x] Bring the app in the foreground and kill it to make sure it runs
fresh for the web search
- [x] Open a different app, like Gmail
- [x] Long press on some text and select "Web Search"
- [x] Notice that DDG app loads the query
- [x] Switch back to Gmail without dismissing the DDG app
- [x] Long press on a different text and select "Web Search"
- [x] Verify that DDG app loads the new query correctly

Regression testing #1
- [x] Ensure DDG is default browser.
- [x] Ensure DDG is NOT running. Press the recent apps button and note
that you do NOT see DDG there.
- [x] Open an app that is known to open links in Custom Tabs. I.e Gmail.
- [x] Open a link from that app and ensure it is open in a DDG Custom
Tab.
- [x] Press the recent apps button and ensure the Custom Tab looks as
expected (the logo is Gmail's logo). No other instance of DDG is shown.

Regression testing #2
- [x] Ensure DDG is default browser.
- [x] Ensure DDG IS running. Press the recent apps button and note that
you see DDG there.
- [x] Open an app that is known to open links in Custom Tabs. I.e Gmail.
- [x] Open a link from that app (Gmail) and ensure it is open in a DDG
Custom Tab.
- [x] Press the recent apps button and ensure the Custom Tab looks as
expected (the logo is Gmail's logo). The other instance of DDG is shown.

---------

Co-authored-by: Ana Capatina <anikiki@gmail.com>
joshliebe pushed a commit that referenced this pull request Aug 8, 2025
Task/Issue URL:
https://app.asana.com/1/137249556945/project/414730916066338/task/1210860582231062?focus=true

### Description

This PR fixes an issue when using the "Web Search" context menu did not
work sometimes.

### Steps to test this PR

- [x] Use a physical device
- [x] Bring the app in the foreground and kill it to make sure it runs
fresh for the web search
- [x] Open a different app, like Gmail
- [x] Long press on some text and select "Web Search"
- [x] Notice that DDG app loads the query
- [x] Switch back to Gmail without dismissing the DDG app
- [x] Long press on a different text and select "Web Search"
- [x] Verify that DDG app loads the new query correctly

Regression testing #1
- [x] Ensure DDG is default browser.
- [x] Ensure DDG is NOT running. Press the recent apps button and note
that you do NOT see DDG there.
- [x] Open an app that is known to open links in Custom Tabs. I.e Gmail.
- [x] Open a link from that app and ensure it is open in a DDG Custom
Tab.
- [x] Press the recent apps button and ensure the Custom Tab looks as
expected (the logo is Gmail's logo). No other instance of DDG is shown.

Regression testing #2
- [x] Ensure DDG is default browser.
- [x] Ensure DDG IS running. Press the recent apps button and note that
you see DDG there.
- [x] Open an app that is known to open links in Custom Tabs. I.e Gmail.
- [x] Open a link from that app (Gmail) and ensure it is open in a DDG
Custom Tab.
- [x] Press the recent apps button and ensure the Custom Tab looks as
expected (the logo is Gmail's logo). The other instance of DDG is shown.

---------

Co-authored-by: Ana Capatina <anikiki@gmail.com>
@cursor cursor Bot mentioned this pull request Dec 14, 2025
10 tasks
Copilot AI referenced this pull request in Caro-Kannn/Android Mar 1, 2026
…#2)

Co-authored-by: Caro-Kannn <166317099+Caro-Kannn@users.noreply.github.com>
YoussefKeyrouz added a commit that referenced this pull request Apr 10, 2026
… to NTP (#8235)

Task/Issue URL:
https://app.asana.com/1/137249556945/project/488551667048375/task/1213988415500467?focus=true

### Description

This PR has 2 commits. I recommend reviewing them separately.

Commit #1: revert the fix made in
#8224. It introduced an
undesirable side effect when tapping the hatch to navigate away. The
older tab flashes quickly before navigation
Commit #2: Fixing the actual root cause for the Hatch logo incorrectly
loading the wrong image after quick back navigation.

### Details on the fix (In commit #2):

The return hatch's favicon load uses a retry mechanism that launches
fire-and-forget coroutines on the view's lifecycleScope. When the hatch
re-renders with a different tab's data, the stale retries keep running
and overwrite the ImageView with the old favicon.
Even if we cancel the favicon coroutine, it does not cancel the retries
if they are launched as separate coroutines. So the existing load method
cannot be used.
1. Added a method to the FavIconManager that does the same thing with
the retry but they are canceleable
2. Canceled the favicon load when new loads are triggered or when the
coroutine is detached.

### Steps to test this PR
- Open a tab and navigate to a site (e.g., wikipedia.org), let it fully
load
- Open a new tab
- Navigate to a tracker-heavy site ideally new site where the fav icon
is not cached yet (I had good success with nba.com)
- Press back quickly while the page is still loading
- Observe the return hatch on the new tab page.
- If done a the right timing the escape hatch will incorrectly show the
NBA logo instead of wikipedia.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes favicon loading to a new cancellable retry path and alters the
"last accessed tab" query to include selected tabs, which can affect NTP
return-hatch behavior and any callers relying on the previous
non-selected semantics.
> 
> **Overview**
> Fixes the New Tab Page return hatch showing a stale/incorrect favicon
by introducing `FaviconManager.loadToViewFromLocalWithRetry`, where all
retries run in the calling coroutine and are cancelled when the job is
cancelled (the old `loadToViewFromLocalWithPlaceholder` is now
deprecated).
> 
> Updates `NewTabReturnHatchView` to cancel any in-flight favicon load
on re-render/detach and to use the new retry API. Separately, renames
and changes tab-access APIs from *last accessed non-selected tab* to
`lastAccessedTab`/`flowLastAccessedTab` (and updates tests) by removing
the exclusion of currently selected tabs in the Room query.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
2b529e8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
aitorvs added a commit that referenced this pull request Apr 13, 2026
aitorvs added a commit that referenced this pull request Apr 13, 2026
malmstein added a commit that referenced this pull request May 27, 2026
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1214157224317277/task/1215159003631557?focus=true

### Description

Two related navigation tweaks from the iOS Ship Review fallout that
apply
to Android — both small, both in service of the broader "Duck.ai opens
in
a new tab" model that the next PR delivers.

1. **Hide the Search/Duck.ai toggle inside a chat.** The toggle row only
makes sense in the browser context now that Duck.ai will open in a new
   tab; keeping it visible inside chat would spawn a new tab on every
   toggle interaction. `NativeInputState.toggleVisible` already excluded
   the contextual sheet — this extends the rule to the fullscreen chat,
phrased positively as `inputContext == BROWSER`. `applyOmnibarShape()`
   used `toggleVisible` to short-circuit and implicitly covered DUCK_AI;
its guard is narrowed to `inputContext != BROWSER` so DUCK_AI fullscreen
   doesn't fall through to the minimized-pill card styling.

2. **Show the back arrow whenever the chat-history sidebar is visible.**
The back arrow next to the sidebar only appeared when the user had the
   unified input on but the Search/Duck.ai toggle setting off — a narrow
   Search-Only case. With the toggle on (Search & Duck.ai), the arrow
stayed hidden, leaving no consistent way back to the previous tab while
   viewing a chat. Tying the arrow to the sidebar's own visibility makes
   both appear and disappear together; focus and voice-mode gating still
   sit on `showDuckAISidebar`. `isDuckAiBackAvailable` has no other
   consumers, so it and its dedicated tests are removed.

Companion Asana task for #2:
https://app.asana.com/1/137249556945/task/1215159003631561

### Steps to test this PR

_Toggle hidden in chat_
- [x] Open the app with the unified input enabled.
- [x] Tap the input to focus it on a browser tab; the Search/Duck.ai
toggle row appears.
- [x] Submit a Duck.ai query (or open a Duck.ai chat). Inside the chat,
focus the input again.
- [x] Confirm the Search/Duck.ai toggle row is not shown.
- [x] Open the contextual sheet over a webpage; toggle is still hidden
as before.
- [x] Open the input on a normal browser tab again; the toggle
reappears.

_Back arrow alongside the sidebar_
- [x] Enable the Search/Duck.ai toggle setting (Settings → Duck.ai).
- [x] Open a Duck.ai chat from anywhere (omnibar, history, etc.).
- [x] Confirm both the chat-history sidebar icon and the back arrow are
visible to the left of the address bar.
- [x] Disable the Search/Duck.ai toggle setting and repeat — both icons
still visible.
- [x] Focus the input on the chat tab; both icons hide together.
Defocus; both reappear.
- [x] Start voice mode; both icons hide. Exit voice; both reappear.

### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> UI and visibility rules in omnibar and native input only; no auth,
networking, or data-layer changes.
> 
> **Overview**
> Aligns Duck.ai omnibar and unified input behavior with **Duck.ai in
its own tab**: the Search/Duck.ai toggle only appears in **browser**
context, and the control beside chat history tracks the sidebar instead
of a narrow “search-only + native input” case.
> 
> **Unified input:** `NativeInputState.toggleVisible` is now true only
when `inputContext == BROWSER` (fullscreen chat and contextual sheet no
longer show the toggle). `NativeInputModeWidget.applyOmnibarShape()`
applies minimized-pill card styling only in browser context so
fullscreen Duck.ai does not inherit that shape. Tests reflect toggle
hidden in Duck.ai chat.
> 
> **Omnibar:** `showDuckBack` matches `showDuckAISidebar` (sidebar and
back/close control show and hide together). `isDuckAiBackAvailable` and
its dependency on the input-screen user setting are removed, along with
related ViewModel tests. `duckAiBack` uses the **close** icon instead of
the back arrow.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
65f05dc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: David Gonzalez <malmstein@Davids-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants