Updated on 2026-08-14
This commit is contained in:
parent
e8c6dfadee
commit
9a3107a395
8 changed files with 20 additions and 8 deletions
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
|
|
@ -9,7 +9,7 @@ android {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 26
|
versionCode 26
|
||||||
versionName "0.85.5.831.dev"
|
versionName "0.85.5.831"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">DEV</string>
|
<string name="app_name">DEV</string>
|
||||||
|
<string name="log_file_provider_authorities">com.tangem.data.LogFileProvider.debug</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<provider
|
<provider
|
||||||
android:name="com.tangem.data.LogFileProvider"
|
android:name="com.tangem.data.LogFileProvider"
|
||||||
android:authorities="com.tangem.data.LogFileProvider"
|
android:authorities="@string/log_file_provider_authorities"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true"/>
|
android:grantUriPermissions="true"/>
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,11 @@ import android.net.Uri;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.tangem.wallet.R;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by dvol on 15.02.2018.
|
* Created by dvol on 15.02.2018.
|
||||||
|
|
@ -20,7 +23,8 @@ public class LogFileProvider extends ContentProvider {
|
||||||
private static final String CLASS_NAME = "LogFileProvider";
|
private static final String CLASS_NAME = "LogFileProvider";
|
||||||
|
|
||||||
// The authority is the symbolic name for the provider class
|
// The authority is the symbolic name for the provider class
|
||||||
public static final String AUTHORITY = "com.tangem.LogFileProvider";
|
// public static final String AUTHORITY = "com.tangem.LogFileProvider";
|
||||||
|
// public static final String AUTHORITY = "com.tangem.LogFileProvider";
|
||||||
|
|
||||||
// UriMatcher used to match against incoming requests
|
// UriMatcher used to match against incoming requests
|
||||||
private UriMatcher uriMatcher;
|
private UriMatcher uriMatcher;
|
||||||
|
|
@ -32,7 +36,8 @@ public class LogFileProvider extends ContentProvider {
|
||||||
// Add a URI to the matcher which will match against the form
|
// Add a URI to the matcher which will match against the form
|
||||||
// 'content://it.my.app.LogFileProvider/*'
|
// 'content://it.my.app.LogFileProvider/*'
|
||||||
// and return 1 in the case that the incoming Uri matches this pattern
|
// and return 1 in the case that the incoming Uri matches this pattern
|
||||||
uriMatcher.addURI(AUTHORITY, "*", 1);
|
|
||||||
|
uriMatcher.addURI(Objects.requireNonNull(getContext()).getString(R.string.log_file_provider_authorities), "*", 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.tangem.presentation.activity;
|
package com.tangem.presentation.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
|
@ -35,13 +36,19 @@ public class LogoActivity extends AppCompatActivity {
|
||||||
imgLogo.setOnClickListener(view -> hide());
|
imgLogo.setOnClickListener(view -> hide());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
// trigger the initial hide() shortly after the activity has been created, to briefly hint to the user that UI controls are available.
|
// trigger the initial hide() shortly after the activity has been created, to briefly hint to the user that UI controls are available.
|
||||||
TextView AppVersion = findViewById(R.id.AppVersion);
|
TextView AppVersion = findViewById(R.id.AppVersion);
|
||||||
AppVersion.setText("BETA v." + BuildConfig.VERSION_NAME);
|
|
||||||
|
if (BuildConfig.DEBUG)
|
||||||
|
AppVersion.setText("BETA v." + BuildConfig.VERSION_NAME + "\n" + "dev" + "\n" + "build " + BuildConfig.VERSION_CODE);
|
||||||
|
else
|
||||||
|
AppVersion.setText("BETA v." + BuildConfig.VERSION_NAME);
|
||||||
|
|
||||||
if (!getIntent().getBooleanExtra("skipAutoHide", false)) {
|
if (!getIntent().getBooleanExtra("skipAutoHide", false)) {
|
||||||
delayedHide(1000);
|
delayedHide(1000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import com.scottyab.rootbeer.RootBeer;
|
import com.scottyab.rootbeer.RootBeer;
|
||||||
import com.skyfishjy.library.RippleBackground;
|
import com.skyfishjy.library.RippleBackground;
|
||||||
import com.tangem.data.LogFileProvider;
|
|
||||||
import com.tangem.domain.wallet.DeviceNFCAntennaLocation;
|
import com.tangem.domain.wallet.DeviceNFCAntennaLocation;
|
||||||
import com.tangem.domain.wallet.LastSignStorage;
|
import com.tangem.domain.wallet.LastSignStorage;
|
||||||
import com.tangem.domain.wallet.Logger;
|
import com.tangem.domain.wallet.Logger;
|
||||||
|
|
@ -294,8 +293,7 @@ public class MainActivity extends AppCompatActivity implements PopupMenu.OnMenuI
|
||||||
Compress compress = new Compress(fileNames, zipFile.getAbsolutePath());
|
Compress compress = new Compress(fileNames, zipFile.getAbsolutePath());
|
||||||
compress.zip();
|
compress.zip();
|
||||||
Log.e(logTag, String.format("Send %d bytes zip with logs", zipFile.length()));
|
Log.e(logTag, String.format("Send %d bytes zip with logs", zipFile.length()));
|
||||||
Uri attachment = Uri.parse("content://" + LogFileProvider.AUTHORITY + "/"
|
Uri attachment = Uri.parse("content://" + getString(R.string.log_file_provider_authorities) + "/" + zipFile.getName());
|
||||||
+ zipFile.getName());
|
|
||||||
|
|
||||||
intent.putExtra(Intent.EXTRA_STREAM, attachment);
|
intent.putExtra(Intent.EXTRA_STREAM, attachment);
|
||||||
zipFile.deleteOnExit();
|
zipFile.deleteOnExit();
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">Tangem Access</string>
|
<string name="app_name">Tangem Access</string>
|
||||||
|
<string name="log_file_provider_authorities">com.tangem.data.LogFileProvider</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue