diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4376e25..7b65f3e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,7 +14,7 @@ android { compileSdk = 34 defaultConfig { - applicationId = "com.tool.lockapp" + applicationId = "com.tool.lockapp.test" minSdk = 23 targetSdk = 34 versionCode = 2 diff --git a/app/google-services.json b/app/google-services.json index 396a95a..7336802 100644 --- a/app/google-services.json +++ b/app/google-services.json @@ -9,7 +9,7 @@ "client_info": { "mobilesdk_app_id": "1:302456749013:android:8bfd1909700112a18c1b5c", "android_client_info": { - "package_name": "com.tool.lockapp" + "package_name": "com.tool.lockapp.test" } }, "oauth_client": [], diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5a5f832..dc25ccf 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,6 +25,9 @@ android:supportsRtl="true" android:theme="@style/AppTheme" tools:targetApi="31"> + diff --git a/app/src/main/assets/privacy.html b/app/src/main/assets/privacy.html new file mode 100644 index 0000000..6af25cd --- /dev/null +++ b/app/src/main/assets/privacy.html @@ -0,0 +1,122 @@ + + + + + + Privacy Policy + + + +

Privacy Policy

+

Date: August 14, 2024

+ +

We provide this Privacy Policy to help you understand how we collect, use, and disclose + information, including what you may provide to us or that we obtain from our products and + services. We treat your privacy very seriously. Your privacy is important to us.

+ +

Information Collection and Use

+

For a better experience, while using our Service, we may require you to provide us with certain + personally identifiable information, such as users' name, address, location, pictures, etc. The + information that we request will be retained on your device and is not collected or retained by + us in any way and used as described in this privacy policy.

+

The app does use third-party services that may collect information used to identify you.

+

Please refer to the privacy policy of the third-party service provider used by the + application:

+ + +

Log Data

+

We want to inform you that whenever you use our Service, in case of an error in the app, we + collect data and information (through third-party products) on your phone called Log Data. This + Log Data may include information such as your device Internet Protocol (“IP”) address, device + name, operating system version, the configuration of the app when utilizing our Service, the + time and date of your use of the Service, and other statistics.

+ +

Cookies

+

Cookies are files with a small amount of data that are commonly used as anonymous unique + identifiers. These are sent to your browser from the websites that you visit and are stored on + your device's internal memory.

+

This Service does not use these “cookies” explicitly. However, the app may use third-party code + and libraries that use “cookies” to collect information and improve their services. You have the + option to either accept or refuse these cookies and know when a cookie is being sent to your + device. If you choose to refuse our cookies, you may not be able to use some portions of this + Service.

+ +

Service Providers

+

We may employ third-party companies and individuals due to the following reasons:

+ +

We want to inform users of this Service that these third parties have access to their Personal + Information. The reason is to perform the tasks assigned to them on our behalf. However, they + are obligated not to disclose or use the information for any other purpose.

+ +

Security

+

We value your trust in providing us your Personal Information, thus we are striving to use + commercially acceptable means of protecting it. But remember that no method of transmission over + the internet, or method of electronic storage is 100% secure and reliable, and we cannot + guarantee its absolute security.

+ +

Links to Other Sites

+

This Service may contain links to other sites. If you click on a third-party link, you will be + directed to that site. Note that these external sites are not operated by us. Therefore, we + strongly advise you to review the Privacy Policy of these websites. We have no control over and + assume no responsibility for the content, privacy policies, or practices of any third-party + sites or services.

+ +

Children’s Privacy

+

These Services do not address anyone under the age of 13. We do not knowingly collect personally + identifiable information from children under 13 years of age. In the case we discover that a + child under 13 has provided us with personal information, we will immediately delete this from + our servers. If you are a parent or guardian and you are aware that your child has provided us + with personal information, please contact us so that we will be able to take the necessary + actions.

+ +

Changes to This Privacy Policy

+

We may update our Privacy Policy from time to time. Thus, you are advised to review this page + periodically for any changes. We will notify you of any changes by posting the new Privacy + Policy on this page.

+ +

Privacy Questions

+

We may update the Privacy Policy from time to time. When we change the policy in a material way, + a notice will be posted on our website along with the updated Privacy Policy.

+

If you have any questions or concerns about our Privacy Policy or data processing, please contact + us: alokamalinga207.

+ + diff --git a/app/src/main/java/com/tool/applockpro/activity/SetPWDActivity.java b/app/src/main/java/com/tool/applockpro/activity/SetPWDActivity.java index cdd324e..e94aaae 100644 --- a/app/src/main/java/com/tool/applockpro/activity/SetPWDActivity.java +++ b/app/src/main/java/com/tool/applockpro/activity/SetPWDActivity.java @@ -9,6 +9,7 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.text.Editable; +import android.text.TextUtils; import android.text.TextWatcher; import android.util.Log; import android.view.View; @@ -33,6 +34,8 @@ public class SetPWDActivity extends AppCompatActivity { private List etlis = new ArrayList<>(); private int chewkpwd; private List ads; + private String firstPwd = ""; + private String secondPwd = ""; @Override protected void onCreate(Bundle savedInstanceState) { @@ -90,34 +93,72 @@ public class SetPWDActivity extends AppCompatActivity { binding.btnContinue.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + updateEditTextBackgrounds(); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(binding.et1.getText().toString()); stringBuilder.append(binding.et2.getText().toString()); stringBuilder.append(binding.et3.getText().toString()); stringBuilder.append(binding.et4.getText().toString()); if (stringBuilder.length() == 4) { - ApplockSkin.savePWD(stringBuilder.toString()); - if (chewkpwd == ApplockSkin.checkpwd_0) { - Intent intent = new Intent(SetPWDActivity.this, MainActivity.class); - Toast.makeText(SetPWDActivity.this, getString(R.string.setlock_tips), Toast.LENGTH_SHORT).show(); - startActivity(intent); - finish(); -// showAd(); + if (TextUtils.isEmpty(firstPwd)) { + firstPwd = stringBuilder.toString(); +// ApplockSkin.savePWD(stringBuilder.toString()); + Log.e("zzj", "---first set pwd---" + stringBuilder.toString()); +// etlis.clear(); +// stringBuilder.setLength(0); + Log.e("zzj", "---clear stringBuilder---" + stringBuilder.toString()); + binding.et1.setText(""); + binding.et2.setText(""); + binding.et3.setText(""); + binding.et4.setText(""); + binding.et1.requestFocus(); + setupEditTextListeners(); + binding.lockText1.setText(R.string.lock_re_enter); + } else { + setupEditTextListeners(); + stringBuilder.setLength(0); + stringBuilder.append(binding.et1.getText().toString()); + stringBuilder.append(binding.et2.getText().toString()); + stringBuilder.append(binding.et3.getText().toString()); + stringBuilder.append(binding.et4.getText().toString()); + Log.e("zzj", "---set stringBuilder---" + stringBuilder.toString()); + secondPwd = stringBuilder.toString(); + Log.e("zzj", "---get firstPwd---" + firstPwd); + if (secondPwd.equals(firstPwd)) { + ApplockSkin.savePWD(secondPwd); + Log.e("zzj", "---second set pwd---" + stringBuilder.toString()); + if (chewkpwd == ApplockSkin.checkpwd_0) { + Intent intent = new Intent(SetPWDActivity.this, MainActivity.class); + Toast.makeText(SetPWDActivity.this, getString(R.string.setlock_tips), Toast.LENGTH_SHORT).show(); + startActivity(intent); + finish(); +// showAd(); + } else { // Intent intent = new Intent(SetPWDActivity.this, MainActivity.class); -// // startActivity(intent); - Toast.makeText(SetPWDActivity.this, getString(R.string.changelock_tips), Toast.LENGTH_SHORT).show(); - showAd(); + Toast.makeText(SetPWDActivity.this, getString(R.string.changelock_tips), Toast.LENGTH_SHORT).show(); + showAd(); + } + } } + } else { Toast.makeText(SetPWDActivity.this, getString(R.string.text_hint), Toast.LENGTH_SHORT).show(); } } }); } - + private void updateEditTextBackgrounds() { + for (EditText editText : etlis) { + if (!TextUtils.isEmpty(editText.getText())) { + editText.setBackgroundResource(R.drawable.stepwd_check); + } else { + editText.setBackgroundResource(R.drawable.stepwd_uncheck); + } + } + } private void setupEditTextListeners() { for (int i = 0; i < etlis.size(); i++) { @@ -154,13 +195,14 @@ public class SetPWDActivity extends AppCompatActivity { currentEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { - if (currentEditText.getText().length() > 0) { + if (!TextUtils.isEmpty(currentEditText.getText())) { currentEditText.setBackgroundResource(R.drawable.stepwd_check); } else { currentEditText.setBackgroundResource(R.drawable.stepwd_uncheck); } } }); + } } } \ No newline at end of file diff --git a/app/src/main/java/com/tool/applockpro/activity/SettingActivity.java b/app/src/main/java/com/tool/applockpro/activity/SettingActivity.java index 03ef75f..e5782b6 100644 --- a/app/src/main/java/com/tool/applockpro/activity/SettingActivity.java +++ b/app/src/main/java/com/tool/applockpro/activity/SettingActivity.java @@ -29,6 +29,45 @@ public class SettingActivity extends AppCompatActivity { return insets; }); + + initEvent(); + + } + + private void initEvent() { + + binding.privacy.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(SettingActivity.this, WebActivity.class); + startActivity(intent); + } + }); + + binding.verisonText.setText("1.0.2"); + binding.rate.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String url = "https://play.google.com/store/apps/details?id=com.tool.lockapp"; + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + startActivity(intent); + } + }); + + binding.share.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent share = new Intent(Intent.ACTION_SEND); + share.setType("text/plain"); + share.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name); + String text = getString(R.string.share_title); + text = text + "\n https://play.google.com/store/apps/details?id=" + "com.tool.lockapp"; + share.putExtra(Intent.EXTRA_TEXT, text); + startActivity(Intent.createChooser(share, "choose one")); + } + }); + binding.changepwd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -39,15 +78,6 @@ public class SettingActivity extends AppCompatActivity { } }); - binding.privacy.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setData(Uri.parse("https://sites.google.com/view/privacy-policy-web-page")); - startActivity(intent); - } - }); - binding.cancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/java/com/tool/applockpro/activity/SplashActivity.java b/app/src/main/java/com/tool/applockpro/activity/SplashActivity.java index 9bb04ed..f47cc60 100644 --- a/app/src/main/java/com/tool/applockpro/activity/SplashActivity.java +++ b/app/src/main/java/com/tool/applockpro/activity/SplashActivity.java @@ -41,7 +41,7 @@ public class SplashActivity extends AppCompatActivity { }); ads = ApplockSkin.lodAd(); - countDownTimer = new CountDownTimer(10100, 100) { + countDownTimer = new CountDownTimer(1000, 100) { @Override public void onTick(long l) { i++; diff --git a/app/src/main/java/com/tool/applockpro/activity/WebActivity.java b/app/src/main/java/com/tool/applockpro/activity/WebActivity.java new file mode 100644 index 0000000..66cdcaf --- /dev/null +++ b/app/src/main/java/com/tool/applockpro/activity/WebActivity.java @@ -0,0 +1,36 @@ +package com.tool.applockpro.activity; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import android.annotation.SuppressLint; +import android.os.Bundle; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +import com.tool.applockpro.R; + +public class WebActivity extends AppCompatActivity { + + @SuppressLint("MissingInflatedId") + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_web); + EdgeToEdge.enable(this); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_web), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + + + WebView webView = findViewById(R.id.web); + webView.getSettings().setJavaScriptEnabled(true); + webView.setWebViewClient(new WebViewClient()); + webView.loadUrl("file:///android_asset/privacy.html"); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tool/applockpro/adapter/AppAdapter.java b/app/src/main/java/com/tool/applockpro/adapter/AppAdapter.java index 62ba6e9..3d84f8a 100644 --- a/app/src/main/java/com/tool/applockpro/adapter/AppAdapter.java +++ b/app/src/main/java/com/tool/applockpro/adapter/AppAdapter.java @@ -123,6 +123,7 @@ public class AppAdapter extends RecyclerView.Adapter { } }) .show(); + } }); } else { diff --git a/app/src/main/java/com/tool/applockpro/adapter/PageAdapter.java b/app/src/main/java/com/tool/applockpro/adapter/PageAdapter.java index 12c7725..d2810c6 100644 --- a/app/src/main/java/com/tool/applockpro/adapter/PageAdapter.java +++ b/app/src/main/java/com/tool/applockpro/adapter/PageAdapter.java @@ -9,7 +9,7 @@ import com.tool.applockpro.fragment.AllFragment; import java.util.List; -public class PageAdapter extends FragmentStatePagerAdapter { + public class PageAdapter extends FragmentStatePagerAdapter { private final List fragmentList; public PageAdapter(@NonNull FragmentManager fm, List list) { diff --git a/app/src/main/java/com/tool/applockpro/fragment/AllFragment.java b/app/src/main/java/com/tool/applockpro/fragment/AllFragment.java index 57849ae..45697db 100644 --- a/app/src/main/java/com/tool/applockpro/fragment/AllFragment.java +++ b/app/src/main/java/com/tool/applockpro/fragment/AllFragment.java @@ -91,7 +91,12 @@ public class AllFragment extends Fragment { @Override public void run() { List list1 = MyDataBase.getINSTANCE().mydao().getappissystem(false); - updateRecyclerView(list1); + requireActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + updateRecyclerView(list1); + } + }); } }); } else if (tabargs.equals("Lock")) { diff --git a/app/src/main/java/com/tool/applockpro/tool/Mymanager.java b/app/src/main/java/com/tool/applockpro/tool/Mymanager.java index f5ce3e3..5c11f59 100644 --- a/app/src/main/java/com/tool/applockpro/tool/Mymanager.java +++ b/app/src/main/java/com/tool/applockpro/tool/Mymanager.java @@ -5,6 +5,7 @@ import android.content.Context; import android.graphics.PixelFormat; import android.graphics.Point; import android.os.Build; +import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -85,11 +86,19 @@ public class Mymanager { layoutParams = new WindowManager.LayoutParams(); layoutParams.type = type; layoutParams.format = PixelFormat.RGBA_8888; - layoutParams.flags = WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | + layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | + WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | - WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | - WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; + WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | + WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; layoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; + +// WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | +// WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | +//// WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | +// WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; + + layoutParams.gravity = Gravity.CENTER; Point screenSize = new Point(); windowManager.getDefaultDisplay().getRealSize(screenSize); @@ -102,14 +111,17 @@ public class Mymanager { stringBuilder.setLength(0); Staticvalue.KEY_NUMBER = ""; windowManager.addView(mView, layoutParams); - + Log.e("zzj", "------showLockView success---"); } } public void unLock() { try { windowManager.removeView(mView); - } catch (Exception exception) { + Log.e("zzj", "------unlock success---"); + } catch (Exception e) { + e.printStackTrace(); + Log.e("zzj", "------unlock error---" + e.getMessage()); } } diff --git a/app/src/main/java/com/tool/applockpro/tool/PWDCallBcak.java b/app/src/main/java/com/tool/applockpro/tool/PWDCallBcak.java new file mode 100644 index 0000000..cb0f403 --- /dev/null +++ b/app/src/main/java/com/tool/applockpro/tool/PWDCallBcak.java @@ -0,0 +1,5 @@ +package com.tool.applockpro.tool; + +public interface PWDCallBcak { + void getPwd(); +} diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml index cc216d5..45c97fc 100644 --- a/app/src/main/res/layout/activity_setting.xml +++ b/app/src/main/res/layout/activity_setting.xml @@ -65,7 +65,7 @@ android:layout_marginTop="20dp" android:background="@drawable/bg_setting_cons" android:padding="16dp" - app:layout_constraintTop_toBottomOf="@id/changepwd"> + app:layout_constraintTop_toBottomOf="@id/rate"> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/number_input.xml b/app/src/main/res/layout/number_input.xml index 771c75d..fae5c5e 100644 --- a/app/src/main/res/layout/number_input.xml +++ b/app/src/main/res/layout/number_input.xml @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center_horizontal" - android:text="@string/lock_hint" + android:text="@string/lock_text1" android:textColor="@color/white" android:textSize="15sp" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 91f5a5e..7b586c0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -20,4 +20,9 @@ Query is empty Confirm Your PIN Crea un Pin de ingreso de 4 digitos + Share + Rate + Version + Here is a Lock App + Please re-enter the 4-digit \n password you just created \ No newline at end of file