mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 05:07:40 +00:00
Removed printfs and coding style stuff
This commit is contained in:
parent
d35623a28a
commit
a9b4a6bdea
@ -628,7 +628,7 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
}
|
||||
|
||||
if (!callback.success) {
|
||||
Log.e("KDE/sendPackage", "No device link (of "+mLinks.size()+" available) could send the package. Package lost!");
|
||||
Log.e("KDE/sendPackage", "No device link (of "+mLinks.size()+" available) could send the package "+np.getType()+". Package lost!");
|
||||
backtrace.printStackTrace();
|
||||
}
|
||||
|
||||
|
@ -134,11 +134,11 @@ public class MprisActivity extends ActionBarActivity {
|
||||
//String prevPlayer = (String)spinner.getSelectedItem();
|
||||
spinner.setAdapter(adapter);
|
||||
|
||||
if(playerList.isEmpty()){
|
||||
if (playerList.isEmpty()) {
|
||||
findViewById(R.id.no_players).setVisibility(View.VISIBLE);
|
||||
spinner.setVisibility(View.GONE);
|
||||
((TextView) findViewById(R.id.now_playing_textview)).setText("");
|
||||
}else{
|
||||
} else {
|
||||
findViewById(R.id.no_players).setVisibility(View.GONE);
|
||||
spinner.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class ShareActivity extends ActionBarActivity {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
|
||||
Device device = devicesList.get(i-1); //NOTE: -1 because of the title!
|
||||
Device device = devicesList.get(i - 1); //NOTE: -1 because of the title!
|
||||
|
||||
Bundle extras = intent.getExtras();
|
||||
if (extras != null) {
|
||||
|
@ -38,59 +38,72 @@ import android.view.ViewGroup;
|
||||
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
||||
|
||||
private AppCompatDelegate mDelegate;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceState);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getDelegate().onPostCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
public ActionBar getSupportActionBar() {
|
||||
return getDelegate().getSupportActionBar();
|
||||
}
|
||||
|
||||
public void setSupportActionBar(@Nullable Toolbar toolbar) {
|
||||
getDelegate().setSupportActionBar(toolbar);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MenuInflater getMenuInflater() {
|
||||
return getDelegate().getMenuInflater();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(@LayoutRes int layoutResID) {
|
||||
getDelegate().setContentView(layoutResID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
getDelegate().setContentView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().setContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().addContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostResume() {
|
||||
super.onPostResume();
|
||||
getDelegate().onPostResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTitleChanged(CharSequence title, int color) {
|
||||
super.onTitleChanged(title, color);
|
||||
getDelegate().setTitle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
getDelegate().onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
@ -101,9 +114,12 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
||||
super.onDestroy();
|
||||
getDelegate().onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateOptionsMenu() {
|
||||
getDelegate().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
private AppCompatDelegate getDelegate() {
|
||||
if (mDelegate == null) {
|
||||
mDelegate = AppCompatDelegate.create(this, null);
|
||||
|
@ -255,7 +255,6 @@ public class MaterialActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
Log.e("MaterialActivity", "Main Activity onActivityResult" + requestCode);
|
||||
switch (requestCode)
|
||||
{
|
||||
case RESULT_NEEDS_RELOAD:
|
||||
|
Loading…
x
Reference in New Issue
Block a user