Commit 3eb8b2d5 authored by Geoffrey Métais's avatar Geoffrey Métais

Switch to utils methods for GPS and remote

parent 490f65a9
...@@ -20,11 +20,9 @@ ...@@ -20,11 +20,9 @@
package org.videolan.vlc; package org.videolan.vlc;
import android.app.Application; import android.app.Application;
import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
...@@ -115,9 +113,7 @@ public class VLCApplication extends Application { ...@@ -115,9 +113,7 @@ public class VLCApplication extends Application {
// Disable remote control receiver on Fire TV. // Disable remote control receiver on Fire TV.
if (!AndroidDevices.hasTsp()) if (!AndroidDevices.hasTsp())
getPackageManager().setComponentEnabledSetting( AndroidDevices.setRemoteControlReceiverEnabled(false);
new ComponentName(this, RemoteControlClientReceiver.class),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
} }
/** /**
......
...@@ -148,12 +148,11 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI ...@@ -148,12 +148,11 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI
mBrowseFragment.setOnItemViewSelectedListener(this); mBrowseFragment.setOnItemViewSelectedListener(this);
//Enable search feature only if we detect Google Play Services. //Enable search feature only if we detect Google Play Services.
try { if (AndroidDevices.hasPlayServices()) {
getPackageManager().getPackageInfo("com.google.android.gsf", PackageManager.GET_SERVICES);
mBrowseFragment.setOnSearchClickedListener(this); mBrowseFragment.setOnSearchClickedListener(this);
// set search icon color // set search icon color
mBrowseFragment.setSearchAffordanceColor(getResources().getColor(R.color.orange500)); mBrowseFragment.setSearchAffordanceColor(getResources().getColor(R.color.orange500));
} catch (PackageManager.NameNotFoundException e) {} }
mRootContainer = mBrowseFragment.getView(); mRootContainer = mBrowseFragment.getView();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment