2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Fix some lint warnings

Summary: Fix a number of lint warnings

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17452
This commit is contained in:
Erik Duisters
2018-12-09 12:37:01 +01:00
parent 2402b11608
commit 87ec4f2078

View File

@@ -64,7 +64,6 @@ public class MainActivity extends AppCompatActivity {
private SharedPreferences preferences;
private final HashMap<MenuItem, String> mMapMenuToDeviceId = new HashMap<>();
private String pairRequestStatus;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -91,14 +90,16 @@ public class MainActivity extends AppCompatActivity {
mDrawerLayout.addDrawerListener(mDrawerToggle);
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
actionBar.setDisplayHomeAsUpEnabled(true);
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
mDrawerToggle.setDrawerIndicatorEnabled(true);
mDrawerToggle.syncState();
String deviceName = DeviceHelper.getDeviceName(this);
TextView nameView = mDrawerHeader.findViewById(R.id.device_name);
nameView.setText(deviceName);
mNavViewDeviceName.setText(deviceName);
preferences = getSharedPreferences("stored_menu_selection", Context.MODE_PRIVATE);