Merge update

This commit is contained in:
topjohnwu 2016-08-25 18:23:20 +08:00
commit 1ba38b3902
9 changed files with 72 additions and 27 deletions

View File

@ -25,6 +25,7 @@ dependencies {
compile 'com.android.support:recyclerview-v7:24.2.0' compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0' compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.android.support:design:24.2.0' compile 'com.android.support:design:24.2.0'
compile 'com.github.javiersantos:AppUpdater:2.3'
compile 'com.jakewharton:butterknife:8.2.1' compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1' apt 'com.jakewharton:butterknife-compiler:8.2.1'

11
app/magisk_update.xml Normal file
View File

@ -0,0 +1,11 @@
<AppUpdater>
<update>
<latestVersion>2.0</latestVersion>
<url>
http://forum.xda-developers.com/android/software/mod-magisk-v1-universal-systemless-t3432382
</url>
<releaseNotes>
- Version 4.0!
</releaseNotes>
</update>
</AppUpdater>

View File

@ -4,6 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application <application
android:allowBackup="true" android:allowBackup="true"

View File

@ -9,9 +9,6 @@ import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ProgressBar; import android.widget.ProgressBar;
@ -20,7 +17,6 @@ import com.topjohnwu.magisk.module.Module;
import com.topjohnwu.magisk.utils.Shell; import com.topjohnwu.magisk.utils.Shell;
import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -29,9 +25,6 @@ import butterknife.ButterKnife;
public class ModulesFragment extends Fragment { public class ModulesFragment extends Fragment {
private static final String MAGISK_PATH = "/magisk";
private static final String MAGISK_CACHE_PATH = "/cache/magisk";
private static List<Module> listModules = new ArrayList<>(); private static List<Module> listModules = new ArrayList<>();
private static List<Module> listModulesCache = new ArrayList<>(); private static List<Module> listModulesCache = new ArrayList<>();
@ -53,12 +46,6 @@ public class ModulesFragment extends Fragment {
return view; return view;
} }
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_modules, menu);
}
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {

View File

@ -17,6 +17,8 @@ import android.support.v7.widget.Toolbar;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import com.github.javiersantos.appupdater.AppUpdater;
import com.github.javiersantos.appupdater.enums.UpdateFrom;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
@ -24,8 +26,9 @@ import butterknife.ButterKnife;
public class WelcomeActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { public class WelcomeActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
private static final String SELECTED_ITEM_ID = "SELECTED_ITEM_ID"; private static final String SELECTED_ITEM_ID = "SELECTED_ITEM_ID";
public static View view; private static final String XML_UPDATE_CHECK = "https://raw.githubusercontent.com/topjohnwu/MagiskManager/master/app/magisk_update.xml";
private final Handler mDrawerHandler = new Handler(); private final Handler mDrawerHandler = new Handler();
@BindView(R.id.toolbar) Toolbar toolbar; @BindView(R.id.toolbar) Toolbar toolbar;
@BindView(R.id.drawer_layout) DrawerLayout drawer; @BindView(R.id.drawer_layout) DrawerLayout drawer;
@BindView(R.id.nav_view) NavigationView navigationView; @BindView(R.id.nav_view) NavigationView navigationView;
@ -38,7 +41,6 @@ public class WelcomeActivity extends AppCompatActivity implements NavigationView
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome); setContentView(R.layout.activity_welcome);
ButterKnife.bind(this); ButterKnife.bind(this);
view = toolbar;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
@ -81,6 +83,8 @@ public class WelcomeActivity extends AppCompatActivity implements NavigationView
} }
navigationView.setNavigationItemSelectedListener(this); navigationView.setNavigationItemSelectedListener(this);
new AppUpdater(this).setUpdateFrom(UpdateFrom.XML).setUpdateXML(XML_UPDATE_CHECK).start();
} }
@Override @Override

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/force_reload"
android:icon="@drawable/ic_refresh"
android:title="@string/force_reload"
app:showAsAction="always"/>
</menu>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Magisk Manager</string>
<string name="about">Info su…</string>
<string name="app_changelog">Changelog dell\'app</string>
<string name="app_developers">Sviluppatori principali</string>
<string name="app_developers_"><![CDATA[App creata da <a href="https://github.com/topjohnwu">topjohnwu</a> in collaborazione con <a href="https://github.com/dvdandroid">dvdandroid</a>]]></string>
<string name="app_source_code">Codice sorgente</string>
<string name="app_translators">Traduttori dell\'app</string>
<string name="app_version">Versione dell\'app</string>
<string name="cache_modules">Moduli in cache</string>
<string name="disable_file_created">Il modulo verrà disabilitato al prossimo riavvio</string>
<string name="disable_file_removed">Il modulo verrà abilitato al prossimo riavvio</string>
<string name="force_reload">Aggiorna</string>
<string name="loading">Caricamento…</string>
<string name="log">Log</string>
<string name="log_is_empty">Il log è vuoto</string>
<string name="logs_clear_failed">Non è possibile leggere il log:</string>
<string name="logs_cleared">Log pulito correttamente</string>
<string name="logs_save_failed">Non è stato possibile il log nella SD card:</string>
<string name="magisk_version">Versione installata di Magisk v%1$s</string>
<string name="menuClearLog">Pulisci log adesso</string>
<string name="menuReload">Ricarica</string>
<string name="menuSaveToSd">Salva nella SD</string>
<string name="menuSend">Invia</string>
<string name="modules">Moduli</string>
<string name="navigation_drawer_close">Chiudi navigation drawer</string>
<string name="navigation_drawer_open">Apri navigation drawer</string>
<string name="no_modules_found">Nessun modulo trovato</string>
<string name="no_root_access">Accesso root rifiutato; funzionalità limitate</string>
<string name="permissionNotGranted">Questa funzionalità non funzionerà senza il permesso di scrittura della memoria esterna.</string>
<string name="remove_file_created">Il modulo verrà rimosso al prossimo riavvio</string>
<string name="remove_file_deleted">Il modulo non verrà rimosso al prossimo riavvio</string>
<string name="root_mounted">Root montato</string>
<string name="root_mounted_info">Root montato e abilitato. Safety Net (Android Pay) NON funzionerà</string>
<string name="root_none">Non rootato</string>
<string name="root_none_info">Safety Net (Android Pay) dovrebbe funzionare</string>
<string name="root_system">Non correttamente installato</string>
<string name="root_system_info">Root non correttamente installato. Safety Net (Android Pay) NON funzionerà, è ed impossibile attivare i toggle</string>
<string name="root_toggle">Root Toggle</string>
<string name="root_unmounted">Root non montato</string>
<string name="root_unmounted_info">Safety Net (Android Pay) dovrebbe funzionare, ma non il root temporaneo</string>
<string name="sdcard_not_writable">SD card non trovata o non scrivibile</string>
<string name="selinux_enforcing_info">SELinux è forzato</string>
<string name="selinux_permissive_info">SELinux è permissivo\nSpegni SELinux solamente se necessario!</string>
<string name="selinux_samsung">Samsung non supporta la modifica dello stato di SELinux</string>
<string name="selinux_toggle">SeLinux Toggle</string>
<string name="support_thread">Thread di supporto</string>
<string name="translators">dvdandroid</string>
</resources>

View File

@ -1,6 +1,7 @@
<resources> <resources>
<string name="app_name">Magisk Manager</string> <string name="app_name">Magisk Manager</string>
<string name="magisk" translatable="false">Magisk</string>
<string name="magisk_version">Installed Magisk v%1$s</string> <string name="magisk_version">Installed Magisk v%1$s</string>
<string name="magisk_version_error">Have you installed Magisk?</string> <string name="magisk_version_error">Have you installed Magisk?</string>
@ -42,7 +43,6 @@
<string name="logs_save_failed">Could not write log to SD card:</string> <string name="logs_save_failed">Could not write log to SD card:</string>
<string name="permissionNotGranted">This feature will not work without permission to write external storage.</string> <string name="permissionNotGranted">This feature will not work without permission to write external storage.</string>
<string name="disable_file_removed">Module will be enabled at next reboot</string> <string name="disable_file_removed">Module will be enabled at next reboot</string>
<string name="magisk">Magisk</string>
<string name="remove_file_deleted">Module will not be removed at next reboot</string> <string name="remove_file_deleted">Module will not be removed at next reboot</string>
<string name="cache_modules">Cache modules</string> <string name="cache_modules">Cache modules</string>
<string name="about">About</string> <string name="about">About</string>

View File

@ -17,6 +17,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter() jcenter()
maven { url "https://jitpack.io" }
} }
} }