Skip to content

Commit 605ace8

Browse files
committed
removed unused code
1 parent abc4d26 commit 605ace8

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

templates/WatchFaceService.java.tmpl

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,27 +92,10 @@ public class MainService extends @@watchface_classs@@ {
9292
final Intent permIntent = new Intent(this, PermissionRequestActivity.class);
9393
permIntent.putExtra(KEY_RESULT_RECEIVER, resultReceiver);
9494
permIntent.putExtra(KEY_PERMISSIONS, permissions);
95-
permIntent.putExtra(KEY_REQUEST_CODE, requestCode);
95+
permIntent.putExtra(KEY_REQUEST_CODE, requestCode);
96+
// Show the dialog requesting the permissions
9697
permIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
9798
startActivity(permIntent);
98-
99-
// Create a notification on watch faces, otherwise it does not work.
100-
/*
101-
TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
102-
stackBuilder.addNextIntent(permIntent);
103-
PendingIntent permPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
104-
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
105-
.setSmallIcon(R.drawable.icon)
106-
.setContentTitle("Requesting permissions")
107-
.setContentText("The watch face need permissions to work properly")
108-
.setOngoing(true)
109-
.setAutoCancel(true)
110-
.setWhen(0)
111-
.setContentIntent(permPendingIntent)
112-
.setStyle(null);
113-
NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
114-
notificationManager.notify(requestCode, builder.build());
115-
*/
11699
}
117100

118101
public static class PermissionRequestActivity extends Activity {

0 commit comments

Comments
 (0)