List of usage examples for android.app ProgressDialog show
public static ProgressDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate)
From source file:net.dahanne.android.regalandroid.activity.Start.java
/** * if a gallery URL is already configured, we print it in this view, * otherwise we keep the default text and we disable the button */// w w w . ja va 2 s .com private void checkGalleryUrlIsValid() { logger.debug("checking GalleryUrl Is Valid"); // GalleryUrl is provided, but is it a valid Gallery2 URL ? if (StringUtils.isNotBlank(Settings.getGalleryUrl(this))) { progressDialog = ProgressDialog.show(this, getString(R.string.please_wait), getString(R.string.connecting_to_the_gallery), true); String username = Settings.getUsername(this); String password = Settings.getPassword(this); String galleryUrl = Settings.getGalleryUrl(this); new LoginTask(this, progressDialog, loggedInAsText, galleryConfiguredTextView, enterGalleryButton) .execute(galleryUrl, username, password); } else { enterGalleryButton.setEnabled(false); } }
From source file:angeloid.sopiane.vegaphoneinfo.Tab_Racer1_Main.java
private void DialogProgressbackup(boolean close) { if (!close) { dialog_backup = ProgressDialog.show(getActivity(), "", "Loading..", true); Handler mHandler = new Handler(); mHandler.postDelayed(new Runnable() { @Override//from w w w . ja va2 s. c om public void run() { DialogProgressbackup(true); // . Tab_Racer1_Backup.instantExec_racer_backup(getActivity(), "busybox mount -o rw,remount /system ; "); StringBuilder backup = new StringBuilder(); try { Thread.sleep(2000); backup.append("mount -o rw,remount /system;"); backup.append("mkdir /sdcard/imeibackup;"); backup.append("dd if=/dev/block/mmcblk0p10 of=/sdcard/imeibackup/imei.img;"); backup.append("busybox mount -o ro,remount /system;"); try { Thread.sleep(3000); Tab_Racer1_Backup.instantExec_racer_backup(getActivity(), backup.toString()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }, 10000); } else { dialog_backup.dismiss(); // DialogProgress(true) ,false racer_backup_info.setImageResource(R.drawable.apply); backup.setEnabled(false); backup.setFocusable(false); } }
From source file:net.networksaremadeofstring.pulsant.portal.ColoLanding.java
public void onCreate(Bundle savedInstanceState) { API.SessionID = getIntent().getStringExtra("sessionid"); super.onCreate(savedInstanceState); setContentView(R.layout.cololanding); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle("Colocation"); detailsdialog = new Dialog(this); EditHandler = new Handler() { public void handleMessage(Message msg) { if (msg.what == 0) { Toast.makeText(ColoLanding.this, "Description updated successfully!", Toast.LENGTH_SHORT) .show();/*from w ww . j a v a 2s .c o m*/ } else { Toast.makeText(ColoLanding.this, "There was an error updating that description", Toast.LENGTH_SHORT).show(); } } }; //Temp list = (ListView) findViewById(R.id.ColoCabList); final ProgressDialog dialog = ProgressDialog.show(this, "Pulsant Portal", "Please wait: loading data....", true); final Handler handler = new Handler() { public void handleMessage(Message msg) { dialog.dismiss(); if (Success.equals("true")) { UpdateErrorMessage(ErrorMessage); adapter = new ColoRacksAdaptor(ColoLanding.this, listOfColoRacks); list.setAdapter(adapter); list.setChoiceMode(ListView.CHOICE_MODE_SINGLE); } else { UpdateErrorMessage(ErrorMessage); } } }; Thread dataPreload = new Thread() { public void run() { try { Colo = API.PortalQuery("colocation", "none"); Success = Colo.getString("success"); } catch (JSONException e) { ErrorMessage = "An unrecoverable JSON Exception occurred."; //UpdateErrorMessage("An unrecoverable JSON Exception occurred."); } if (Success.equals("false")) { try { //UpdateErrorMessage(Colo.getString("msg")); ErrorMessage = Colo.getString("msg"); } catch (JSONException e) { ErrorMessage = "An unrecoverable JSON Exception occured."; //UpdateErrorMessage("An unrecoverable JSON Exception occured."); } } else { Log.i("APIFuncs", Colo.toString()); try { ColoCabs = Colo.getJSONArray("colocation"); ErrorMessage = ""; //UpdateErrorMessage(""); } catch (JSONException e) { ErrorMessage = "There are no Co-Location Cabinets in your account."; //UpdateErrorMessage("There are no Co-Location Cabinets in your account."); } int ColoCount = ColoCabs.length(); if (ColoCount == 0) { //UpdateErrorMessage("There are no colocation cabinets for your account."); ErrorMessage = "There are no colocation cabinets for your account."; handler.sendEmptyMessage(0); return; } for (int i = 0; i < ColoCount; i++) { JSONObject CurrentColo = null; try { CurrentColo = ColoCabs.getJSONObject(i); } catch (JSONException e1) { Log.e("APIFuncs", e1.getMessage()); } try { listOfColoRacks.add(new ColoRacks(CurrentColo.getString("ip"), CurrentColo.getString("servercode"), CurrentColo.getString("facility"), CurrentColo.getInt("bandwidth"), CurrentColo.getString("bandwidthTotal"), CurrentColo.getInt("transferlimit"), CurrentColo.getString("state"), CurrentColo.getString("description"))); } catch (JSONException e) { Log.e("APIFuncs", e.getMessage()); } } } handler.sendEmptyMessage(0); } }; dataPreload.start(); }
From source file:angeloid.dreamnarae.SPiCa_Main.java
private void DialogProgress(boolean close) { if (!close) { dialog_spica = ProgressDialog.show(getActivity(), "", "Loading..", true); SPiCa_ZipTest.startUnzipping_spica(getActivity()); Handler mHandler = new Handler(); mHandler.postDelayed(new Runnable() { @Override// ww w . j av a 2s . co m public void run() { DialogProgress(true); // . SPiCa_Helper.instantExec_spica(getActivity(), "busybox mount -o rw,remount /system ; "); StringBuilder spica = new StringBuilder(); try { Thread.sleep(2000); // Mount rw /system spica.append("mount -o rw,remount /system;"); // Create Folder system/etc/init.d spica.append("mkdir /system/etc/init.d;"); // Create run-parts Script Folder spica.append("mkdir /system/angeloidteam/dreamnarae;"); // Avoid used in conjunction with other scripts spica.append("rm /system/etc/init.d/99provision;"); spica.append("rm /system/etc/init.d/S99SoulTools;"); // Delete Flag Files spica.append("rm /system/SPiCa;"); spica.append("rm /system/DN;"); spica.append("rm /system/miracle;"); spica.append("rm /system/Save;"); spica.append("rm /system/etc/init.d/98banner_dreamnarae_spica;"); spica.append("rm /system/etc/init.d/98banner_dreamnarae_prev;"); spica.append("rm /system/etc/init.d/98banner_dreamnarae_save;"); spica.append("rm /system/etc/init.d/98banner_dreamnarae_miracle;"); spica.append("rm /system/98banner_dreamnarae_spica;"); spica.append("rm /system/98banner_dreamnarae_prev;"); spica.append("rm /system/98banner_dreamnarae_save;"); spica.append("rm /system/98banner_dreamnarae_miracle;"); // Delete old Script Manager Files spica.append("rm /system/bin/EnableDN.sh;"); spica.append("rm /data/DNEnable;"); spica.append("rm /system/bin/RemoveDN.sh;"); spica.append("rm /data/DNPrev.sh;"); spica.append("rm /data/DNSPiCa.sh;"); spica.append("rm /data/DNSave.sh;"); spica.append("rm /data/DNMiracle.sh;"); // Delete New Script Manager Files spica.append("rm /system/etc/install-recovery.sh;"); // Delete DreamNarae SPiCa spica.append("rm /system/etc/init.d/00prop;"); spica.append("rm /system/etc/init.d/01io;"); spica.append("rm /system/etc/init.d/02freq;"); spica.append("rm /system/etc/init.d/03zipalign;"); spica.append("rm /system/etc/init.d/01kswapd0;"); spica.append("rm /system/etc/init.d/02io;"); spica.append("rm /system/etc/init.d/03freq;"); spica.append("rm /system/etc/init.d/04zipalign;"); spica.append("rm /system/angeloidteam/dreamnarae/00prop;"); spica.append("rm /system/angeloidteam/dreamnarae/01io;"); spica.append("rm /system/angeloidteam/dreamnarae/02freq;"); //Delete DreamNarae Miracle spica.append("rm /system/etc/init.d/00set;"); spica.append("rm /system/etc/init.d/01property;"); spica.append("rm /system/etc/init.d/02vsls;"); spica.append("rm /system/etc/init.d/03dch;"); spica.append("rm /system/etc/init.d/04zip;"); spica.append("rm /system/angeloidteam/dreamnarae/00set;"); spica.append("rm /system/angeloidteam/dreamnarae/01property;"); spica.append("rm /system/angeloidteam/dreamnarae/02vsls;"); spica.append("rm /system/angeloidteam/dreamnarae/03dch;"); //Delete DreamNarae Save spica.append("rm /system/etc/init.d/00sp;"); spica.append("rm /system/etc/init.d/01v;"); spica.append("rm /system/etc/init.d/02deep;"); spica.append("rm /system/etc/init.d/03zip;"); spica.append("rm /system/angeloidteam/dreamnarae/00sp;"); spica.append("rm /system/angeloidteam/dreamnarae/01v;"); spica.append("rm /system/angeloidteam/dreamnarae/02deep;"); // Delete DreamNarae Prev spica.append("rm /system/etc/init.d/00proppv;"); spica.append("rm /system/etc/init.d/01kswapd0pv;"); spica.append("rm /system/etc/init.d/02iopv;"); spica.append("rm /system/etc/init.d/03freqpv;"); spica.append("rm /system/etc/init.d/04zippv;"); spica.append("rm /system/etc/init.d/01iopv;"); spica.append("rm /system/etc/init.d/02freqpv;"); spica.append("rm /system/angeloidteam/dreamnarae/00propv;"); spica.append("rm /system/angeloidteam/dreamnarae/01iopv;"); spica.append("rm /system/angeloidteam/dreamnarae/02freqpv;"); // Copy spica Files to /system/ spica.append( "cat /data/data/angeloid.dreamnarae/files/00prop > /system/etc/init.d/00prop;"); spica.append("cat /data/data/angeloid.dreamnarae/files/01io > /system/etc/init.d/01io;"); spica.append( "cat /data/data/angeloid.dreamnarae/files/02freq > /system/etc/init.d/02freq;"); spica.append( "cat /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_spica > /system/98banner_dreamnarae_spica;"); spica.append( "cat /data/data/angeloid.dreamnarae/files/install-recovery.sh > /system/etc/install-recovery.sh;"); // Copy run-parts /system/angeloidteam/dreamnarae spica.append( "cat /data/data/angeloid.dreamnarae/files/00prop > /system/angeloidteam/dreamnarae/00prop;"); spica.append( "cat /data/data/angeloid.dreamnarae/files/01io > /system/angeloidteam/dreamnarae/01io;"); spica.append( "cat /data/data/angeloid.dreamnarae/files/02freq > /system/angeloidteam/dreamnarae/02freq;"); // Delete Download Files spica.append("rm /data/data/angeloid.dreamnarae/files/00prop;"); spica.append("rm /data/data/angeloid.dreamnarae/files/01io;"); spica.append("rm /data/data/angeloid.dreamnarae/files/02freq;"); spica.append("rm /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_spica;"); spica.append("rm /data/data/angeloid.dreamnarae/files/install-recovery.sh;"); // Permission spica Files spica.append("chmod 755 /system/etc/init.d/00prop;"); spica.append("chmod 755 /system/etc/init.d/01io;"); spica.append("chmod 755 /system/etc/init.d/02freq;"); spica.append("chmod 755 /system/98banner_dreamnarae_spica;"); spica.append("chmod 755 /system/etc/install-recovery.sh;"); // Permission run-parts spica.append("chmod 755 /system/angeloidteam/dreamnarae/00prop;"); spica.append("chmod 755 /system/angeloidteam/dreamnarae/01io;"); spica.append("chmod 755 /system/angeloidteam/dreamnarae/02freq;"); // Mount ro /system spica.append("busybox mount -o ro,remount /system;"); // Reboot Device(Only to Progress1) spica.append("reboot;"); try { Thread.sleep(3000); SPiCa_Helper.instantExec_spica(getActivity(), spica.toString()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }, 10000); } else { dialog_spica.dismiss(); // DialogProgress(true) ,false } }
From source file:com.cs411.trackallthethings.Main.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);/*from w ww. ja va 2s.c o m*/ //onClickListener to handle the login event on the login button Button submit = (Button) findViewById(R.id.loginsubmit); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //get the text from the username and password fields EditText username = (EditText) findViewById(R.id.username); EditText password = (EditText) findViewById(R.id.password); String user = username.getText().toString(); String pass = password.getText().toString(); Main.userName = user; Main.passWrd = pass; //if the user has entered nothing, don't bother trying to contact //the server - a safeguard if (user.equals("") || pass.equals("")) return; //otherwise we will contact the server to login //set up and execute the login asynctask //show the loading dialog loggingIn = ProgressDialog.show(Main.this, "", "Logging in...", true); loginTask = new doLogin(Main.this, "http://www.trackallthethings.com/mobile-api/login.php?userName=" + user + "&passWrd=" + pass); loginTask.execute(); } }); }
From source file:angeloid.dreamnarae.Save_Main.java
private void DialogProgress(boolean close) { if (!close) { dialog_save = ProgressDialog.show(getActivity(), "", "Loading..", true); Save_ZipTest.startUnzipping_save(getActivity()); Handler mHandler = new Handler(); mHandler.postDelayed(new Runnable() { @Override//from w w w .java 2 s . co m public void run() { DialogProgress(true); // . Save_Helper.instantExec_save(getActivity(), "busybox mount -o rw,remount /system ; "); StringBuilder save = new StringBuilder(); try { Thread.sleep(2000); // Mount rw /system save.append("mount -o rw,remount /system;"); // Create Folder system/etc/init.d save.append("mkdir /system/etc/init.d;"); // Create run-parts Script Folder save.append("mkdir /system/angeloidteam/dreamnarae;"); // Avoid used in conjunction with other scripts save.append("rm /system/etc/init.d/99provision;"); save.append("rm /system/etc/init.d/S99SoulTools;"); // Delete Flag Files save.append("rm /system/SPiCa;"); save.append("rm /system/DN;"); save.append("rm /system/Miracle;"); save.append("rm /system/Save;"); save.append("rm /system/etc/init.d/98banner_dreamnarae_spica;"); save.append("rm /system/etc/init.d/98banner_dreamnarae_save;"); save.append("rm /system/etc/init.d/98banner_dreamnarae_miracle;"); save.append("rm /system/etc/init.d/98banner_dreamnarae_prev;"); save.append("rm /system/98banner_dreamnarae_spica;"); save.append("rm /system/98banner_dreamnarae_save;"); save.append("rm /system/98banner_dreamnarae_miracle;"); save.append("rm /system/98banner_dreamnarae_prev;"); // Delete old Script Manager Files save.append("rm /system/bin/EnableDN.sh;"); save.append("rm /data/DNEnable;"); save.append("rm /system/bin/RemoveDN.sh;"); save.append("rm /data/DNPrev.sh;"); save.append("rm /data/DNSPiCa.sh;"); save.append("rm /data/DNSave.sh;"); save.append("rm /data/DNMiracle.sh;"); // Delete New Script Manager Files save.append("rm /system/etc/install-recovery.sh;"); // Delete DreamNarae SPiCa save.append("rm /system/etc/init.d/00prop;"); save.append("rm /system/etc/init.d/01io;"); save.append("rm /system/etc/init.d/02freq;"); save.append("rm /system/etc/init.d/03zipalign;"); save.append("rm /system/etc/init.d/01kswapd0;"); save.append("rm /system/etc/init.d/02io;"); save.append("rm /system/etc/init.d/03freq;"); save.append("rm /system/etc/init.d/04zipalign;"); save.append("rm /system/angeloidteam/dreamnarae/00prop;"); save.append("rm /system/angeloidteam/dreamnarae/01io;"); save.append("rm /system/angeloidteam/dreamnarae/02freq;"); //Delete DreamNarae Miracle save.append("rm /system/etc/init.d/00set;"); save.append("rm /system/etc/init.d/01property;"); save.append("rm /system/etc/init.d/02vsls;"); save.append("rm /system/etc/init.d/03dch;"); save.append("rm /system/etc/init.d/04zip;"); save.append("rm /system/angeloidteam/dreamnarae/00set;"); save.append("rm /system/angeloidteam/dreamnarae/01property;"); save.append("rm /system/angeloidteam/dreamnarae/02vsls;"); save.append("rm /system/angeloidteam/dreamnarae/03dch;"); //Delete DreamNarae Save save.append("rm /system/etc/init.d/00sp;"); save.append("rm /system/etc/init.d/01v;"); save.append("rm /system/etc/init.d/02deep;"); save.append("rm /system/etc/init.d/03zip;"); save.append("rm /system/angeloidteam/dreamnarae/00sp;"); save.append("rm /system/angeloidteam/dreamnarae/01v;"); save.append("rm /system/angeloidteam/dreamnarae/02deep;"); // Delete DreamNarae Prev save.append("rm /system/etc/init.d/00proppv;"); save.append("rm /system/etc/init.d/01kswapd0pv;"); save.append("rm /system/etc/init.d/02iopv;"); save.append("rm /system/etc/init.d/03freqpv;"); save.append("rm /system/etc/init.d/04zippv;"); save.append("rm /system/etc/init.d/01iopv;"); save.append("rm /system/etc/init.d/02freqpv;"); save.append("rm /system/angeloidteam/dreamnarae/00propv;"); save.append("rm /system/angeloidteam/dreamnarae/01iopv;"); save.append("rm /system/angeloidteam/dreamnarae/02freqpv;"); // Copy save Files to /system/ save.append("cat /data/data/angeloid.dreamnarae/files/00sp > /system/etc/init.d/00sp;"); save.append("cat /data/data/angeloid.dreamnarae/files/01v > /system/etc/init.d/01v;"); save.append("cat /data/data/angeloid.dreamnarae/files/02deep > /system/etc/init.d/02deep;"); save.append( "cat /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_save > /system/98banner_dreamnarae_save;"); save.append( "cat /data/data/angeloid.dreamnarae/files/install-recovery.sh > /system/etc/install-recovery.sh;"); // Copy run-parts /system/angeloidteam/dreamnarae save.append( "cat /data/data/angeloid.dreamnarae/files/00sp > /system/angeloidteam/dreamnarae/00sp;"); save.append( "cat /data/data/angeloid.dreamnarae/files/01v > /system/angeloidteam/dreamnarae/01v;"); save.append( "cat /data/data/angeloid.dreamnarae/files/02deep > /system/angeloidteam/dreamnarae/02deep;"); // Delete Download Files save.append("rm /data/data/angeloid.dreamnarae.save/files/00sp;"); save.append("rm /data/data/angeloid.dreamnarae.save/files/01v;"); save.append("rm /data/data/angeloid.dreamnarae.save/files/02deep;"); save.append("rm /data/data/angeloid.dreamnarae.save/files/98banner_dreamnarae_save;"); save.append("rm /data/data/angeloid.dreamnarae.save/files/install-recovery.sh;"); // Permission save Files save.append("chmod 755 /system/etc/init.d/00sp;"); save.append("chmod 755 /system/etc/init.d/01v;"); save.append("chmod 755 /system/etc/init.d/02deep;"); save.append("chmod 755 /system/98banner_dreamnarae_save;"); save.append("chmod 755 /system/etc/install-recovery.sh;"); // Permission run-parts save.append("chmod 755 /system/angeloidteam/dreamnarae/00sp;"); save.append("chmod 755 /system/angeloidteam/dreamnarae/01v;"); save.append("chmod 755 /system/angeloidteam/dreamnarae/02deep;"); // Mount ro /system save.append("busybox mount -o ro,remount /system;"); // Reboot Device(Only to Progress1) save.append("reboot;"); try { Thread.sleep(3000); Save_Helper.instantExec_save(getActivity(), save.toString()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }, 10000); } else { dialog_save.dismiss(); // DialogProgress(true) ,false } }
From source file:angeloid.dreamnarae.Prev_Main.java
private void DialogProgress1(boolean close) { if (!close) {/*from w w w.j ava2 s. c om*/ dialog_prev1 = ProgressDialog.show(getActivity(), "", "Loading..", true); Prev_ZipTest.startUnzipping_prev(getActivity()); Handler mHandler1 = new Handler(); mHandler1.postDelayed(new Runnable() { @Override public void run() { DialogProgress1(true); // . Prev_Helper.instantExec_prev(getActivity(), "busybox mount -o rw,remount /system ; "); StringBuilder prev = new StringBuilder(); try { Thread.sleep(2000); // Mount rw /system prev.append("mount -o rw,remount /system;"); // Create Folder system/etc/init.d prev.append("mkdir /system/etc/init.d;"); // Create run-parts Script Folder prev.append("mkdir /system/angeloidteam/dreamnarae;"); // Avoid used in conjunction with other scripts prev.append("rm /system/etc/init.d/99provision;"); prev.append("rm /system/etc/init.d/S99SoulTools;"); // Delete Flag Files prev.append("rm /system/SPiCa;"); prev.append("rm /system/DN;"); prev.append("rm /system/Miracle;"); prev.append("rm /system/Save;"); prev.append("rm /system/etc/init.d/98banner_dreamnarae_spica;"); prev.append("rm /system/etc/init.d/98banner_dreamnarae_prev;"); prev.append("rm /system/etc/init.d/98banner_dreamnarae_save;"); prev.append("rm /system/etc/init.d/98banner_dreamnarae_miracle;"); prev.append("rm /system/98banner_dreamnarae_spica;"); prev.append("rm /system/98banner_dreamnarae_prev;"); prev.append("rm /system/98banner_dreamnarae_save;"); prev.append("rm /system/98banner_dreamnarae_miracle;"); // Delete old Script Manager Files prev.append("rm /system/bin/EnableDN.sh;"); prev.append("rm /data/DNEnable;"); prev.append("rm /system/bin/RemoveDN.sh;"); prev.append("rm /data/DNPrev.sh;"); prev.append("rm /data/DNSPiCa.sh;"); prev.append("rm /data/DNSave.sh;"); prev.append("rm /data/DNMiracle.sh;"); // Delete New Script Manager Files prev.append("rm /system/etc/install-recovery.sh;"); // Delete DreamNarae SPiCa prev.append("rm /system/etc/init.d/00prop;"); prev.append("rm /system/etc/init.d/01io;"); prev.append("rm /system/etc/init.d/02freq;"); prev.append("rm /system/etc/init.d/03zipalign;"); prev.append("rm /system/etc/init.d/01kswapd0;"); prev.append("rm /system/etc/init.d/02io;"); prev.append("rm /system/etc/init.d/03freq;"); prev.append("rm /system/etc/init.d/04zipalign;"); prev.append("rm /system/angeloidteam/dreamnarae/00prop;"); prev.append("rm /system/angeloidteam/dreamnarae/01io;"); prev.append("rm /system/angeloidteam/dreamnarae/02freq;"); //Delete DreamNarae Miracle prev.append("rm /system/etc/init.d/00set;"); prev.append("rm /system/etc/init.d/01property;"); prev.append("rm /system/etc/init.d/02vsls;"); prev.append("rm /system/etc/init.d/03dch;"); prev.append("rm /system/etc/init.d/04zip;"); prev.append("rm /system/angeloidteam/dreamnarae/00set;"); prev.append("rm /system/angeloidteam/dreamnarae/01property;"); prev.append("rm /system/angeloidteam/dreamnarae/02vsls;"); prev.append("rm /system/angeloidteam/dreamnarae/03dch;"); //Delete DreamNarae Save prev.append("rm /system/etc/init.d/00sp;"); prev.append("rm /system/etc/init.d/01v;"); prev.append("rm /system/etc/init.d/02deep;"); prev.append("rm /system/etc/init.d/03zip;"); prev.append("rm /system/angeloidteam/dreamnarae/00sp;"); prev.append("rm /system/angeloidteam/dreamnarae/01v;"); prev.append("rm /system/angeloidteam/dreamnarae/02deep;"); // Delete DreamNarae Prev prev.append("rm /system/etc/init.d/00proppv;"); prev.append("rm /system/etc/init.d/01kswapd0pv;"); prev.append("rm /system/etc/init.d/02iopv;"); prev.append("rm /system/etc/init.d/03freqpv;"); prev.append("rm /system/etc/init.d/04zippv;"); prev.append("rm /system/etc/init.d/01iopv;"); prev.append("rm /system/etc/init.d/02freqpv;"); prev.append("rm /system/angeloidteam/dreamnarae/00propv;"); prev.append("rm /system/angeloidteam/dreamnarae/01iopv;"); prev.append("rm /system/angeloidteam/dreamnarae/02freqpv;"); // Copy Prev Files to /system/ prev.append("cat /data/data/angeloid.dreamnarae/files/00proppv > /system/etc/init.d/00proppv;"); prev.append("cat /data/data/angeloid.dreamnarae/files/01iopv > /system/etc/init.d/01iopv;"); prev.append("cat /data/data/angeloid.dreamnarae/files/02freqpv > /system/etc/init.d/02freqpv;"); prev.append("cat /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_prev > /system/98banner_dreamnarae_prev;"); prev.append("cat /data/data/angeloid.dreamnarae/files/install-recovery.sh > /system/etc/install-recovery.sh;"); // Copy run-parts /system/angeloidteam/dreamnarae prev.append("cat /data/data/angeloid.dreamnarae/files/00proppv > /system/angeloidteam/dreamnarae/00proppv;"); prev.append("cat /data/data/angeloid.dreamnarae/files/01iopv > /system/angeloidteam/dreamnarae/01iopv;"); prev.append("cat /data/data/angeloid.dreamnarae/files/02freqpv > /system/angeloidteam/dreamnarae/02freqpv;"); // Delete Download Files prev.append("rm /data/data/angeloid.dreamnarae/files/00proppv;"); prev.append("rm /data/data/angeloid.dreamnarae/files/01iopv;"); prev.append("rm /data/data/angeloid.dreamnarae/files/02freqpv;"); prev.append("rm /data/data/angeloid.dreamnarae/files/install-recovery.sh;"); prev.append("rm /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_prev;"); // Permission prev Files prev.append("chmod 755 /system/etc/init.d/00proppv;"); prev.append("chmod 755 /system/etc/init.d/01iopv;"); prev.append("chmod 755 /system/etc/init.d/02freqpv;"); prev.append("chmod 755 /system/98banner_dreamnarae_prev;"); prev.append("chmod 755 /system/etc/install-recovery.sh;"); // Permission run-parts prev.append("chmod 755 /system/angeloidteam/dreamnarae/00proppv;"); prev.append("chmod 755 /system/angeloidteam/dreamnarae/01iopv;"); prev.append("chmod 755 /system/angeloidteam/dreamnarae/02freqpv;"); // Mount ro /system prev.append("busybox mount -o ro,remount /system;"); // Reboot Device(Only to Progress1) prev.append("reboot;"); try { Thread.sleep(3000); Prev_Helper.instantExec_prev(getActivity(), prev.toString()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }, 10000); } else { dialog_prev1.dismiss(); // DialogProgress(true) ,false // } }
From source file:com.samknows.measurement.util.LoginHelper.java
public static Dialog showLoginDialog(Context c) { Dialog dialog = ProgressDialog.show(c, "", c.getString(R.string.logging_in), true); dialog.show();// www. j a va 2 s. com return dialog; }
From source file:angeloid.dreamnarae.Miracle_Main.java
private void DialogProgress1(boolean close) { if (!close) { dialog_miracle1 = ProgressDialog.show(getActivity(), "", "Loading..", true); Miracle_ZipTest.startUnzipping_miracle(getActivity()); Handler mHandler1 = new Handler(); mHandler1.postDelayed(new Runnable() { @Override/*w ww . j a v a2 s . c o m*/ public void run() { DialogProgress1(true); // . Miracle_Helper.instantExec_miracle(getActivity(), "busybox mount -o rw,remount /system ; "); StringBuilder miracle = new StringBuilder(); try { Thread.sleep(2000); // Mount rw /system miracle.append("mount -o rw,remount /system;"); // Create Folder system/etc/init.d miracle.append("mkdir /system/etc/init.d;"); // Create run-parts Script Folder miracle.append("mkdir /system/angeloidteam/dreamnarae;"); // Avoid used in conjunction with other scripts miracle.append("rm /system/etc/init.d/99provision;"); miracle.append("rm /system/etc/init.d/S99SoulTools;"); // Delete Flag Files miracle.append("rm /system/SPiCa;"); miracle.append("rm /system/DN;"); miracle.append("rm /system/Miracle;"); miracle.append("rm /system/Save;"); miracle.append("rm /system/etc/init.d/98banner_dreamnarae_spica;"); miracle.append("rm /system/etc/init.d/98banner_dreamnarae_miracle;"); miracle.append("rm /system/etc/init.d/98banner_dreamnarae_save;"); miracle.append("rm /system/etc/init.d/98banner_dreamnarae_prev;"); miracle.append("rm /system/98banner_dreamnarae_spica;"); miracle.append("rm /system/98banner_dreamnarae_miracle;"); miracle.append("rm /system/98banner_dreamnarae_save;"); miracle.append("rm /system/98banner_dreamnarae_prev;"); // Delete old Script Manager Files miracle.append("rm /system/bin/EnableDN.sh;"); miracle.append("rm /data/DNEnable;"); miracle.append("rm /system/bin/RemoveDN.sh;"); miracle.append("rm /data/DNMiracle.sh;"); miracle.append("rm /data/DNSPiCa.sh;"); miracle.append("rm /data/DNSave.sh;"); miracle.append("rm /data/DNPrev.sh;"); // Delete New Script Manager Files miracle.append("rm /system/etc/install-recovery.sh;"); // Delete DreamNarae SPiCa miracle.append("rm /system/etc/init.d/00prop;"); miracle.append("rm /system/etc/init.d/01io;"); miracle.append("rm /system/etc/init.d/02freq;"); miracle.append("rm /system/etc/init.d/03zipalign;"); miracle.append("rm /system/etc/init.d/01kswapd0;"); miracle.append("rm /system/etc/init.d/02io;"); miracle.append("rm /system/etc/init.d/03freq;"); miracle.append("rm /system/etc/init.d/04zipalign;"); miracle.append("rm /system/angeloidteam/dreamnarae/00prop;"); miracle.append("rm /system/angeloidteam/dreamnarae/01io;"); miracle.append("rm /system/angeloidteam/dreamnarae/02freq;"); //Delete DreamNarae Miracle miracle.append("rm /system/etc/init.d/00set;"); miracle.append("rm /system/etc/init.d/01property;"); miracle.append("rm /system/etc/init.d/02vsls;"); miracle.append("rm /system/etc/init.d/03dch;"); miracle.append("rm /system/etc/init.d/04zip;"); miracle.append("rm /system/angeloidteam/dreamnarae/00set;"); miracle.append("rm /system/angeloidteam/dreamnarae/01property;"); miracle.append("rm /system/angeloidteam/dreamnarae/02vsls;"); miracle.append("rm /system/angeloidteam/dreamnarae/03dch;"); //Delete DreamNarae Save miracle.append("rm /system/etc/init.d/00sp;"); miracle.append("rm /system/etc/init.d/01v;"); miracle.append("rm /system/etc/init.d/02deep;"); miracle.append("rm /system/etc/init.d/03zip;"); miracle.append("rm /system/angeloidteam/dreamnarae/00sp;"); miracle.append("rm /system/angeloidteam/dreamnarae/01v;"); miracle.append("rm /system/angeloidteam/dreamnarae/02deep;"); // Delete DreamNarae Prev miracle.append("rm /system/etc/init.d/00proppv;"); miracle.append("rm /system/etc/init.d/01kswapd0pv;"); miracle.append("rm /system/etc/init.d/02iopv;"); miracle.append("rm /system/etc/init.d/03freqpv;"); miracle.append("rm /system/etc/init.d/04zippv;"); miracle.append("rm /system/etc/init.d/01iopv;"); miracle.append("rm /system/etc/init.d/02freqpv;"); miracle.append("rm /system/angeloidteam/dreamnarae/00propv;"); miracle.append("rm /system/angeloidteam/dreamnarae/01iopv;"); miracle.append("rm /system/angeloidteam/dreamnarae/02freqpv;"); // Copy Miracle Files to /system/ miracle.append( "cat /data/data/angeloid.dreamnarae/files/00set > /system/etc/init.d/00set;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/01property > /system/etc/init.d/01property;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/02vsls > /system/etc/init.d/02vsls;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/03dch > /system/etc/init.d/03dch;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_miracle > /system/98banner_dreamnarae_miracle;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/install-recovery.sh > /system/etc/install-recovery.sh;"); // Copy run-parts /system/angeloidteam/dreamnarae miracle.append( "cat /data/data/angeloid.dreamnarae/files/00set > /system/angeloidteam/dreamnarae/00set;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/01property > /system/angeloidteam/dreamnarae/01property;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/02vsls > /system/angeloidteam/dreamnarae/02vsls;"); miracle.append( "cat /data/data/angeloid.dreamnarae/files/03dch > /system/angeloidteam/dreamnarae/03dch;"); // Delete Download Files miracle.append("rm /data/data/angeloid.dreamnarae/files/00set;"); miracle.append("rm /data/data/angeloid.dreamnarae/files/01property;"); miracle.append("rm /data/data/angeloid.dreamnarae/files/02vsls;"); miracle.append("rm /data/data/angeloid.dreamnarae/files/03dch;"); miracle.append("rm /data/data/angeloid.dreamnarae/files/install-recovery.sh;"); miracle.append("rm /data/data/angeloid.dreamnarae/files/98banner_dreamnarae_miracle;"); // Permission Miracle Files miracle.append("chmod 755 /system/etc/init.d/00set;"); miracle.append("chmod 755 /system/etc/init.d/01property;"); miracle.append("chmod 755 /system/etc/init.d/02vsls;"); miracle.append("chmod 755 /system/etc/init.d/03dch;"); miracle.append("chmod 755 /system/angeloidteam/dreamnarae/00set;"); miracle.append("chmod 755 /system/angeloidteam/dreamnarae/01property;"); miracle.append("chmod 755 /system/angeloidteam/dreamnarae/02vsls;"); miracle.append("chmod 755 /system/angeloidteam/dreamnarae/03dch;"); miracle.append("chmod 755 /system/angeloidteam/dreamnarae/98banner_dreamnarae_miracle;"); miracle.append("chmod 755 /system/etc/install-recovery.sh;"); // Mount ro /system miracle.append("busybox mount -o ro,remount /system;"); // Reboot Device(Only to Progress1) miracle.append("reboot;"); try { Thread.sleep(3000); Miracle_Helper.instantExec_miracle(getActivity(), miracle.toString()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }, 10000); } else { dialog_miracle1.dismiss(); // DialogProgress(true) ,false } }