From 67a871d85732e582c70a2a1d85ef4419eb658a12 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Thu, 1 Nov 2012 18:26:01 -0700 Subject: Use clock's widget as the default keyguard widget Also, if we have no widgets in lockscreen, reinflate the default widget. If that fails, inflate the built-in clock (KeyguardStatusView) Change-Id: I2e90ab0893c993a755700e075e4a8ac5a685e0f2 --- services/java/com/android/server/AppWidgetServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services') diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java index d0dd9cf..daa82f2 100644 --- a/services/java/com/android/server/AppWidgetServiceImpl.java +++ b/services/java/com/android/server/AppWidgetServiceImpl.java @@ -599,7 +599,7 @@ class AppWidgetServiceImpl { } public void bindAppWidgetId(int appWidgetId, ComponentName provider, Bundle options) { - mContext.enforceCallingPermission(android.Manifest.permission.BIND_APPWIDGET, + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BIND_APPWIDGET, "bindAppWidgetId appWidgetId=" + appWidgetId + " provider=" + provider); bindAppWidgetIdImpl(appWidgetId, provider, options); } @@ -607,7 +607,7 @@ class AppWidgetServiceImpl { public boolean bindAppWidgetIdIfAllowed( String packageName, int appWidgetId, ComponentName provider, Bundle options) { try { - mContext.enforceCallingPermission(android.Manifest.permission.BIND_APPWIDGET, null); + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BIND_APPWIDGET, null); } catch (SecurityException se) { if (!callerHasBindAppWidgetPermission(packageName)) { return false; -- cgit v1.1