Merge remote-tracking branch 'john/master' into development

# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/topjohnwu/magisk/App.java
#	app/src/main/java/com/topjohnwu/magisk/model/adapters/ReposAdapter.java
#	app/src/main/java/com/topjohnwu/magisk/model/update/UpdateCheckService.java
#	app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.java
#	app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.java
#	app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashActivity.java
#	app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.java
#	app/src/main/java/com/topjohnwu/magisk/ui/log/LogFragment.java
#	app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.java
#	app/src/main/java/com/topjohnwu/magisk/utils/ValueSortedMap.java
#	app/src/main/java/com/topjohnwu/magisk/view/dialogs/InstallMethodDialog.java
#	app/src/main/java/com/topjohnwu/magisk/view/dialogs/MagiskInstallDialog.java
#	app/src/main/java/com/topjohnwu/magisk/view/dialogs/ManagerInstallDialog.java
#	build.gradle
This commit is contained in:
Viktor De Pasquale 2019-04-16 19:40:34 +02:00
commit 605faccffd
11 changed files with 29 additions and 23 deletions

View File

@ -13,6 +13,8 @@ import android.widget.ImageView;
import android.widget.SearchView; import android.widget.SearchView;
import android.widget.TextView; import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
@ -31,7 +33,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
import java9.util.stream.StreamSupport; import java9.util.stream.StreamSupport;

View File

@ -1,5 +1,8 @@
package com.topjohnwu.magisk.model.update; package com.topjohnwu.magisk.model.update;
import androidx.annotation.NonNull;
import androidx.work.ListenableWorker;
import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Config;
@ -8,9 +11,6 @@ import com.topjohnwu.magisk.tasks.CheckUpdates;
import com.topjohnwu.magisk.view.Notifications; import com.topjohnwu.magisk.view.Notifications;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import androidx.annotation.NonNull;
import androidx.work.ListenableWorker;
public class UpdateCheckService extends DelegateWorker { public class UpdateCheckService extends DelegateWorker {
@NonNull @NonNull

View File

@ -5,6 +5,8 @@ import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.appcompat.app.AlertDialog;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Config;
@ -21,8 +23,6 @@ import com.topjohnwu.magisk.view.Shortcuts;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import androidx.appcompat.app.AlertDialog;
public class SplashActivity extends BaseActivity { public class SplashActivity extends BaseActivity {
public static boolean DONE = false; public static boolean DONE = false;

View File

@ -8,6 +8,11 @@ import android.widget.Button;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.RecyclerView;
import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.model.adapters.StringListAdapter; import com.topjohnwu.magisk.model.adapters.StringListAdapter;
@ -29,10 +34,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindColor; import butterknife.BindColor;
import butterknife.BindView; import butterknife.BindView;
import butterknife.OnClick; import butterknife.OnClick;

View File

@ -6,12 +6,13 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import androidx.viewpager.widget.ViewPager;
import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayout;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.model.adapters.TabFragmentAdapter; import com.topjohnwu.magisk.model.adapters.TabFragmentAdapter;
import com.topjohnwu.magisk.ui.base.BaseFragment; import com.topjohnwu.magisk.ui.base.BaseFragment;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView; import butterknife.BindView;
public class LogFragment extends BaseFragment { public class LogFragment extends BaseFragment {

View File

@ -17,6 +17,9 @@ import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Config;
@ -31,8 +34,6 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import butterknife.BindView; import butterknife.BindView;
import java9.lang.Iterables; import java9.lang.Iterables;

View File

@ -1,5 +1,7 @@
package com.topjohnwu.magisk.utils; package com.topjohnwu.magisk.utils;
import androidx.annotation.NonNull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@ -7,8 +9,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.NonNull;
public class ValueSortedMap<K, V extends Comparable<? super V>> extends HashMap<K, V> { public class ValueSortedMap<K, V extends Comparable<? super V>> extends HashMap<K, V> {
private List<V> sorted = new ArrayList<>(); private List<V> sorted = new ArrayList<>();

View File

@ -3,14 +3,14 @@ package com.topjohnwu.magisk.view.dialogs;
import android.app.Activity; import android.app.Activity;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.DownloadApp;
import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.magisk.view.MarkDownWindow; import com.topjohnwu.magisk.view.MarkDownWindow;
import androidx.annotation.NonNull;
public class ManagerInstallDialog extends CustomAlertDialog { public class ManagerInstallDialog extends CustomAlertDialog {
public ManagerInstallDialog(@NonNull Activity a) { public ManagerInstallDialog(@NonNull Activity a) {

View File

@ -15,8 +15,9 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools:r8:1.4.79' classpath 'com.android.tools:r8:1.4.79'
classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.android.tools.build:gradle:3.5.0-alpha10'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -20,6 +20,7 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <vector> #include <vector>
#include <bitset>
#include <magisk.h> #include <magisk.h>
#include <utils.h> #include <utils.h>
@ -44,8 +45,8 @@ static map<int, vector<string_view>> uid_proc_map; /* uid -> list of process */
pthread_mutex_t monitor_lock; pthread_mutex_t monitor_lock;
#define PID_MAX 32768 #define PID_MAX 32768
static vector<bool> attaches(PID_MAX); /* true if pid is monitored */ static bitset<PID_MAX> attaches; /* true if pid is monitored */
static vector<bool> detaches(PID_MAX); /* true if tid should be detached */ static bitset<PID_MAX> detaches; /* true if tid should be detached */
/******** /********
* Utils * Utils
@ -242,8 +243,8 @@ static void term_thread(int) {
uid_proc_map.clear(); uid_proc_map.clear();
zygote_map.clear(); zygote_map.clear();
hide_set.clear(); hide_set.clear();
std::fill(attaches.begin(), attaches.end(), false); attaches.reset();
std::fill(detaches.begin(), detaches.end(), false); detaches.reset();
// Misc // Misc
hide_enabled = false; hide_enabled = false;
pthread_mutex_destroy(&monitor_lock); pthread_mutex_destroy(&monitor_lock);