Reduce boilerplate

This commit is contained in:
topjohnwu
2017-08-28 00:27:10 +08:00
parent 1ce1a94a35
commit a78950e822
6 changed files with 23 additions and 14 deletions
@@ -8,6 +8,7 @@ import android.view.WindowManager;
import com.topjohnwu.magisk.MagiskManager;
import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Shell;
import com.topjohnwu.magisk.utils.Topic;
public class Activity extends AppCompatActivity {
@@ -40,6 +41,10 @@ public class Activity extends AppCompatActivity {
return (MagiskManager) super.getApplicationContext();
}
public Shell getShell() {
return Shell.getShell(this);
}
protected void setFloating() {
boolean isTablet = getResources().getBoolean(R.bool.isTablet);
if (isTablet) {