-
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 15 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
77 changes: 77 additions & 0 deletions
77
Branch-SDK-TestBed/src/main/java/io/branch/branchandroidtestbed/LogOutputActivity.java
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,77 @@ | ||
| package io.branch.branchandroidtestbed; | ||
|
|
||
| import android.app.Activity; | ||
| import android.os.Bundle; | ||
| import android.view.Menu; | ||
| import android.view.MenuItem; | ||
| import android.widget.TextView; | ||
| import android.widget.Toast; | ||
|
|
||
| import java.io.BufferedReader; | ||
| import java.io.File; | ||
| import java.io.FileInputStream; | ||
| import java.io.InputStreamReader; | ||
|
|
||
| public class LogOutputActivity extends Activity { | ||
| private TextView logOutputTextView; | ||
| private File logFile; | ||
|
|
||
| @Override | ||
| protected void onCreate(Bundle savedInstanceState) { | ||
| super.onCreate(savedInstanceState); | ||
| setContentView(R.layout.activity_log_output); | ||
|
|
||
| logOutputTextView = findViewById(R.id.logOutputTextView); | ||
| logFile = new File(getFilesDir(), "branchlogs.txt"); | ||
| displayLogs(); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean onCreateOptionsMenu(Menu menu) { | ||
| getMenuInflater().inflate(R.menu.menu_log_output, menu); | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean onOptionsItemSelected(MenuItem item) { | ||
| if (item.getItemId() == R.id.action_clear_logs) { | ||
| clearLogs(); | ||
| return true; | ||
| } | ||
| return super.onOptionsItemSelected(item); | ||
| } | ||
|
|
||
| private void displayLogs() { | ||
| if (logFile.exists()) { | ||
| StringBuilder logContent = new StringBuilder(); | ||
|
|
||
| try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(logFile)))) { | ||
| String line; | ||
| while ((line = reader.readLine()) != null) { | ||
| logContent.append(line).append("\n"); | ||
| } | ||
| } catch (Exception e) { | ||
| e.printStackTrace(); | ||
| logContent.append("Error reading log file."); | ||
| } | ||
|
|
||
| logOutputTextView.setText(logContent.toString()); | ||
| } else { | ||
| logOutputTextView.setText("Log file not found."); | ||
| } | ||
| } | ||
|
|
||
| private void clearLogs() { | ||
| if (logFile.exists()) { | ||
| if (logFile.delete()) { | ||
| Toast.makeText(this, "Logs cleared.", Toast.LENGTH_SHORT).show(); | ||
| logOutputTextView.setText("Logs cleared."); | ||
| finish(); | ||
| } else { | ||
| Toast.makeText(this, "Failed to clear logs.", Toast.LENGTH_SHORT).show(); | ||
| } | ||
| } else { | ||
| Toast.makeText(this, "No log file to clear.", Toast.LENGTH_SHORT).show(); | ||
| } | ||
| } | ||
| } |
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/baseline_document_scanner_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="M7,3H4v3H2V1h5V3zM22,6V1h-5v2h3v3H22zM7,21H4v-3H2v5h5V21zM20,18v3h-3v2h5v-5H20zM19,18c0,1.1 -0.9,2 -2,2H7c-1.1,0 -2,-0.9 -2,-2V6c0,-1.1 0.9,-2 2,-2h10c1.1,0 2,0.9 2,2V18zM15,8H9v2h6V8zM15,11H9v2h6V11zM15,14H9v2h6V14z"/> | ||
|
|
||
| </vector> |
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> |
18 changes: 18 additions & 0 deletions
18
Branch-SDK-TestBed/src/main/res/layout/activity_log_output.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,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent"> | ||
|
|
||
| <ScrollView | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:padding="16dp"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/logOutputTextView" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:textSize="14sp" | ||
| android:text="Logs will appear here" /> | ||
| </ScrollView> | ||
| </RelativeLayout> |
Oops, something went wrong.
Oops, something went wrong.
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.