-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InternalLinksOrigin Feature Flag (#5180)
Task/Issue URL: https://app.asana.com/0/488551667048375/1208598624281034/f ### Description Add FF for internal links origin ### Steps to test this PR ℹ️ Wait for #5138 to be merged or merge the branch locally for testing _MacOS, FF disabled_ - [ ] Install from branch - [ ] Go to Settings > DuckDuckGo Mac Browser - [ ] Tap on 'Share Link' button - [ ] Check link doesn't have an origin attached to the link _Windows, FF disabled_ - [ ] Install from branch - [ ] Go to Settings > DuckDuckGo Windows Browser - [ ] Tap on 'Share Link' button - [ ] Check link doesn't have an origin attached to the link _MacOS, FF enabled - [ ] Change privacy-config link for `https://jsonblob.com/api/1279046082855034880` - [ ] Install from branch - [ ] Go to Settings > DuckDuckGo Mac Browser - [ ] Tap on 'Share Link' button - [ ] Check link have an origin attached to the link _Windows, FF enabled - [ ] Change privacy-config link for `https://jsonblob.com/api/1279046082855034880` - [ ] Install from branch - [ ] Go to Settings > DuckDuckGo Windows Browser - [ ] Tap on 'Share Link' button - [ ] Check link have an origin attached to the link ### No UI changes Co-authored-by: Cristian Monforte <[email protected]>
- Loading branch information
1 parent
19bb91a
commit 53c190a
Showing
12 changed files
with
141 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 8.5.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.5.1)" variant="all" version="8.5.1"> | ||
|
||
<issue | ||
id="DenyListedApi" | ||
message="If you find yourself using this API in production, you're doing something wrong!!" | ||
errorLine1=" macOsDownloadLinkOrigin.self().setRawStoredState(State(enable = true))" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/test/java/com/duckduckgo/macos/impl/MacOsViewModelTest.kt" | ||
line="55" | ||
column="9"/> | ||
</issue> | ||
|
||
<issue | ||
id="ContentDescription" | ||
message="Missing `contentDescription` attribute on image" | ||
errorLine1=" <ImageView" | ||
errorLine2=" ~~~~~~~~~"> | ||
<location | ||
file="src/main/res/layout/activity_macos.xml" | ||
line="38" | ||
column="14"/> | ||
</issue> | ||
|
||
</issues> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
macos/macos-impl/src/main/java/com/duckduckgo/macos/impl/MacOsDownloadLinkOrigin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2024 DuckDuckGo | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.duckduckgo.macos.impl | ||
|
||
import com.duckduckgo.anvil.annotations.ContributesRemoteFeature | ||
import com.duckduckgo.di.scopes.AppScope | ||
import com.duckduckgo.feature.toggles.api.Toggle | ||
|
||
@ContributesRemoteFeature( | ||
scope = AppScope::class, | ||
featureName = "macOsDownloadLinkOrigin", | ||
) | ||
interface MacOsDownloadLinkOrigin { | ||
@Toggle.DefaultValue(true) | ||
fun self(): Toggle | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 8.5.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.5.1)" variant="all" version="8.5.1"> | ||
|
||
<issue | ||
id="DenyListedApi" | ||
message="If you find yourself using this API in production, you're doing something wrong!!" | ||
errorLine1=" windowsShareLinkOrigin.self().setRawStoredState(State(enable = true))" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/test/java/com/duckduckgo/windows/impl/ui/WindowsViewModelTest.kt" | ||
line="53" | ||
column="9"/> | ||
</issue> | ||
|
||
</issues> |
30 changes: 30 additions & 0 deletions
30
windows/windows-impl/src/main/java/com/duckduckgo/windows/impl/WindowsDownloadLinkOrigin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2024 DuckDuckGo | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.duckduckgo.windows.impl | ||
|
||
import com.duckduckgo.anvil.annotations.ContributesRemoteFeature | ||
import com.duckduckgo.di.scopes.AppScope | ||
import com.duckduckgo.feature.toggles.api.Toggle | ||
|
||
@ContributesRemoteFeature( | ||
scope = AppScope::class, | ||
featureName = "windowsDownloadLinkOrigin", | ||
) | ||
interface WindowsDownloadLinkOrigin { | ||
@Toggle.DefaultValue(true) | ||
fun self(): Toggle | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters