Rename for consistency
This commit is contained in:
parent
03b7f59dce
commit
51b2aeda1a
@ -37,15 +37,15 @@ import eu.chainfire.libsuperuser.Shell;
|
|||||||
* https://github.com/omerjerk/RemoteDroid/blob/master/app/src/main/java/in/omerjerk/remotedroid/app/MainActivity.java
|
* https://github.com/omerjerk/RemoteDroid/blob/master/app/src/main/java/in/omerjerk/remotedroid/app/MainActivity.java
|
||||||
*/
|
*/
|
||||||
@TargetApi(Build.VERSION_CODES.FROYO)
|
@TargetApi(Build.VERSION_CODES.FROYO)
|
||||||
abstract class InstallFDroidAsSystem {
|
abstract class InstallIntoSystem {
|
||||||
|
|
||||||
protected final Context context;
|
protected final Context context;
|
||||||
|
|
||||||
public InstallFDroidAsSystem(final Context context) {
|
public InstallIntoSystem(final Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static InstallFDroidAsSystem create(final Context context) {
|
public static InstallIntoSystem create(final Context context) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
return new LollipopImpl(context);
|
return new LollipopImpl(context);
|
||||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
@ -111,7 +111,7 @@ abstract class InstallFDroidAsSystem {
|
|||||||
return commands;
|
return commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class PreKitKatImpl extends InstallFDroidAsSystem {
|
private static class PreKitKatImpl extends InstallIntoSystem {
|
||||||
|
|
||||||
public PreKitKatImpl(Context context) {
|
public PreKitKatImpl(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@ -124,7 +124,7 @@ abstract class InstallFDroidAsSystem {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class KitKatToLollipopImpl extends InstallFDroidAsSystem {
|
private static class KitKatToLollipopImpl extends InstallIntoSystem {
|
||||||
|
|
||||||
public KitKatToLollipopImpl(Context context) {
|
public KitKatToLollipopImpl(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@ -145,7 +145,7 @@ abstract class InstallFDroidAsSystem {
|
|||||||
* History of PackageManagerService in Lollipop:
|
* History of PackageManagerService in Lollipop:
|
||||||
* https://github.com/android/platform_frameworks_base/commits/lollipop-release/services/core/java/com/android/server/pm/PackageManagerService.java
|
* https://github.com/android/platform_frameworks_base/commits/lollipop-release/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||||
*/
|
*/
|
||||||
private static class LollipopImpl extends InstallFDroidAsSystem {
|
private static class LollipopImpl extends InstallIntoSystem {
|
||||||
|
|
||||||
public LollipopImpl(Context context) {
|
public LollipopImpl(Context context) {
|
||||||
super(context);
|
super(context);
|
@ -85,7 +85,7 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
|
|||||||
ContextThemeWrapper theme = new ContextThemeWrapper(this, FDroidApp.getCurThemeResId());
|
ContextThemeWrapper theme = new ContextThemeWrapper(this, FDroidApp.getCurThemeResId());
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(theme);
|
AlertDialog.Builder builder = new AlertDialog.Builder(theme);
|
||||||
String message = getString(R.string.system_install_first_time_message) + "<br/><br/>" + InstallFDroidAsSystem.create(getApplicationContext()).getWarningInfo();
|
String message = getString(R.string.system_install_first_time_message) + "<br/><br/>" + InstallIntoSystem.create(getApplicationContext()).getWarningInfo();
|
||||||
builder.setMessage(Html.fromHtml(message));
|
builder.setMessage(Html.fromHtml(message));
|
||||||
builder.setPositiveButton(R.string.system_permission_install_via_root, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.system_permission_install_via_root, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -192,7 +192,7 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... voids) {
|
protected Void doInBackground(Void... voids) {
|
||||||
InstallFDroidAsSystem.create(getApplicationContext()).runInstall();
|
InstallIntoSystem.create(getApplicationContext()).runInstall();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -282,7 +282,7 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... voids) {
|
protected Void doInBackground(Void... voids) {
|
||||||
InstallFDroidAsSystem.create(getApplicationContext()).runUninstall();
|
InstallIntoSystem.create(getApplicationContext()).runUninstall();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user