Skip to content

Commit

Permalink
updated for Android 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsguy committed Aug 24, 2015
1 parent e06fc65 commit e1e79d7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions Diagnostics/Overlay/AndroidManifest.xml
Expand Up @@ -18,6 +18,7 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/Theme.Apptheme">
<activity
Expand Down
11 changes: 6 additions & 5 deletions Diagnostics/Overlay/build.gradle
@@ -1,15 +1,16 @@
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

apply plugin: 'com.android.application'

repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand All @@ -18,8 +19,8 @@ dependencies {
}

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
compileSdkVersion 23
buildToolsVersion "23.0.0"

buildTypes {
debug {
Expand Down
Expand Up @@ -15,13 +15,22 @@
package com.commonsware.android.debug.videolist;

import android.app.Activity;
import android.os.Build;
import android.provider.Settings;
import android.support.v7.widget.RecyclerView;

public class RecyclerViewActivity extends Activity {
private RecyclerView rv=null;

public void setAdapter(RecyclerView.Adapter adapter) {
if (BuildConfig.DEBUG) {
boolean canDrawOverlays=
(Build.VERSION.SDK_INT<=Build.VERSION_CODES.LOLLIPOP_MR1);

if (!canDrawOverlays) {
canDrawOverlays=Settings.canDrawOverlays(this);
}

if (BuildConfig.DEBUG && canDrawOverlays) {
adapter=new TimingWrapper(adapter, this);
}

Expand Down

0 comments on commit e1e79d7

Please sign in to comment.