title: Cannot use getSystemService("usagestats") Android Studio
body: <p>I am trying to use <code>UsageStatsManager</code> with reference to <a href="https://stackoverflow.com/questions/26431795/how-to-use-usagestatsmanager">this</a> SO question. My line of code is</p>
  
  <pre><code>  UsageStatsManager usageStatsManager=(UsageStatsManager)context.getSystemService("usagestats");
  </code></pre>
  
  <p>I also tried to use</p>
  
  <pre><code>  UsageStatsManager usageStatsManager=(UsageStatsManager)context.getSystemService(Context.USAGE_STATS_SERVICE);
  </code></pre>
  
  <p>Regardless of what I use Android Studio says, "Must be one of: Context.POWER_SERVICE, Context.WINDOW_SERVICE..."</p>
  
  <p>After a lot of research I came to know that <code>Context.USAGE_STATS_SERVICE</code> is hidden, so I must add the permission </p>
  
  <pre><code>&lt;uses-permission
      android:name="android.permission.PACKAGE_USAGE_STATS"
      tools:ignore="ProtectedPermissions" /&gt;
  </code></pre>
  
  <p>But still, the results are same. What am I missing?</p>