|
|
|
@ -120,28 +120,12 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
// getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
|
|
|
|
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
|
|
|
|
|
|
|
|
|
// InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
|
|
|
// imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(), 0);
|
|
|
|
|
|
|
|
|
|
// ViewUtils.hideSoftKeyboard(this);
|
|
|
|
|
|
|
|
|
|
ActionBar actionBar = getSupportActionBar();
|
|
|
|
|
|
|
|
|
|
// String buildTime = BuildConfig.BUILD_
|
|
|
|
|
Date date = new Date(BuildConfig.BUILD_TIMESTAMP);
|
|
|
|
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
|
actionBar.setTitle(actionBar.getTitle().toString() + " v" + MicroPhotoContext.getVersionName(getApplicationContext()) + " " + sdf.format(date));
|
|
|
|
|
|
|
|
|
|
// CompactSpinnerAdapter adapter = new CompactSpinnerAdapter(this, R.array.networkProtocols, R.layout.spinner_dropdown_item);
|
|
|
|
|
// adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
|
|
|
|
// binding.networkProtocol.setAdapter(adapter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ArrayAdapter adapter1 = ArrayAdapter.createFromResource(this, R.array.networkProtocols, android.R.layout.simple_spinner_item);
|
|
|
|
|
// adapter1.setDropDownViewResource(R.layout.spinner_dropdown_item);
|
|
|
|
|
// binding.protocol.setAdapter(adapter1);
|
|
|
|
|
|
|
|
|
|
binding.logs.setText("");
|
|
|
|
|
binding.logs.setMovementMethod(ScrollingMovementMethod.getInstance());
|
|
|
|
|
binding.logs.setScrollbarFadingEnabled(false);
|
|
|
|
@ -169,12 +153,9 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
// mMessenger = new Messenger(new Handler());
|
|
|
|
|
|
|
|
|
|
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
|
|
|
|
StrictMode.setThreadPolicy(policy);
|
|
|
|
@ -183,7 +164,6 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
final int noDelay = intent.getIntExtra("noDelay", 0);
|
|
|
|
|
int rebootFlag = intent.getIntExtra("reboot", 0);
|
|
|
|
|
if (rebootFlag == 1) {
|
|
|
|
|
// SysApi.enableAirPlane(MainActivity.this, true);
|
|
|
|
|
Log.i(TAG, "After Reboot");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -467,7 +447,6 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
@Override
|
|
|
|
|
protected void onDestroy() {
|
|
|
|
|
super.onDestroy();
|
|
|
|
|
// System.exit(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void startMicroPhotoService(Context context, MicroPhotoContext.AppConfig curAppConfig, Messenger messenger) {
|
|
|
|
|