Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fe1794d
UI Update
ThePieMonster Mar 11, 2022
80831d0
Create toolbar
ThePieMonster Mar 11, 2022
4bd4d59
Update strings.xml
ThePieMonster Mar 14, 2022
515a227
Adding changelog.test
ThePieMonster Mar 15, 2022
497bed7
Update gradle-build.yml
ThePieMonster Mar 15, 2022
032f044
Delete
ThePieMonster Mar 15, 2022
884ecc1
Update gradle-build.yml
ThePieMonster Mar 15, 2022
d715051
Update gradle-build.yml
ThePieMonster Mar 15, 2022
3132980
Update gradle-build.yml
ThePieMonster Mar 15, 2022
a730034
Update gradle-build.yml
ThePieMonster Mar 15, 2022
3020f7e
Update gradle-build.yml
ThePieMonster Mar 15, 2022
fe40311
Update gradle-build.yml
ThePieMonster Mar 15, 2022
ec866e6
Update gradle-build.yml
ThePieMonster Mar 15, 2022
cd5134a
Update gradle-build.yml
ThePieMonster Mar 15, 2022
eb51b33
Update gradle-build.yml
ThePieMonster Mar 15, 2022
eec10e7
Update gradle-build.yml
ThePieMonster Mar 15, 2022
8a995cf
Update gradle-build.yml
ThePieMonster Mar 16, 2022
74656af
Update gradle-build.yml
ThePieMonster Mar 16, 2022
b58ac7d
Update gradle-build.yml
ThePieMonster Mar 16, 2022
f948016
Update gradle-build.yml
ThePieMonster Mar 16, 2022
5786d13
Update gradle-build.yml
ThePieMonster Mar 16, 2022
2420e84
Update gradle-build.yml
ThePieMonster Mar 16, 2022
416fe1d
Update gradle-build.yml
ThePieMonster Mar 16, 2022
0934920
Update gradle-build.yml
ThePieMonster Mar 16, 2022
71c0f9f
Update gradle-build.yml
ThePieMonster Mar 16, 2022
41c08f9
Update gradle-build.yml
ThePieMonster Mar 16, 2022
9b662b2
Update build.gradle
ThePieMonster Mar 16, 2022
4368151
Revert
ThePieMonster Mar 17, 2022
7dce35b
Update README.md
ThePieMonster Mar 21, 2022
7be24e1
Merge branch 'main' into ThePieMonster-UI
ThePieMonster Mar 21, 2022
56c2ec1
Update gradle-build.yml
ThePieMonster Mar 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ jobs:
steps:
- name: PR Closed Without Merge
run: |
echo "PR #${{ github.event.number }} has been closed without being merged"
echo "PR #${{ github.event.number }} has been edited or closed without being merged"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Hide Mock Location is an Xposed Module (now LSPosed on Android 11), which hides
## Usage
* Install [module](https://github.com/Xposed-Modules-Repo/com.github.thepiemonster.hidemocklocation) from [LSPosed module store](https://github.com/LSPosed/LSPosed).
* Enable module in LSPosed (select System Framework) and reboot device.
* Start a mock location provider application such as [Fake GPS Location](https://play.google.com/store/apps/details?id=com.lexa.fakegps&hl=en_US&gl=US).
* That's it! You can open Hide Mock Location and view the "Test Location Data" page to view the status of the mock location setting.

## Tips
Expand Down
12 changes: 4 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.github.thepiemonster.hidemocklocation"
minSdk 30
targetSdk 30
versionCode 209
versionName "2.0.9"
versionCode 210
versionName "2.0.10"
}

signingConfigs {
Expand Down Expand Up @@ -53,16 +53,12 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//testImplementation 'junit:junit:4.12'

compileOnly 'de.robv.android.xposed:api:82'
compileOnly 'de.robv.android.xposed:api:82:sources'

implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.gms:google-services:4.3.10'

implementation 'com.google.android.material:material:1.5.0-alpha02'

implementation 'com.google.gms:google-services:4.3.10'
implementation 'com.drakeet.about:about:2.5.0'
implementation 'com.drakeet.multitype:multitype:4.3.0'
//implementation 'com.takisoft.fix:preference-v7:24.1.1.0'
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.Launcher">
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.View;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
import android.widget.Toolbar;


public class MainActivity extends AppCompatActivity {
Expand Down Expand Up @@ -78,6 +82,29 @@ protected void onCreate(Bundle savedInstanceState) {
// Go to activity_main layout
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
/*
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
// Display application icon in the toolbar
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setLogo(R.drawable.app_icon);
getSupportActionBar().setDisplayUseLogoEnabled(true);

// assigning ID of textView2 to a variable
textView = (TextView) findViewById(R.id.textView2);


// "on click" operations to be performed
textView.setOnClickListener(new View.OnClickListener() {
@Override

// incrementing the value of textView
public void onClick( View view ) {
count++;
textView.setText("" + count);
}
});*/

binding = ActivityMainBinding.inflate(getLayoutInflater()); // inflating our xml layout in our activity main binding
setModuleState(binding);
binding.menuDetectionTest.setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -198,7 +225,7 @@ public void getMockLocationSetting() {
string.setSpan(new ForegroundColorSpan(isMockSettingsNewerThanAndroid6Color), infoTextCount + isMockSettingsOlderThanAndroid6TextCountTotal + isMockSettingsNewerThanAndroid6TextCount, infoTextCount + isMockSettingsOlderThanAndroid6TextCountTotal + isMockSettingsNewerThanAndroid6TextCount + isMockSettingsNewerThanAndroid6BoolCount, SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);

dialogBuilder.setMessage(string);
dialogBuilder.setNegativeButton(getString(R.string.alert_dialog_close), new DialogInterface.OnClickListener() {
dialogBuilder.setPositiveButton(getString(R.string.alert_dialog_close), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
Expand Down Expand Up @@ -255,9 +282,6 @@ public void onProviderDisabled(String provider) {
}
};




/*
@OnCheckedChanged(R.id.list_type)
public void changeListType(boolean isChecked) {
Expand Down Expand Up @@ -295,30 +319,12 @@ public void changeListType(boolean isChecked) {
}
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.action_menu, menu);

final MenuItem searchItem = menu.findItem(R.id.action_search);
final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
// Resize searchView
searchView.setMaxWidth(Integer.MAX_VALUE);

searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
adapter.filter(query);
searchView.clearFocus();
return true;
}

@Override
public boolean onQueryTextChange(String newText) {
adapter.filter(newText);
return true;
}
});
return true;
}

Expand All @@ -337,11 +343,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
default:
return super.onOptionsItemSelected(item);
}
return true;
}
*/


}*/

/**
* Creates an alert dialog window with the supplied exception message
Expand Down Expand Up @@ -398,19 +400,21 @@ public void onClick(DialogInterface dialogInterface, int i) {
private void setModuleState(ActivityMainBinding binding) {
if (isModuleEnabled()) {
binding.moduleStatusCard.setCardBackgroundColor(getColor(R.color.purple_500));
binding.moduleStatusIcon.setImageDrawable(AppCompatResources.getDrawable(this,
R.drawable.baseline_check_circle_24));
//binding.moduleStatusCard.setBackgroundTintList(this.getColorStateList(R.color.purple_500));
binding.moduleStatusIcon.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.baseline_check_circle_24));
binding.moduleStatusText.setText(getString(R.string.card_title_activated));
binding.serviceStatusText.setText(getString(R.string.card_detail_activated));
binding.serveTimes.setText(getString(R.string.card_serve_time));
} else {
binding.moduleStatusCard.setCardBackgroundColor(getColor(R.color.red_500));
binding.moduleStatusIcon.setImageDrawable(AppCompatResources.getDrawable(this,
R.drawable.baseline_error_24));
//binding.moduleStatusCard.setBackgroundTintList(this.getColorStateList(R.color.red_500));
binding.moduleStatusIcon.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.baseline_error_24));
binding.moduleStatusText.setText(getText(R.string.card_title_not_activated));
binding.serviceStatusText.setText(getText(R.string.card_detail_not_activated));
binding.serveTimes.setVisibility(View.GONE);
}
binding.menuDetectionTest.setCardBackgroundColor(getColor(R.color.softGray));
binding.menuAbout.setCardBackgroundColor(getColor(R.color.softGray));
}

/**
Expand Down
Binary file removed app/src/main/res/drawable-hdpi/ic_action_search.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-hdpi/ic_settings.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-ldpi/ic_action_search.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-ldpi/ic_settings.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_action_search.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_settings.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_action_search.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_settings.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_settings.png
Binary file not shown.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/baseline_my_location_24.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
<path
android:fillColor="@android:color/white"
android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/baseline_settings_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
</vector>
45 changes: 42 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,53 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/AppTheme.Background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/softWhite">
android:orientation="vertical" >

<!-- AppBar layout for using Toolbar as AppBar -->
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- ToolBar widget -->
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title=" Hide Mock Location"
app:titleTextColor="@color/white"/>

<!-- Right most ImageView
<ImageView
style="@style/DefaultImage"
android:id="@+id/settingsIcon"
android:src="@drawable/baseline_settings_24"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/toolbar"
app:layout_constraintTop_toTopOf="parent" />-->

</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>

<com.google.android.material.card.MaterialCardView
android:id="@+id/module_status_card"
style="@style/DefaultCard">
style="@style/DefaultCard"
android:layout_below="@+id/appBarLayout">

<LinearLayout
style="@style/Default"
Expand Down
21 changes: 0 additions & 21 deletions app/src/main/res/menu/action_menu.xml

This file was deleted.

6 changes: 5 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#ff80ab</color>
<color name="colorDark">#757575</color>
<color name="preference_accent">@color/colorAccent</color>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
Expand All @@ -14,4 +13,9 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="softWhite">#EEEEEE</color>
<color name="softBlack">#121212</color>
<color name="softDarkGray1">#212121</color>
<color name="softDarkGray2">#1D1D1D</color>
<color name="softGray">#424242</color>
<color name="darkWhite">#B1B1B1</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<string name="about_introduction_content">This module is designed to hide the use of the Android Mock Locations feature from system and application usage. When this module is enabled, the mock locations feature will show as disabled to all applications. \n\nhttps://github.com/ThePieMonster/HideMockLocation</string>

<string name="about_legal_title">Legal</string>
<string name="about_legal_content">You agree to use this module (i.e. Hide Mock Locations) only for legally compliant purposes. You agree that the author will not be held liable for any consequences resulting from a violation of this statement. \n\nBy continuing to use this module, you agree to the above terms.</string>
<string name="about_legal_content">You agree to use this module (i.e. Hide Mock Location) only for legally compliant purposes. You agree that the author will not be held liable for any consequences resulting from a violation of this statement. \n\nBy continuing to use this module, you agree to the above terms.</string>

<string name="about_recommendation_title">Recommendations</string>

Expand Down
24 changes: 12 additions & 12 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<style name="AppTheme" parent="Theme.MaterialComponents">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorControlActivated">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/colorDark</item>
<item name="colorSwitchThumbNormal">@color/colorDark</item>
<item name="android:actionMenuTextColor">#fff</item>
<item name="android:textColor">@color/colorDark</item>
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColor">@color/white</item>
<item name="colorSwitchThumbNormal">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.ActionBar" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="android:actionMenuTextColor">#fff</item>
<item name="android:textColor">#fff</item>
<style name="AppTheme.Background" parent="Theme.MaterialComponents.NoActionBar">
<item name="android:background">@color/softDarkGray1</item>
</style>

<style name="AppTheme.Launcher" parent="Theme.MaterialComponents.NoActionBar">
Expand All @@ -27,20 +25,22 @@
<style name="AlertDialogTheme">
<item name="buttonBarPositiveButtonStyle">@style/Alert.Button.Positive</item>
<item name="buttonBarNeutralButtonStyle">@style/Alert.Button.Neutral</item>
<item name="backgroundColor">@color/colorPrimary</item>
</style>
<style name="Alert.Button.Positive" parent="Widget.MaterialComponents.Button.TextButton">
<item name="backgroundTint">@color/colorPrimaryDark</item>
<item name="rippleColor">@color/colorAccent</item>
<item name="android:textColor">@android:color/white</item>
<item name="backgroundTint">@android:color/transparent</item>
<item name="rippleColor">@color/colorPrimaryDark</item>
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:textSize">14sp</item>
</style>
<style name="Alert.Button.Neutral" parent="Widget.MaterialComponents.Button.TextButton">
<item name="backgroundTint">@android:color/transparent</item>
<item name="rippleColor">@color/colorAccent</item>
<item name="android:textColor">@android:color/darker_gray</item>
<item name="android:textColor">@color/purple_200</item>
<item name="android:textSize">14sp</item>
</style>


<!-- Rikka Design -->
<style name="Default">
<item name="android:layout_width">match_parent</item>
Expand Down