-
Notifications
You must be signed in to change notification settings - Fork 159
[SDK-2459] Implement Consumer Protection Preferences #1206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
cba07b6
Initial commit
nsingh-branch 06cb614
Changed naming and added testbed button
nsingh-branch 8ed18c9
Updated naming
nsingh-branch 426b92f
Updated enum name
nsingh-branch 0a63df8
Fixed typo
nsingh-branch e8d1fe2
Updated automation testbed
nsingh-branch 41ac029
Update Defines.java
nsingh-branch 9b4763a
Fixed default behavior
nsingh-branch 1177a7c
Removed line from testbed
nsingh-branch 6ac68fe
Updated to point to correct automation branch
nsingh-branch 016f302
Updated enum and changed request format
nsingh-branch 910e7b3
Update ServerRequest.java
nsingh-branch 813cbac
Merge branch 'master' into SDK-2459
nsingh-branch 8450fad
Testbed update for Mobileboost tests
nsingh-branch df32586
More testbed edits
nsingh-branch a832b48
Removed Appium testbed changes
nsingh-branch fad61a8
Updated deprecation comment
nsingh-branch 96ceefe
Updated deprecation comment
nsingh-branch 022f9a9
Updated logic for re-enabling tracking
nsingh-branch cbd69ef
Updated Toast length
nsingh-branch e4aaad5
Added more logging
nsingh-branch 4182e19
Added callback exposure
nsingh-branch 052c6fa
Fixed typo
nsingh-branch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
5 changes: 5 additions & 0 deletions
5
Branch-SDK-TestBed/src/main/res/drawable/ic_baseline_security_24.xml
This file contains hidden or 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,5 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> | ||
|
|
||
| <path android:fillColor="@android:color/white" android:pathData="M12,1L3,5v6c0,5.55 3.84,10.74 9,12 5.16,-1.26 9,-6.45 9,-12L21,5l-9,-4zM12,11.99h7c-0.53,4.12 -3.28,7.79 -7,8.94L12,12L5,12L5,6.3l7,-3.11v8.8z"/> | ||
|
|
||
| </vector> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -538,10 +538,21 @@ public static void setCDNBaseUrl(String url) { | |
| * ({@code false}). | ||
| * @param callback An optional {@link TrackingStateCallback} instance for receiving callback notifications about | ||
| * the change in tracking state. This parameter can be {@code null} if no callback actions are needed. | ||
| * @deprecated Use {@link #setConsumerProtectionAttributionLevel(Defines.BranchAttributionLevel)} instead. | ||
| */ | ||
| public void disableTracking(boolean disableTracking, @Nullable TrackingStateCallback callback) { | ||
| trackingController.disableTracking(context_, disableTracking, callback); | ||
| } | ||
|
|
||
| /** | ||
| * Toggles the tracking state of the SDK. When tracking is disabled, the SDK will not track any user data or state, | ||
| * and it will not initiate any network calls except for deep linking operations. | ||
| * Re-enabling tracking will reinitialize the Branch session and resume normal SDK operations. | ||
| * | ||
| * @param disableTracking A boolean value indicating whether tracking should be disabled ({@code true}) or enabled | ||
| * ({@code false}). | ||
| * @deprecated Use {@link #setConsumerProtectionAttributionLevel(Defines.BranchAttributionLevel)} instead. | ||
| */ | ||
| public void disableTracking(boolean disableTracking) { | ||
|
||
| disableTracking(disableTracking, null); | ||
| } | ||
|
|
@@ -2576,4 +2587,21 @@ public static void setFBAppID(String fbAppID) { | |
| BranchLogger.w("setFBAppID: fbAppID cannot be empty or null"); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Sets the consumer protection attribution level | ||
| * | ||
| * @param level The consumer protection attribution level {@link Defines.BranchAttributionLevel}. | ||
| */ | ||
| public void setConsumerProtectionAttributionLevel(Defines.BranchAttributionLevel level) { | ||
| prefHelper_.setConsumerProtectionAttributionLevel(level); | ||
|
|
||
| if (level == Defines.BranchAttributionLevel.NONE) { | ||
| trackingController.disableTracking(context_, true, null); | ||
| } else { | ||
| trackingController.disableTracking(context_, false, null); | ||
| } | ||
|
|
||
| BranchLogger.v("Set Consumer Protection Preference to " + level); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.