-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1985 from LiskHQ/release/3.0.0
Merge release/3.0.0 into development
- Loading branch information
Showing
151 changed files
with
3,373 additions
and
2,176 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ DerivedData | |
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
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
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
39 changes: 39 additions & 0 deletions
39
android/app/src/main/java/com/lisk/ProviderInstallerModule.java
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,39 @@ | ||
package io.lisk.mobile; | ||
|
||
import android.app.Activity; | ||
import android.util.Log; | ||
|
||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.bridge.ReactContextBaseJavaModule; | ||
import com.facebook.react.bridge.ReactMethod; | ||
|
||
import com.google.android.gms.common.GooglePlayServicesNotAvailableException; | ||
import com.google.android.gms.common.GooglePlayServicesRepairableException; | ||
import com.google.android.gms.security.ProviderInstaller; | ||
|
||
public class ProviderInstallerModule extends ReactContextBaseJavaModule { | ||
private static ReactApplicationContext reactContext; | ||
private static final String TAG = "ProviderInstallerModule"; | ||
|
||
ProviderInstallerModule(ReactApplicationContext context) { | ||
super(context); | ||
reactContext = context; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "ProviderInstaller"; | ||
} | ||
|
||
@ReactMethod | ||
public void installIfNeeded() { | ||
final Activity activity = getCurrentActivity(); | ||
try { | ||
ProviderInstaller.installIfNeeded(activity); | ||
} catch (GooglePlayServicesRepairableException e) { | ||
Log.e(TAG, "Google Play Services Repairable", e); | ||
} catch (GooglePlayServicesNotAvailableException e) { | ||
Log.e(TAG, "Google Play Services Not Available", e); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
android/app/src/main/java/com/lisk/ProviderInstallerPackage.java
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 @@ | ||
package io.lisk.mobile; | ||
|
||
import com.facebook.react.ReactPackage; | ||
import com.facebook.react.bridge.NativeModule; | ||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.uimanager.ViewManager; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class ProviderInstallerPackage implements ReactPackage { | ||
|
||
@Override | ||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | ||
List<NativeModule> modules = new ArrayList<>(); | ||
|
||
modules.add(new ProviderInstallerModule(reactContext)); | ||
|
||
return modules; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
android/app/src/main/java/com/lisk/SensitiveClipboardModule.java
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,44 @@ | ||
package io.lisk.mobile; | ||
|
||
import android.content.ClipData; | ||
import android.content.ClipDescription; | ||
import android.content.ClipboardManager; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.PersistableBundle; | ||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.bridge.ReactContextBaseJavaModule; | ||
import com.facebook.react.bridge.ReactMethod; | ||
|
||
public class SensitiveClipboardModule extends ReactContextBaseJavaModule { | ||
|
||
private static ReactApplicationContext reactContext; | ||
|
||
SensitiveClipboardModule(ReactApplicationContext context) { | ||
super(context); | ||
reactContext = context; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "SensitiveClipboardModule"; | ||
} | ||
|
||
@ReactMethod | ||
public void copyToClipboardSensitive(String data) { | ||
ClipboardManager clipboard = (ClipboardManager) reactContext.getSystemService( | ||
Context.CLIPBOARD_SERVICE | ||
); | ||
|
||
PersistableBundle extras = new PersistableBundle(); | ||
extras.putBoolean(ClipDescription.EXTRA_IS_SENSITIVE, true); | ||
|
||
ClipData clip = ClipData.newPlainText(null, data); | ||
ClipDescription description = clip.getDescription(); | ||
description.setExtras(extras); | ||
ClipData newClip = new ClipData(description, new ClipData.Item(data)); | ||
|
||
clipboard.setPrimaryClip(newClip); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
android/app/src/main/java/com/lisk/SensitiveClipboardPackage.java
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,22 @@ | ||
package io.lisk.mobile; | ||
|
||
import com.facebook.react.ReactPackage; | ||
import com.facebook.react.bridge.NativeModule; | ||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.uimanager.ViewManager; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class SensitiveClipboardPackage implements ReactPackage { | ||
|
||
@Override | ||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | ||
return Arrays.<NativeModule>asList(new SensitiveClipboardModule(reactContext)); | ||
} | ||
|
||
@Override | ||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | ||
return Collections.emptyList(); | ||
} | ||
} |
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,27 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<data-extraction-rules> | ||
<cloud-backup> | ||
<exclude domain="root" | ||
path="." /> | ||
<exclude domain="file" | ||
path="." /> | ||
<exclude domain="database" | ||
path="." /> | ||
<exclude domain="sharedpref" | ||
path="." /> | ||
<exclude domain="external" | ||
path="." /> | ||
</cloud-backup> | ||
<device-transfer> | ||
<exclude domain="root" | ||
path="." /> | ||
<exclude domain="file" | ||
path="." /> | ||
<exclude domain="database" | ||
path="." /> | ||
<exclude domain="sharedpref" | ||
path="." /> | ||
<exclude domain="external" | ||
path="." /> | ||
</device-transfer> | ||
</data-extraction-rules> |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.