diff --git a/app/build.gradle b/app/build.gradle index 1be06c8..a2b2695 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,7 +8,7 @@ android { targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -37,17 +37,17 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" - implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.supportLibraryVersion" - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' // implementation(name: 'ttlock-release-3.0.7', ext: 'aar') - implementation 'no.nordicsemi.android:dfu:1.1.1' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation 'no.nordicsemi.android:dfu:1.11.1' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' implementation 'com.google.code.gson:gson:2.6.2' - implementation 'com.ttlock:ttlock:3.1.9' + implementation 'com.ttlock:ttlock:3.2.4' implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0' } diff --git a/app/src/androidTest/java/tool/pubhouse/com/ttlocksdkdemo/ExampleInstrumentedTest.java b/app/src/androidTest/java/tool/pubhouse/com/ttlocksdkdemo/ExampleInstrumentedTest.java index 27cc584..513a61d 100644 --- a/app/src/androidTest/java/tool/pubhouse/com/ttlocksdkdemo/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/tool/pubhouse/com/ttlocksdkdemo/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package tool.pubhouse.com.ttlocksdkdemo; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/main/java/ttlock/demo/AuthActivity.java b/app/src/main/java/ttlock/demo/AuthActivity.java index 8fab7c3..4195f5b 100644 --- a/app/src/main/java/ttlock/demo/AuthActivity.java +++ b/app/src/main/java/ttlock/demo/AuthActivity.java @@ -1,6 +1,6 @@ package ttlock.demo; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.view.View; diff --git a/app/src/main/java/ttlock/demo/BaseActivity.java b/app/src/main/java/ttlock/demo/BaseActivity.java index 3616593..d695db3 100644 --- a/app/src/main/java/ttlock/demo/BaseActivity.java +++ b/app/src/main/java/ttlock/demo/BaseActivity.java @@ -3,7 +3,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.widget.Toast; import com.ttlock.bl.sdk.api.TTLockClient; diff --git a/app/src/main/java/ttlock/demo/IndexActivity.java b/app/src/main/java/ttlock/demo/IndexActivity.java index 7eef0d2..3bd0d2d 100644 --- a/app/src/main/java/ttlock/demo/IndexActivity.java +++ b/app/src/main/java/ttlock/demo/IndexActivity.java @@ -1,6 +1,6 @@ package ttlock.demo; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import ttlock.demo.databinding.ActivityIndexBinding; diff --git a/app/src/main/java/ttlock/demo/MainActivity.java b/app/src/main/java/ttlock/demo/MainActivity.java index 60b35bd..715d5e5 100644 --- a/app/src/main/java/ttlock/demo/MainActivity.java +++ b/app/src/main/java/ttlock/demo/MainActivity.java @@ -1,12 +1,11 @@ package ttlock.demo; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import ttlock.demo.databinding.ActivityMainBinding; import ttlock.demo.fingerprint.FingerprintActivity; import ttlock.demo.firmwareupdate.FirmwareUpdateActivity; -import ttlock.demo.gateway.UserGatewayActivity; import ttlock.demo.iccard.ICCardActivity; import ttlock.demo.lock.LockApiActivity; import ttlock.demo.passcode.PasscodeActivity; diff --git a/app/src/main/java/ttlock/demo/fingerprint/FingerprintActivity.java b/app/src/main/java/ttlock/demo/fingerprint/FingerprintActivity.java index 6135f80..0258004 100644 --- a/app/src/main/java/ttlock/demo/fingerprint/FingerprintActivity.java +++ b/app/src/main/java/ttlock/demo/fingerprint/FingerprintActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.fingerprint; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/fingerprint/FingerprintModifyActivity.java b/app/src/main/java/ttlock/demo/fingerprint/FingerprintModifyActivity.java index 6652f04..c1acf9a 100644 --- a/app/src/main/java/ttlock/demo/fingerprint/FingerprintModifyActivity.java +++ b/app/src/main/java/ttlock/demo/fingerprint/FingerprintModifyActivity.java @@ -2,7 +2,7 @@ import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/fingerprint/FinggerprintAdapter.java b/app/src/main/java/ttlock/demo/fingerprint/FinggerprintAdapter.java index 522f25f..bac9880 100644 --- a/app/src/main/java/ttlock/demo/fingerprint/FinggerprintAdapter.java +++ b/app/src/main/java/ttlock/demo/fingerprint/FinggerprintAdapter.java @@ -1,9 +1,9 @@ package ttlock.demo.fingerprint; import android.app.Activity; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/fingerprint/MyFingerprintListActivity.java b/app/src/main/java/ttlock/demo/fingerprint/MyFingerprintListActivity.java index 16c245e..37dfe65 100644 --- a/app/src/main/java/ttlock/demo/fingerprint/MyFingerprintListActivity.java +++ b/app/src/main/java/ttlock/demo/fingerprint/MyFingerprintListActivity.java @@ -1,8 +1,8 @@ package ttlock.demo.fingerprint; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; import android.util.Log; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/firmwareupdate/FirmwareUpdateActivity.java b/app/src/main/java/ttlock/demo/firmwareupdate/FirmwareUpdateActivity.java index 6bde54f..9be6660 100644 --- a/app/src/main/java/ttlock/demo/firmwareupdate/FirmwareUpdateActivity.java +++ b/app/src/main/java/ttlock/demo/firmwareupdate/FirmwareUpdateActivity.java @@ -1,6 +1,11 @@ package ttlock.demo.firmwareupdate; -import android.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.databinding.DataBindingUtil; + +import android.Manifest; +import android.content.pm.PackageManager; import android.os.Bundle; import android.view.View; @@ -29,6 +34,7 @@ public class FirmwareUpdateActivity extends BaseActivity { private ActivityFirmwareUpdateBinding binding; private LockUpgradeObj lockUpgradeObj; private boolean isFailure; + protected static final int REQUEST_PERMISSION_REQ_CODE = 11; @Override protected void onCreate(Bundle savedInstanceState) { @@ -131,6 +137,10 @@ public void onFail(LockError error) { } private void startDfu() { + if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { + requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_PERMISSION_REQ_CODE); + return; + } if (mCurrentLock != null) { LockDfuClient.getDefault().startDfu(getApplicationContext(), ApiService.CLIENT_ID, MyApplication.getmInstance().getAccountInfo().getAccess_token(), mCurrentLock.getLockId(), mCurrentLock.getLockData(), mCurrentLock.getLockMac(), new DfuCallback() { @Override @@ -186,6 +196,25 @@ private void initListener(){ }); } + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + if(grantResults.length == 0 ){ + return; + } + + switch (requestCode) { + case REQUEST_PERMISSION_REQ_CODE: { + if (grantResults[0] == PackageManager.PERMISSION_GRANTED && permissions[0].equals(Manifest.permission.ACCESS_FINE_LOCATION)) { + startDfu(); + } + break; + } + default: + break; + } + } + /** * stopBTService should be called when Activity is finishing to release Bluetooth resource. */ diff --git a/app/src/main/java/ttlock/demo/gateway/GatewayActivity.java b/app/src/main/java/ttlock/demo/gateway/GatewayActivity.java index 6ed24db..814bce0 100644 --- a/app/src/main/java/ttlock/demo/gateway/GatewayActivity.java +++ b/app/src/main/java/ttlock/demo/gateway/GatewayActivity.java @@ -5,12 +5,12 @@ import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.LinearLayoutManager; import com.ttlock.bl.sdk.gateway.api.GatewayClient; import com.ttlock.bl.sdk.gateway.callback.ScanGatewayCallback; diff --git a/app/src/main/java/ttlock/demo/gateway/GatewayDfuActivity.java b/app/src/main/java/ttlock/demo/gateway/GatewayDfuActivity.java index 9b01c20..9fbae75 100644 --- a/app/src/main/java/ttlock/demo/gateway/GatewayDfuActivity.java +++ b/app/src/main/java/ttlock/demo/gateway/GatewayDfuActivity.java @@ -2,7 +2,7 @@ import android.app.Activity; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.view.View; diff --git a/app/src/main/java/ttlock/demo/gateway/InitGatewayActivity.java b/app/src/main/java/ttlock/demo/gateway/InitGatewayActivity.java index 3c7d62e..5fd57b9 100644 --- a/app/src/main/java/ttlock/demo/gateway/InitGatewayActivity.java +++ b/app/src/main/java/ttlock/demo/gateway/InitGatewayActivity.java @@ -2,7 +2,7 @@ import android.app.Activity; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.text.TextUtils; diff --git a/app/src/main/java/ttlock/demo/gateway/UserGatewayActivity.java b/app/src/main/java/ttlock/demo/gateway/UserGatewayActivity.java index 487b944..77d6cc9 100644 --- a/app/src/main/java/ttlock/demo/gateway/UserGatewayActivity.java +++ b/app/src/main/java/ttlock/demo/gateway/UserGatewayActivity.java @@ -1,8 +1,8 @@ package ttlock.demo.gateway; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; import com.google.gson.reflect.TypeToken; import com.ttlock.bl.sdk.util.GsonUtil; diff --git a/app/src/main/java/ttlock/demo/gateway/adapter/GatewayListAdapter.java b/app/src/main/java/ttlock/demo/gateway/adapter/GatewayListAdapter.java index a8be8c0..f0e1ba6 100644 --- a/app/src/main/java/ttlock/demo/gateway/adapter/GatewayListAdapter.java +++ b/app/src/main/java/ttlock/demo/gateway/adapter/GatewayListAdapter.java @@ -1,8 +1,8 @@ package ttlock.demo.gateway.adapter; import android.app.Activity; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/gateway/adapter/UserGatewayListAdapter.java b/app/src/main/java/ttlock/demo/gateway/adapter/UserGatewayListAdapter.java index 87d96cb..5c8ef7b 100644 --- a/app/src/main/java/ttlock/demo/gateway/adapter/UserGatewayListAdapter.java +++ b/app/src/main/java/ttlock/demo/gateway/adapter/UserGatewayListAdapter.java @@ -2,8 +2,8 @@ import android.app.Activity; import android.content.Context; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/gateway/dialog/ChooseNetDialog.java b/app/src/main/java/ttlock/demo/gateway/dialog/ChooseNetDialog.java index 8c37465..fce05a7 100644 --- a/app/src/main/java/ttlock/demo/gateway/dialog/ChooseNetDialog.java +++ b/app/src/main/java/ttlock/demo/gateway/dialog/ChooseNetDialog.java @@ -2,13 +2,13 @@ import android.content.Context; import android.content.DialogInterface; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.design.widget.BottomSheetBehavior; -import android.support.design.widget.BottomSheetDialog; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import com.google.android.material.bottomsheet.BottomSheetBehavior; +import com.google.android.material.bottomsheet.BottomSheetDialog; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -73,7 +73,7 @@ public void onClick(View v) { } }); - View view = getDelegate().findViewById(android.support.design.R.id.design_bottom_sheet); + View view = getDelegate().findViewById(com.google.android.material.R.id.design_bottom_sheet); final BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.from(view); // bottomSheetBehavior.setSkipCollapsed(false); // bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); diff --git a/app/src/main/java/ttlock/demo/iccard/ICCardActivity.java b/app/src/main/java/ttlock/demo/iccard/ICCardActivity.java index 0a47460..63bde06 100644 --- a/app/src/main/java/ttlock/demo/iccard/ICCardActivity.java +++ b/app/src/main/java/ttlock/demo/iccard/ICCardActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.iccard; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/iccard/ICCardListAdapter.java b/app/src/main/java/ttlock/demo/iccard/ICCardListAdapter.java index eba3f0a..5701354 100644 --- a/app/src/main/java/ttlock/demo/iccard/ICCardListAdapter.java +++ b/app/src/main/java/ttlock/demo/iccard/ICCardListAdapter.java @@ -1,9 +1,9 @@ package ttlock.demo.iccard; import android.app.Activity; -import android.databinding.DataBindingUtil; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/iccard/ICCardModifyActivity.java b/app/src/main/java/ttlock/demo/iccard/ICCardModifyActivity.java index 0cc4346..366e6ad 100644 --- a/app/src/main/java/ttlock/demo/iccard/ICCardModifyActivity.java +++ b/app/src/main/java/ttlock/demo/iccard/ICCardModifyActivity.java @@ -2,7 +2,7 @@ import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/iccard/MyICCardListActivity.java b/app/src/main/java/ttlock/demo/iccard/MyICCardListActivity.java index 686b11c..fa9516c 100644 --- a/app/src/main/java/ttlock/demo/iccard/MyICCardListActivity.java +++ b/app/src/main/java/ttlock/demo/iccard/MyICCardListActivity.java @@ -1,8 +1,8 @@ package ttlock.demo.iccard; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/lock/EnableDisableSomeLockFuncionActivity.java b/app/src/main/java/ttlock/demo/lock/EnableDisableSomeLockFuncionActivity.java index 158df5c..cce87e3 100644 --- a/app/src/main/java/ttlock/demo/lock/EnableDisableSomeLockFuncionActivity.java +++ b/app/src/main/java/ttlock/demo/lock/EnableDisableSomeLockFuncionActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; @@ -10,7 +10,6 @@ import com.ttlock.bl.sdk.callback.SetLockMuteModeCallback; import com.ttlock.bl.sdk.callback.SetRemoteUnlockSwitchCallback; import com.ttlock.bl.sdk.constant.FeatureValue; -import com.ttlock.bl.sdk.device.WirelessKeypad; import com.ttlock.bl.sdk.entity.LockError; import com.ttlock.bl.sdk.util.FeatureValueUtil; @@ -19,7 +18,6 @@ import okhttp3.ResponseBody; import retrofit2.Call; import ttlock.demo.BaseActivity; -import ttlock.demo.DateUtils; import ttlock.demo.MyApplication; import ttlock.demo.R; import ttlock.demo.databinding.ActivityEnableDisableSomeLockFuncionBinding; diff --git a/app/src/main/java/ttlock/demo/lock/LockApiActivity.java b/app/src/main/java/ttlock/demo/lock/LockApiActivity.java index 8c79b67..569b39a 100644 --- a/app/src/main/java/ttlock/demo/lock/LockApiActivity.java +++ b/app/src/main/java/ttlock/demo/lock/LockApiActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/lock/LockTimeActivity.java b/app/src/main/java/ttlock/demo/lock/LockTimeActivity.java index 06f6896..41fcaeb 100644 --- a/app/src/main/java/ttlock/demo/lock/LockTimeActivity.java +++ b/app/src/main/java/ttlock/demo/lock/LockTimeActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.ttlock.bl.sdk.api.TTLockClient; diff --git a/app/src/main/java/ttlock/demo/lock/PassageModeActivity.java b/app/src/main/java/ttlock/demo/lock/PassageModeActivity.java index 85b5883..4248819 100644 --- a/app/src/main/java/ttlock/demo/lock/PassageModeActivity.java +++ b/app/src/main/java/ttlock/demo/lock/PassageModeActivity.java @@ -1,7 +1,7 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.ttlock.bl.sdk.api.TTLockClient; diff --git a/app/src/main/java/ttlock/demo/lock/ScanLockActivity.java b/app/src/main/java/ttlock/demo/lock/ScanLockActivity.java index 7fb2666..a880b5c 100644 --- a/app/src/main/java/ttlock/demo/lock/ScanLockActivity.java +++ b/app/src/main/java/ttlock/demo/lock/ScanLockActivity.java @@ -4,12 +4,12 @@ import android.annotation.TargetApi; import android.content.Intent; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.LinearLayoutManager; import com.google.gson.reflect.TypeToken; import com.ttlock.bl.sdk.api.ExtendedBluetoothDevice; diff --git a/app/src/main/java/ttlock/demo/lock/UnlockActivity.java b/app/src/main/java/ttlock/demo/lock/UnlockActivity.java index 223b3a9..9840f50 100644 --- a/app/src/main/java/ttlock/demo/lock/UnlockActivity.java +++ b/app/src/main/java/ttlock/demo/lock/UnlockActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.util.Log; import android.widget.Toast; diff --git a/app/src/main/java/ttlock/demo/lock/UserLockActivity.java b/app/src/main/java/ttlock/demo/lock/UserLockActivity.java index f1a6812..86befcf 100644 --- a/app/src/main/java/ttlock/demo/lock/UserLockActivity.java +++ b/app/src/main/java/ttlock/demo/lock/UserLockActivity.java @@ -1,8 +1,8 @@ package ttlock.demo.lock; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; import com.google.gson.reflect.TypeToken; import com.ttlock.bl.sdk.util.GsonUtil; diff --git a/app/src/main/java/ttlock/demo/lock/adapter/LockListAdapter.java b/app/src/main/java/ttlock/demo/lock/adapter/LockListAdapter.java index 5c1f0df..b02c6ee 100644 --- a/app/src/main/java/ttlock/demo/lock/adapter/LockListAdapter.java +++ b/app/src/main/java/ttlock/demo/lock/adapter/LockListAdapter.java @@ -1,8 +1,8 @@ package ttlock.demo.lock.adapter; import android.app.Activity; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/lock/adapter/UserLockListAdapter.java b/app/src/main/java/ttlock/demo/lock/adapter/UserLockListAdapter.java index 9b37db2..b9abdee 100644 --- a/app/src/main/java/ttlock/demo/lock/adapter/UserLockListAdapter.java +++ b/app/src/main/java/ttlock/demo/lock/adapter/UserLockListAdapter.java @@ -1,8 +1,8 @@ package ttlock.demo.lock.adapter; import android.content.Context; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/passcode/AdminPasscodeActivity.java b/app/src/main/java/ttlock/demo/passcode/AdminPasscodeActivity.java index 95f9f39..1d829a6 100644 --- a/app/src/main/java/ttlock/demo/passcode/AdminPasscodeActivity.java +++ b/app/src/main/java/ttlock/demo/passcode/AdminPasscodeActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.passcode; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.text.TextUtils; diff --git a/app/src/main/java/ttlock/demo/passcode/CreateCustomPasscodeActivity.java b/app/src/main/java/ttlock/demo/passcode/CreateCustomPasscodeActivity.java index 4167877..23d3b88 100644 --- a/app/src/main/java/ttlock/demo/passcode/CreateCustomPasscodeActivity.java +++ b/app/src/main/java/ttlock/demo/passcode/CreateCustomPasscodeActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.passcode; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.text.TextUtils; diff --git a/app/src/main/java/ttlock/demo/passcode/ModifyPasscodeActivity.java b/app/src/main/java/ttlock/demo/passcode/ModifyPasscodeActivity.java index 7d29638..72756df 100644 --- a/app/src/main/java/ttlock/demo/passcode/ModifyPasscodeActivity.java +++ b/app/src/main/java/ttlock/demo/passcode/ModifyPasscodeActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.passcode; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.text.TextUtils; diff --git a/app/src/main/java/ttlock/demo/passcode/PasscodeActivity.java b/app/src/main/java/ttlock/demo/passcode/PasscodeActivity.java index 1003513..21467f8 100644 --- a/app/src/main/java/ttlock/demo/passcode/PasscodeActivity.java +++ b/app/src/main/java/ttlock/demo/passcode/PasscodeActivity.java @@ -1,6 +1,6 @@ package ttlock.demo.passcode; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.google.gson.reflect.TypeToken; diff --git a/app/src/main/java/ttlock/demo/wireless_keyboard/WirelessKeyboardActivity.java b/app/src/main/java/ttlock/demo/wireless_keyboard/WirelessKeyboardActivity.java index 889e777..9b24e46 100644 --- a/app/src/main/java/ttlock/demo/wireless_keyboard/WirelessKeyboardActivity.java +++ b/app/src/main/java/ttlock/demo/wireless_keyboard/WirelessKeyboardActivity.java @@ -3,12 +3,12 @@ import android.Manifest; import android.annotation.TargetApi; import android.content.pm.PackageManager; -import android.databinding.DataBindingUtil; +import androidx.databinding.DataBindingUtil; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.LinearLayoutManager; import com.google.gson.reflect.TypeToken; import com.ttlock.bl.sdk.api.TTLockClient; diff --git a/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/KeyboardListAdapter.java b/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/KeyboardListAdapter.java index 6742a77..d456729 100644 --- a/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/KeyboardListAdapter.java +++ b/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/KeyboardListAdapter.java @@ -1,8 +1,8 @@ package ttlock.demo.wireless_keyboard.adapter; import android.app.Activity; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/UserLockListAdapter.java b/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/UserLockListAdapter.java index 278af8b..ba5235b 100644 --- a/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/UserLockListAdapter.java +++ b/app/src/main/java/ttlock/demo/wireless_keyboard/adapter/UserLockListAdapter.java @@ -1,8 +1,8 @@ package ttlock.demo.wireless_keyboard.adapter; import android.content.Context; -import android.databinding.DataBindingUtil; -import android.support.v7.widget.RecyclerView; +import androidx.databinding.DataBindingUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/res/layout/activity_admin_passcode.xml b/app/src/main/res/layout/activity_admin_passcode.xml index e7de7fc..639244c 100644 --- a/app/src/main/res/layout/activity_admin_passcode.xml +++ b/app/src/main/res/layout/activity_admin_passcode.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_auth.xml b/app/src/main/res/layout/activity_auth.xml index fc8f517..15baf7f 100644 --- a/app/src/main/res/layout/activity_auth.xml +++ b/app/src/main/res/layout/activity_auth.xml @@ -1,6 +1,6 @@ - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_create_custom_passcode.xml b/app/src/main/res/layout/activity_create_custom_passcode.xml index c1a348a..b170431 100644 --- a/app/src/main/res/layout/activity_create_custom_passcode.xml +++ b/app/src/main/res/layout/activity_create_custom_passcode.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_enable_disable_some_lock_funcion.xml b/app/src/main/res/layout/activity_enable_disable_some_lock_funcion.xml index 0d5b5df..78fe700 100644 --- a/app/src/main/res/layout/activity_enable_disable_some_lock_funcion.xml +++ b/app/src/main/res/layout/activity_enable_disable_some_lock_funcion.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_firmware_update.xml b/app/src/main/res/layout/activity_firmware_update.xml index 835a3d1..b9916bb 100644 --- a/app/src/main/res/layout/activity_firmware_update.xml +++ b/app/src/main/res/layout/activity_firmware_update.xml @@ -1,6 +1,6 @@ - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_gateway.xml b/app/src/main/res/layout/activity_gateway.xml index 871b448..55c5651 100644 --- a/app/src/main/res/layout/activity_gateway.xml +++ b/app/src/main/res/layout/activity_gateway.xml @@ -25,11 +25,11 @@ android:id="@+id/btn_scan" android:textAllCaps="false" android:text="@string/scan"/> - - + diff --git a/app/src/main/res/layout/activity_key.xml b/app/src/main/res/layout/activity_key.xml index 6cb34b0..0bb553a 100644 --- a/app/src/main/res/layout/activity_key.xml +++ b/app/src/main/res/layout/activity_key.xml @@ -1,9 +1,9 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_lock_api.xml b/app/src/main/res/layout/activity_lock_api.xml index 07943a0..3c5892c 100644 --- a/app/src/main/res/layout/activity_lock_api.xml +++ b/app/src/main/res/layout/activity_lock_api.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_lock_time.xml b/app/src/main/res/layout/activity_lock_time.xml index 0332791..1595934 100644 --- a/app/src/main/res/layout/activity_lock_time.xml +++ b/app/src/main/res/layout/activity_lock_time.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_modify_passcode.xml b/app/src/main/res/layout/activity_modify_passcode.xml index 1b8738c..4c24da6 100644 --- a/app/src/main/res/layout/activity_modify_passcode.xml +++ b/app/src/main/res/layout/activity_modify_passcode.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/activity_my_fingerprint_list.xml b/app/src/main/res/layout/activity_my_fingerprint_list.xml index 83ca178..cc952fa 100644 --- a/app/src/main/res/layout/activity_my_fingerprint_list.xml +++ b/app/src/main/res/layout/activity_my_fingerprint_list.xml @@ -11,11 +11,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/my_fingerprint_list"/> - - + diff --git a/app/src/main/res/layout/activity_my_iccard_list.xml b/app/src/main/res/layout/activity_my_iccard_list.xml index 89d5b18..dcdd195 100644 --- a/app/src/main/res/layout/activity_my_iccard_list.xml +++ b/app/src/main/res/layout/activity_my_iccard_list.xml @@ -11,11 +11,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/my_card_list"/> - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_scan_lock.xml b/app/src/main/res/layout/activity_scan_lock.xml index a3641a3..fa7a004 100644 --- a/app/src/main/res/layout/activity_scan_lock.xml +++ b/app/src/main/res/layout/activity_scan_lock.xml @@ -31,10 +31,10 @@ android:textSize="16dp" android:text="scan result:" /> - - + diff --git a/app/src/main/res/layout/activity_user_gateway.xml b/app/src/main/res/layout/activity_user_gateway.xml index 994da11..910c981 100644 --- a/app/src/main/res/layout/activity_user_gateway.xml +++ b/app/src/main/res/layout/activity_user_gateway.xml @@ -1,6 +1,6 @@ - - - - + + diff --git a/app/src/main/res/layout/activity_user_lock.xml b/app/src/main/res/layout/activity_user_lock.xml index 10a2761..e0a8f2d 100644 --- a/app/src/main/res/layout/activity_user_lock.xml +++ b/app/src/main/res/layout/activity_user_lock.xml @@ -1,6 +1,6 @@ - - - - + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_wireless_keyboard.xml b/app/src/main/res/layout/activity_wireless_keyboard.xml index 462c8e0..8f4f356 100644 --- a/app/src/main/res/layout/activity_wireless_keyboard.xml +++ b/app/src/main/res/layout/activity_wireless_keyboard.xml @@ -31,10 +31,10 @@ android:textSize="16dp" android:text="scan result:" /> - - + diff --git a/app/src/main/res/layout/choose_net_dialog.xml b/app/src/main/res/layout/choose_net_dialog.xml index 66e0670..b491f7d 100644 --- a/app/src/main/res/layout/choose_net_dialog.xml +++ b/app/src/main/res/layout/choose_net_dialog.xml @@ -41,7 +41,7 @@ android:layout_alignParentBottom="true"/> -