Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/Chromoting.java

Issue 2391633003: [Remoting Android] Fix Deprecated API Warnings (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/base/OAuthTokenFetcher.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/Chromoting.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
index 4bc7cc30b1104351784d56faf7e0a43f1a9a375a..6cfd884171550c02d3043f7bd5212d8ee15caedd 100644
--- a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
+++ b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
@@ -14,6 +14,7 @@ import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.provider.Settings;
+import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
@@ -31,7 +32,6 @@ import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Toast;
-import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Log;
import org.chromium.chromoting.accountswitcher.AccountSwitcher;
import org.chromium.chromoting.accountswitcher.AccountSwitcherFactory;
@@ -201,7 +201,7 @@ public class Chromoting extends AppCompatActivity implements ConnectionListener,
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, toolbar,
R.string.open_navigation_drawer, R.string.close_navigation_drawer);
- mDrawerLayout.setDrawerListener(mDrawerToggle);
+ mDrawerLayout.addDrawerListener(mDrawerToggle);
// Disable the hamburger icon animation. This is more complex than it ought to be.
// The animation can be customized by tweaking some style parameters - see
@@ -232,7 +232,7 @@ public class Chromoting extends AppCompatActivity implements ConnectionListener,
// Set the three-line icon instead of the default which is a tinted arrow icon.
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- Drawable menuIcon = ApiCompatibilityUtils.getDrawable(getResources(), R.drawable.ic_menu);
+ Drawable menuIcon = ContextCompat.getDrawable(this, R.drawable.ic_menu);
DrawableCompat.setTint(menuIcon.mutate(),
ChromotingUtil.getColorAttribute(this, R.attr.colorControlNormal));
getSupportActionBar().setHomeAsUpIndicator(menuIcon);
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/base/OAuthTokenFetcher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698